Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-01-2010, 06:45 PM
cbishwaraj cbishwaraj is offline
 
Join Date: Jul 2010
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 12-02-2010, 04:06 AM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you edit your SHOWTHREAD template... find the line:

Code:
<title>{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title>
You can add words immediately after <title> or immediately before </title> to add words to your title (either before or after the auto created title.)

Example

Code:
<title>Thread View - {vb:raw thread.prefix_plain_html} {vb:raw thread.title} More Keywords Here</title>
Reply With Quote
  #3  
Old 12-02-2010, 12:40 PM
cbishwaraj cbishwaraj is offline
 
Join Date: Jul 2010
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 12-02-2010, 12:46 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 12-02-2010, 01:52 PM
cbishwaraj cbishwaraj is offline
 
Join Date: Jul 2010
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #6  
Old 12-02-2010, 07:07 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Make sure it starts if "if" ends with "else" and all the ones in-between are "elseif"
Reply With Quote
  #7  
Old 12-03-2010, 03:38 PM
cbishwaraj cbishwaraj is offline
 
Join Date: Jul 2010
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 12-03-2010, 07:11 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 12-06-2010, 05:45 PM
cbishwaraj cbishwaraj is offline
 
Join Date: Jul 2010
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
.................................................. ..................................................
.......................................

************************************************** ***********************
Reply With Quote
  #10  
Old 12-09-2010, 02:16 PM
cbishwaraj cbishwaraj is offline
 
Join Date: Jul 2010
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:36 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04487 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete