Page 1 of 2 1 2 LastLast
Results 1 to 15 of 24

Add Forum Title to the end of Thread

This is a discussion on Add Forum Title to the end of Thread within the General Discussion forums, part of the vBSEO SEO Plugin category; Hello, I wanted to know how to add the Forum title to the end of a thread title (tag) Basically, ...

  1. #1
    Member
    Real Name
    Brian
    Join Date
    Nov 2008
    Posts
    32
    Liked
    0 times

    Add Forum Title to the end of Thread

    Hello,
    I wanted to know how to add the Forum title to the end of a thread title (tag)
    Basically, for the Forum I have "Road Bike Forum", and a thread title would be something like "What is a Road Bike?". I would like it to look like this: What is a Road Bike - Road Bike Forum.

    I am using VBulletin 4, and VBseo as well. Your help is greatly appreciated.

  2. #2
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Hello Brian,

    You can't add forum title to your showthread title tag by simply putting {vb:raw foruminfo.title_clean}, because there's no a $foruminfo variable registered in showthread.php file. So please try this:

    * Create a plugin with the following content:

    PHP Code:
    vB_Template::preRegister(  
        
    'SHOWTHREAD', array('forumTitle' => $forumTitle)  
    ); 
    Product: vBulletin
    Hook Location: showthread_complete

    Then activate and save the plugin.

    * Edit your SHOWTHREAD template:

    Find:
    Code:
        <title>{vb:raw thread.prefix_plain_html} {vb:raw thread.title}</title>
    Replace with:

    Code:
        <title>{vb:raw thread.prefix_plain_html} {vb:raw thread.title} - {vb:raw forumTitle}</title>
    And let me know if you achieve what you want.

    Best regards.
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  3. #3
    Member
    Real Name
    Brian
    Join Date
    Nov 2008
    Posts
    32
    Liked
    0 times
    This worked 100%, thank you so much!

  4. #4
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    You're welcome! .
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  5. #5
    Member
    Real Name
    Alex
    Join Date
    Sep 2006
    Posts
    31
    Liked
    0 times
    That added the category name not the board name for me...

    I just added the text in after the title in SHOWTHREAD and FORUMDISPLAY templates...

    Code:
    <title>{vb:raw thread.prefix_plain_html} {vb:raw thread.title} - Site Mame</title>
    works fine.

  6. #6
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Quote Originally Posted by quadcrazy View Post
    That added the category name not the board name for me...
    Hello Alex,

    Brian was asking that precisely. If you want to add your board title, you should use {vb:raw vboptions.bbtitle} instead of {vb:raw forumTitle}.

    Best regards.
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  7. #7
    Junior Member
    Real Name
    Mindaugas Jocius
    Join Date
    Apr 2009
    Posts
    19
    Liked
    0 times
    Hi, I modified that code to this:
    <title>{vb:raw thread.prefix_plain_html} {vb:raw thread.title} - {vb:raw forumTitle} <vb:if condition="$pagenumber > 1">{vb:rawphrase page_x, {vb:raw pagenumber}}</vb:if></title>

    For example the thread has a lot of posts and the title becomes "Thread title - Forum Title Page 2" How to make it "Thread title - Forum title - Page 2". If I just add - the title of the first page of the thread becomes "Thread title - Forum Title page -". It adds that unnecessary -. Waiting for your help. Thanks

  8. #8
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Please try adding the dash after the opening <vb:if tag:

    Code:
    <title>{vb:raw thread.prefix_plain_html} {vb:raw thread.title} - {vb:raw forumTitle} <vb:if condition="$pagenumber > 1">- {vb:rawphrase page_x, {vb:raw pagenumber}}</vb:if></title>
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  9. #9
    Junior Member
    Real Name
    Mindaugas Jocius
    Join Date
    Apr 2009
    Posts
    19
    Liked
    0 times
    Nice, thanks!

  10. #10
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    You are welcome! .
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  11. #11
    Junior Member
    Real Name
    Mindaugas Jocius
    Join Date
    Apr 2009
    Posts
    19
    Liked
    0 times
    I don't want to create another thread so I will ask about subforum titles.
    For example the forum is "Music" and the sub-forum is called "Music creation by computer"
    Is there a way to make a title of that sub-forum "Music creation by computer - Music" ?

  12. #12
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    You are talking about including the parent forum title of a sub-forum inside forum title?.
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  13. #13
    Junior Member
    Real Name
    Mindaugas Jocius
    Join Date
    Apr 2009
    Posts
    19
    Liked
    0 times
    Quote Originally Posted by Andrés Durán Hewitt View Post
    You are talking about including the parent forum title of a sub-forum inside forum title?.
    As far as I understand YES I want to change the sub-forum's title.

  14. #14
    vBSEO Staff Andrés Durán Hewitt's Avatar
    Real Name
    Andrés Durán
    Join Date
    Jul 2009
    Location
    Costa Rica
    Posts
    3,393
    Liked
    411 times
    Blog Entries
    1
    Find in your FORUMDISPLAY template:

    Code:
        <title>{vb:raw foruminfo.title_clean}</title>
    Replace with:

    Code:
        <title>{vb:raw foruminfo.title_clean} - {vb:raw foruminfo.parenttitle}</title>
    Andrés Durán / Crawlability Inc.
    ˇvBSEO 3.6.0 GOLD Liberado!
    Inaugurando el NUEVO vBSEO Sitemap Generator 3.0. - ˇAHORA disponible para Clientes de vBSEO!

    Síguenos en: Facebook | Síguenos en: Twitter


  15. #15
    Junior Member
    Real Name
    Mindaugas Jocius
    Join Date
    Apr 2009
    Posts
    19
    Liked
    0 times
    Thanks works perfectly

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 126
    Last Post: 09-11-2011, 03:40 PM
  2. How to setup thread title and forum name...
    By tomalla in forum General Discussion
    Replies: 2
    Last Post: 02-06-2010, 10:27 PM
  3. remove forum title from thread title
    By mindhunter77 in forum General Discussion
    Replies: 3
    Last Post: 06-08-2008, 02:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •