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.
- Edit geek/gars/mods/display/top.php
Search:CODE:-
$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:-
$thread['url'] = strtolower(str_replace(" ", "-", $value[title]));
-
$thread['url'] = strtolower(str_replace("'", "", $value[title]));
-
$thread['url'] = ereg_replace("[/?!.$%£()~*@#]+", "", $thread['url']);
-
$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>";
-
- Edit geek/gars/mods/display/toc.php
CODE:-
$bits.="<li><div class=\"smallfont\"><a href=\"showthread.php?t=$threadinfo[threadid]&garpg=" . ($toc_x + 1). "#content_start\">";
-
$bits.=$this->navigation['pages'][$toc_x]['text'] ? $this->navigation['pages'][$toc_x]['text'] : construct_phrase($vbphrase['GARS_pagex'],($toc_x + 1));
-
$bits.="</a></div></li>";
Replaced with
CODE:-
$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))));
-
$thread['url'] = ereg_replace("[/?!.$%£()~*@#]+", "", $thread['url']);
-
$bits.="<li><div class=\"smallfont\"><a href=\"a$threadinfo[threadid]-" . ($toc_x + 1). "-$thread[url].html\">";
-
- Edit the following templates
GARS_forumbit_level1_nopost
GARS_forumbit_level1_post
GARS_forumdisplay
GARS_simple_threadbit
GARS_subforumbit_nopost
GARS_subforumbit_post
GARS_threadbitReplace:
CODE:-
showthread.php?$session[sessionurl]t=$thread[threadid]
with
CODE:-
t$thread[threadid]-$thread[url].html
-
VBulletin SEO URL Rewriting
August 19, 2007
- Place the code below in the .htaccess.
CODE:
-
RewriteRule ^t([0-9]+)-(.*).html$ showthread.php?t=$1 [L]
-
RewriteRule ^lastpostinthread([0-9]+).html$ showthread.php?goto=lastpost&t=$1 [L]
-
RewriteRule ^newpostinthread([0-9]+).html$ showthread.php?goto=newpost&t=$1 [L]
-
RewriteRule ^f([0-9]+)-(.*).html$ forumdisplay.php?forumid=$1 [L]
-
- Edit the functions_forumlist.phpSearch for:
CODE:
-
$forum['statusicon'] = fetch_forum_lightbulb($forumid, $lastpostinfo, $forum);
and below that add
CODE:-
$forum['url'] = strtolower(str_replace(" ", "-",str_replace("/", "-", $forum['title'])));
-
$forum['url'] = strtolower(str_replace("'", "",str_replace("/", "-", $forum['title'])));
-
- Edit the forumdisplay.php.Search for:
CODE:
-
$thread = process_thread_array($thread, $lastread, $foruminfo['allowicons']);
and below that add
CODE:-
$thread['url'] = strtolower(str_replace(" ", "-", $thread['threadtitle']));
-
$thread['url'] = strtolower(str_replace("'", "", $thread['threadtitle']));
-
$thread['url'] = ereg_replace("[/?!.$%£()~*@]+", "", $thread['url']);
-
- Edit the threadbit template.Search for:
CODE:
-
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]">
and below that add
CODE:-
</a><a href="t$thread[threadid]-$thread[url].html">
-
- Change the following template:
Search the following:CODE:Replace with:-
</a><a href="forumdisplay.php?$session[sessionurl]f=$forum[forumid]">
CODE:-
</a><a href="$forum[url].html">
-
VBulletin URL Rewriting
August 18, 2007
This discussed how to make the VBulletin URL to a human readable format.
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.
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.
VBulletin Module:Mark Threads As ‘Solved’
August 11, 2007
This module provides ability to mark the thread as Solved.
Module CMPS: AJAX Tabbed Content
August 11, 2007
This is adds Tab to VB Advanced CMPS.
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.






Recent Comments