miniBB ®  
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Append custom text to forum title only

Author Vishal
Registered
#1 | Posted: 15 Jul 2008 06:26 
Is it possible to append certain text to forum title only and not to threads? Say I want to append my forum name to forums like "@ My Forum". So If I have forums Forum 1, Forum 2, when someone clicks on the respective forums, their titles will be Forum 1 @ My forum, Forum 2 @ My Forum. The title of discussion threads under the forums should not be altered. I tried the following in bb_plugins.php but it didn't work:

/* Forum title modification */
if ($GLOBALS['action']=='vtopic') $title.=' @ Work at Home Forum';
/*--Forum title modification */

I also tried putting the above code inside function parseTopic().

Author Paul
Lead Developer
#2 | Posted: 15 Jul 2008 07:57 | Edited by: Paul 
You will need to introduce a special variable and then just put it under main_header.html.

Example (for bb_plugins.php):

$customTitles=array(
9=>'coco news',
7=>'mano faq'
);

if($action=='vtopic') $addTitle=' @ '.$customTitles[$forum];

main_header.html's title tag should be like this:

<title>{$title}{$addTitle}</title>

Variations are possible...

Author Vishal
Registered
#3 | Posted: 16 Jul 2008 00:13 
Thanks Paul :) Works perfectly!

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Append custom text to forum title only Top
Your Reply Click this icon to move up to the quoted message
 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
  Extend your miniBB-forums, attaching the images and files,
get the File and Picture Attachments add-on!
Galleries / Attachments Addon for miniBB