miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Changing title and description for custom templates

 
Author Vishal
Partaker
#1 | Posted: 4 Aug 2006 10:57 
I have created a custom template page "links.html". How can I get minibb to display the title of the page as "Links" and some custom description? By default, it displays the forum title and description.

I saw in your contact form that the title is displayed as "Contacting Us".

Author Paul
Lead Developer 
#2 | Posted: 4 Aug 2006 14:52 
I think, you will need to paste code like suggested below in bb_plugins.php...

if($action=='tpl' and $_GET['tplName']=='links'){
//$title.='Links'; //forums title displayed first
$title='Links - '.substr($title,0,strlen($title)-2); //forums title displayed after
$description='Your custom description goes here';
}
You may comment/uncomment necessary values for $title.

Author Vishal
Partaker
#3 | Posted: 5 Aug 2006 04:37 
Thanks Paul! I used $description="Custom description" instead of $customDescription and it works fine. Is there anything wrong with it?

Author Paul
Lead Developer 
#4 | Posted: 5 Aug 2006 13:08 
Ok, it also will work that way. Maybe it's even better -) I've fixed the code above.

Author Prince
Partaker
#5 | Posted: 17 Jun 2012 17:40 
Paul:
if($action=='tpl' and $_GET['tplName']=='links'){
//$title.='Links'; //forums title displayed first
$title='Links - '.substr($title,0,strlen($title)-2); //forums title displayed after
$description='Your custom description goes here';
}
If I have multiple templates so do I need to make this separately for each one? or there is another option?

I added "$metaRobots" also and it worked because made it "index,follow".

Author Paul
Lead Developer 
#6 | Posted: 18 Jun 2012 17:03 
Prince:
If I have multiple templates so do I need to make this separately for each one? or there is another option?
Well, if you will have multiple templates, what kind of option it could be? Each of templates may surely have its own title and description, so whatever you must to code, is to copy-paste this code and then modify it. I don't see the simpler way :)

Yes, you can add $metaRobots for each template, that is fine.

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Changing title and description for custom templates
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑