The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to change the title of thread page individually and/or Globally ?
Hi,
We are running Publishing Suite 4.0 and VBSEO 3.5.2. Q. How to change the 'title' of the Thread pages of the Forum? Now, its appearing exactly as thread Name. But we are thinking to change it with our own SEO keywords. Can we individually/Globally control it ? ( Adding some words as suffix or Prefix to all the threads in Forums) ? Thank you for your support. cbishwaraj. |
#2
|
||||
|
||||
If you edit your SHOWTHREAD template... find the line:
Code:
<title>{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> Example Code:
<title>Thread View - {vb:raw thread.prefix_plain_html} {vb:raw thread.title} More Keywords Here</title> |
#3
|
|||
|
|||
Hi BirdOPreys,
Thank you so much for your help. this is what I need but i didn't find that line of code. It is in the 'showthread.php' file in root folder ? I am using Publishing Suite 4.0.....If you could please tell me again would be great! Thank you for your support. Cbishwaraj. |
#4
|
||||
|
||||
It's in your SHOWTHREAD template, not the php file.
To edit a template open your Admin CP On the menu go to "Styles & Templates" and choose "Style Manager" Choose your style (repeat for each one if you have more than one active style) Choose "Edit Templates" Scroll down to "SHOWTHREAD" template (it's in the "Show Thread Templates" group) Double click on the SHOWTHREAD template and it will open in the editor... Make the changes I mentioned and save the template... then go ahead and test it and make sure it's working as expected. |
#5
|
|||
|
|||
BirdOprey5,
Thanks so much!!!! I got it and its done!!!!! Another concern with this : We have nearly 200 differnet forums in same site(Publishing suite). Is there any way we can have seperate titles (adding as suffix: in the same way) for all the seperate Forums threads ? ( Meaning: We need add keywords differently as per related topic of the FORUMS) I hope you understand this question. This is just a question, if this is possible feature in Publishing suite ? Thank you so much again. cbishwaraj. |
#6
|
||||
|
||||
It is possible but it will mean A LOT of code writing to make it for each forum.
You can use template conditionals to make the changes only to specific forums. More info on template conditionals here: https://vborg.vbsupport.ru/showthread.php?t=231525 You'd need to write an "IF" Statement for every forum you want to have a custom title for. Something like: Code:
<vb:if condition="$forum[forumid] == 2"> <title>Custom Title for Threads in Forum 2{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> <vb:elseif condition="$forum[forumid] == 3" /> <title>Custom Title for Threads in Forum 3{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> <vb:elseif condition="$forum[forumid] == 4" /> <title>Custom Title for Threads in Forum 4{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> <vb:elseif condition="$forum[forumid] == 5" /> <title>Custom Title for Threads in Forum 5{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> <vb:else /> <title>Custom Title for Threads any forum not mentioned above {vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> </vb:if> |
#7
|
|||
|
|||
BirdOPrey5,
Great Answer! I appreciate this and Thank you so much. Now, I have a concern again : Am I adding this kind of code in SHOWTHREAD template only? or do I need to paste it in different pages( or different code) ? and how can I define each of the forums with ids ? Is there anything in adminCP to define Forums by id ? I have knowledge working with if-Else so I am comfortable in your ideas/suggestions. Thank you so much for helping me. cbishwaraj |
#8
|
||||
|
||||
The title of the pages is only in SHOWTHREAD so that's the only code you need to change.
In Admin CP go to Forum Manager, click on any forum and at the top of the settings page should be the Forum ID number for that forum. |
#9
|
|||
|
|||
Great BirdOPrey5!
Thank you so much for your help and support. cbishwaraj --------------- Added [DATE]1291737232[/DATE] at [TIME]1291737232[/TIME] --------------- Hi BirdOPrey5, I was testing the title of the threads for couple of the forums with the following code but all the title prefixs are appearing with : [COLOR="rgb(139, 0, 0)"]Custom Title for Threads any forum not mentioned above +Title added in thread[/COLOR] At least i was supposed to get the differernt title to Forums that are with ID 114 and 115. Could you please take a look to following code and let me know where is wrong. Please suggest me. Thank you. ************************************************** *********************** ..................................... .................................... <head> {vb:raw headinclude} <vb:if condition="$threadinfo['keywords']"><meta name="keywords" content="{vb:raw threadinfo.keywords}" /></vb:if> <meta name="description" content="{vb:raw thread.meta_description}" /> <--- I added here --> <vb:if condition="$forum[forumid] == 114"> <title>Aarons | 114{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> <vb:elseif condition="$forum[forumid] == 115" /> <title>Abt Electronics | 115{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> <vb:else /> <title>Custom Title for Threads any forum not mentioned above {vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title> </vb:if> <----I ended here (just testing 2 forums ---> <link rel="canonical" href="{vb:raw thread_url}" /> <vb:if condition="$show['reputation']"> <script type="text/javascript" src="clientscript/vbulletin-ajax-reputation.js?v={vb:raw vboptions.simpleversion}"></script> </vb:if> <script type="text/javascript" src="clientscript/vbulletin_textedit.js?v={vb:raw vboptions.simpleversion}"></script> .................................................. .................................................. ....................................... ************************************************** *********************** |
#10
|
|||
|
|||
Hi BirdOPrey5,
Could you please suggest me by looking into my code. I was trying to implement new titles only for two forums-threads. where did i wrong ? Your help on this would be great. Thanks cbishwaraj |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|