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
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: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
before add
- Code: Select all
include($phpbb_root_path . 'includes/rand_desc/rand_desc.'.$phpEx);
find again
- Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
after add
- Code: Select all
'SITE_RANDOM_DESCRIPTION' => utf8_normalize_nfc($items[$item]),
open
styles/xxxxxx/template/overall_header.html
find
- Code: Select all
{SITE_DESCRIPTION}
replace with
- Code: Select all
<!-- {SITE_DESCRIPTION} -->{SITE_RANDOM_DESCRIPTION}
clear all board- and browser-caches