BBCodeBox3 http://4seven.bplaced.net/forum/2/ |
|
[Snippet] Random Description v.0.0.1 (en) http://4seven.bplaced.net/forum/2/viewtopic.php?f=20&t=497 |
Page 1 of 1 |
Author: | 4seven [ Thu 13. May 2010, 18:51 ] |
Post subject: | [Snippet] Random Description v.0.0.1 (en) |
Random Description Request by: eoinzy Request Thread: http://www.phpbb.com/community/viewtopi ... 25&start=0 Demo: http://4seven.bplaced.net/forum/phpbb/index.php (f5-action or forum-move req.) With tis Snippet u can show a random forum-descriptions on each site load U can edit forum-descriptions simply in a utf8 (without BOM) saved txt-file Instruction download package Attachment: edit root/includes/rand_desc/rand_desc.txt edit notes for rand_desc.txt: - each description have one line - don't make empty lines (line-breaks) on begin or end - html is possible (see pre-edits in rand_desc.txt) - always save rand_desc.txt after edit with utf8 (without BOM) - take always notepad++ or a similar editor, who have the utf8 (without BOM) feature copy root/includes/rand_desc/*.* > includes/rand_desc/*.* open includes/functions.php find Code: // The following assigns all _common_ variables that may be used at any point in a template. $template->assign_vars(array( before add Code: include($phpbb_root_path . 'includes/rand_desc/rand_desc.'.$phpEx); find again Code: // The following assigns all _common_ variables that may be used at any point in a template. $template->assign_vars(array( after add Code: 'SITE_RANDOM_DESCRIPTION' => utf8_normalize_nfc($items[$item]), open styles/xxxxxx/template/overall_header.html find Code: {SITE_DESCRIPTION} replace with Code: <!-- {SITE_DESCRIPTION} -->{SITE_RANDOM_DESCRIPTION} clear all board- and browser-caches |
Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |