Two file edits to help SEO

Discussion in 'IP.Board Discussions' started by Mike, Nov 26, 2009.

  1. Mike

    Mike Adept

    Joined:
    May 23, 2009
    Messages:
    137
    Likes Received:
    88
    Location:
    Lafayette, IN, USA
    First Name:
    Mike
    As I gain more experience with using IPB, I am discovering some file and template changes to help with SEO.

    A familiar trick many of us used in vBulletin was to remove the forum name from the forumdisplay and showthread templates. And these changes can also be accomplished for IPB, only it will require you to edit a couple of PHP files, instead.

    The first file you will want to edit is /admin/applications/forums/modules_public/forums/forums.php

    Find the following -

    Code:
    $this->registry->getClass('output')->setTitle( $this->settings['board_name'] . ' -> ' . $this->forum['name'] );
    Change it to -

    Code:
    $this->registry->getClass('output')->setTitle( $this->forum['name'] );
    The second change is an edit to /admin/applications/modules_public/forums/topics.php

    Find the following -

    Code:
    $this->registry->output->setTitle( $this->topic['title'] . ' - ' . $this->settings['board_name']);
    Change it to -

    Code:
    $this->registry->output->setTitle( $this->topic['title'] );
    These two edits will eliminate your board name from those two pages, displaying just the forum title and thread titles.

    i hope these changes will help you optimize your own IPB sites!
     
    5 people like this.
  2. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    Mike, you are THE man! :)

    Thanks for sharing these tips. It's going to help those of us just getting started with IPB tremendously!
     
  3. Mike

    Mike Adept

    Joined:
    May 23, 2009
    Messages:
    137
    Likes Received:
    88
    Location:
    Lafayette, IN, USA
    First Name:
    Mike
    I'm afraid I usually make it a mission to learn as much about new things as possible. So when I come across something that I think others might be able to benefit from, I will be more than happy to share the information.

    And I encourage all of you to do the same. Our collective learning will only benefit us all.
     
  4. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    I agree Mike. That's why when I find something as simple as common mods used on vBulletin that I'm finding on IPB's site, I'm sharing it. :)
     
  5. Mike

    Mike Adept

    Joined:
    May 23, 2009
    Messages:
    137
    Likes Received:
    88
    Location:
    Lafayette, IN, USA
    First Name:
    Mike
    As for myself, I'm quite liking the fact that some of the features that were add-ons for vB are native to IPB.
     
  6. ArnyVee

    ArnyVee Regular Member

    Joined:
    May 25, 2009
    Messages:
    1,264
    Likes Received:
    39
    Mike, I'm really diggin' the IPB software. Lots of features, as you mentioned, that are built-in.
     
  7. Nick

    Nick Regular Member

    Joined:
    Jul 27, 2008
    Messages:
    7,441
    Likes Received:
    218
    Great tips, Mike -- thread stickied!
     
  8. Brandon

    Brandon Regular Member

    Joined:
    Jun 1, 2009
    Messages:
    6,602
    Likes Received:
    1,706
    Location:
    Topeka, Kansas
    First Name:
    Brandon
    I made these changes as well, and I think I requested it also :p
    I thought this post that I quoted was funny, saying this would hurt your rankings more then help..lol

    I don't think the IPB ppl are much into SEO'ing their forums (yet)
     
  9. Mike

    Mike Adept

    Joined:
    May 23, 2009
    Messages:
    137
    Likes Received:
    88
    Location:
    Lafayette, IN, USA
    First Name:
    Mike
    I agree with you, Brandon. The majority of IPB users don't seem too fussed about SEO at all.

    (What is the kanji in your usertitle, if you don't mind me asking)
     
  10. Brandon

    Brandon Regular Member

    Joined:
    Jun 1, 2009
    Messages:
    6,602
    Likes Received:
    1,706
    Location:
    Topeka, Kansas
    First Name:
    Brandon
    It's Japanese, inspired by cheet-masters post
    It did say something about kittens, but I changed it again :p
     
  11. M3xital

    M3xital Novice

    Joined:
    Oct 20, 2009
    Messages:
    41
    Likes Received:
    0
    First Name:
    Pedro
    Thanks for the tips Mike!
     
  12. Mike

    Mike Adept

    Joined:
    May 23, 2009
    Messages:
    137
    Likes Received:
    88
    Location:
    Lafayette, IN, USA
    First Name:
    Mike
    If any of you are using these file edits and are upgrading to IP.Board 3.1.1, you need to make a slightly different change in one of the listed files.

    And please note - this is for IP.Board 3.1.1 only. Previous versions use the edits as shown in the original post.

    The new file edit is in /admin/applications/forums/modules_public/forums/forums.php

    Look for this line -

    Code:
    $this->registry->getClass('output')->setTitle(  strip_tags($this->forum['name']) . ' - ' .  ipsRegistry::$settings['board_name'] );
    And change it to -

    Code:
    $this->registry->getClass('output')->setTitle(  strip_tags($this->forum['name']));
     
  13. Ron

    Ron Regular Member

    Joined:
    May 3, 2005
    Messages:
    14
    Likes Received:
    0
    Thank you for this.. Much appreciated.
     

Share This Page