BBCodeBox3

prosilver | subsilver2

Willkommen und Gute Nacht, Guest  Beim nächsten Piep ist es zwischen 4:00 und 5:00 Uhr

It is currently Mon 27. May 2024, 04:47

All times are UTC + 1 hour [ DST ]




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Thu 13. May 2010, 18:51 
Administrator
User avatar

Posts: 427

Last 3 Topics:
Tabmenu Test
[Snippet] Avatar Ev...
[DEV] Zero and X-P...

Joined:
Sun 13. Jan 2008, 23:44

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
POWERED_BY
[ Time : 0.061s | 21 Queries | GZIP : Off | Board-Version: 3.0.7 PL1 ]