miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Galleries / Attachments Addon for miniBB Extend your miniBB-forums, attaching the images and files, get the File and Picture Attachments add-on!
Custom Tutorials and Modifications miniBB Community Forum / Custom Tutorials and Modifications /
Short link for this topic:

Append custom text to forum title only

Author Vishal
Forums Member
#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
CEO
#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
Forums Member
#3 | Posted: 16 Jul 2008 00:13
Thanks Paul :) Works perfectly!
Custom Tutorials and Modifications miniBB Community Forum / Custom Tutorials and Modifications / Append custom text to forum title only Top
Your Reply Click this icon to move up to the quoted message

» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


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 Community Forum Powered by Free Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts