SEO URL Rewriting for GARS

August 19, 2007

I discussed the steps to setup the URL rewriting for VBulletin. For those forums using GARS, here are the steps.

  1. Edit geek/gars/mods/display/top.php

    Search:

    CODE:
    1. $bits .= "<tr><td align=\"$stylevar[left]\"><span class=\"smallfont\"><a href=\"showthread.php?t=$value[threadid]\" title=\"$value[title]\">$value[title]</a></span></td></tr>";

    Replaced with

    CODE:
    1. $thread['url'] = strtolower(str_replace(" ", "-", $value[title]));
    2. $thread['url'] = strtolower(str_replace("'", "", $value[title]));
    3. $thread['url'] = ereg_replace("[/?!.$%£()~*@#]+", "", $thread['url']);
    4. $bits .= "<tr><td align=\"$stylevar[left]\"><span class=\"smallfont\"><a href=\"t$value[threadid]-" .  $thread['url']  . ".html\" title=\"$value[title]\">$value[title]</a></span></td></tr>";

  2. Edit geek/gars/mods/display/toc.php
    CODE:
    1. $bits.="<li><div class=\"smallfont\"><a href=\"showthread.php?t=$threadinfo[threadid]&amp;garpg=" . ($toc_x + 1). "#content_start\">";
    2. $bits.=$this->navigation['pages'][$toc_x]['text'] ? $this->navigation['pages'][$toc_x]['text'] : construct_phrase($vbphrase['GARS_pagex'],($toc_x + 1));
    3. $bits.="</a></div></li>";

    Replaced with

    CODE:
    1. $thread['url'] = strtolower(str_replace(" ", "-", $this->navigation['pages'][$toc_x]['text'] ? $this->navigation['pages'][$toc_x]['text'] : construct_phrase($vbphrase['GARS_pagex'],($toc_x + 1))));
    2. $thread['url'] = ereg_replace("[/?!.$%£()~*@#]+", "", $thread['url']);
    3. $bits.="<li><div class=\"smallfont\"><a href=\"a$threadinfo[threadid]-" . ($toc_x + 1). "-$thread[url].html\">";

  3. Edit the following templates

    GARS_forumbit_level1_nopost
    GARS_forumbit_level1_post
    GARS_forumdisplay
    GARS_simple_threadbit
    GARS_subforumbit_nopost
    GARS_subforumbit_post
    GARS_threadbit

    Replace:

    CODE:
    1. showthread.php?$session[sessionurl]t=$thread[threadid]

    with

    CODE:
    1. t$thread[threadid]-$thread[url].html

VBulletin SEO URL Rewriting

August 19, 2007

  1. Place the code below in the .htaccess.
    CODE:
    1. RewriteRule ^t([0-9]+)-(.*).html$ showthread.php?t=$1 [L]
    2. RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&amp;t=$1 [L]
    3. RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&amp;t=$1 [L]
    4. RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]

  2. Edit the functions_forumlist.phpSearch for:
    CODE:
    1. $forum['statusicon'] = fetch_forum_lightbulb($forumid, $lastpostinfo, $forum);

    and below that add

    CODE:
    1. $forum['url'] = strtolower(str_replace(" ", "-",str_replace("/", "-", $forum['title'])));
    2. $forum['url'] = strtolower(str_replace("'", "",str_replace("/", "-", $forum['title'])));

  3. Edit the forumdisplay.php.Search for:
    CODE:
    1. $thread = process_thread_array($thread, $lastread, $foruminfo['allowicons']);

    and below that add

    CODE:
    1. $thread['url'] = strtolower(str_replace(" ", "-", $thread['threadtitle']));
    2. $thread['url'] = strtolower(str_replace("'", "", $thread['threadtitle']));
    3. $thread['url'] = ereg_replace("[/?!.$%£()~*@]+", "", $thread['url']);

  4. Edit the threadbit template.Search for:
    CODE:
    1. <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]">

    and below that add

    CODE:
    1. </a><a href="t$thread[threadid]-$thread[url].html">

  5. Change the following template:
    Search the following:

    CODE:
    1. </a><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">

    Replace with:

    CODE:
    1. </a><a href="$forum[url].html">

    forumhome_forumbit_level1_nopost
    forumhome_forumbit_level1_post
    forumhome_forumbit_level2_nopost
    forumhome_forumbit_level2_post
    forumhome_lastpostby

VBulletin URL Rewriting

August 18, 2007

This discussed how to make the VBulletin URL to a human readable format.

Link

NoSpam! - an alternative to CAPTCHA images

August 18, 2007

This simple hack is meant as a replacement for the default CAPTCHA system in vBulletin. There are two main reasons one might want to do this: firstly, new technology is constantly being developed to crack CAPTCHA images and make spam accounts anyway, and secondly, the more secure the CAPTCHA, the more difficult it is for genuine users to tell what the numbers in the image are. There is also the issue of visually impaired users, and the fact that not all servers are capable of generating CAPTCHA images.

Link

VBulletin Specific Category Icon

August 18, 2007

Find "forumhome_forumbit_level1_nopost" template:

Code:

<td class="tcat"><img src="/path/to/your/image_$forum[forumid].gif" /></td>

Then, when you're naming the images you'd like to display, add a suffix to each one with the Forum ID that you'd like it displayed for.

Ex: image.gif for Forum ID 2 becomes - image_2.gif

Edit: If you don't want to display an image for all your forums, you can wrap the above code with the following, which will only display it for specific forums:

Code:

<if condition="in_array($forum[forumid], array(X,Y,Z))">
Code Supplied Above
</if>

Replace X,Y,Z with the Forum IDs of the forums you're displaying images next to.

Commonly Asked VBulletin Questions

August 11, 2007

As you hop around vB Forums, help compile listings of the most commonly asked questions (and answers) related to these 14 topic groupings. Goal is to provide a Browse by Topic method of locating frequently requested information, as a companion to Search Mode. An FAQ will be produced from these results. Thanks for your help!

1. FORMATTING. LAYOUT. THREAD DISPLAY ISSUES
2. REPLYING. START THREAD. COMPOSE, EDIT MESSAGE
3. IMAGES. ATTACHMENTS. SIGS. AVATARS
4. USER STATUS. PRIVILEGES. DISPLAYS. PROFILE. PREFS
5. REGISTRATION. NOTIFICATION ISSUES
6. LOGIN. COOKIES. SESSIONS. TRACKING. STATS
7. RATINGS. RANKINGS. KARMA. FILTRATION
8. ADMIN CONTROL PANEL. TEMPLATE EDITS.
9. MODERATOR TOOLS
10. PRIVATE FORUMS
11. PMs (PRIVATE MSGS). ICQ. CHATS. CALENDAR
12. NON-vB PAGES. TOP 10. MOST RECENT POSTS
13. SEARCH. mySQL. QUERIES. DATABASE. BACKUPS
14. MISCELLANEOUS. CROSSOVER TOPICS. UPGRADES. INSTALLS

e-steki Karma v2

August 11, 2007

e-steki Karma is a powerful system to let users rate each other with a rating from -5 to +5. Each user's karma is a number, which is the average of all votes they have received. Refer to the Features section for more information.

Link

VBulletin Module:Mark Threads As ‘Solved’

August 11, 2007

This module provides ability to mark the thread as Solved.

Link

Module CMPS: AJAX Tabbed Content

August 11, 2007

 This is adds Tab to VB Advanced CMPS.

Link

Welcome to Development Standards.Net

August 9, 2007

I'm Mark Anthony Marucot. I'm 5 years in IT industry. I started this blog to document all my projects, interests and ideas.  My major online project is IT Experts Central (http://www.itexpertscentral.com). This site focused on providing free tutorials and invite IT experts worldwide to collaborate and help each other. The pagerank of the site is currently 4. I hope that this will improve later on.