Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
mod_rewrite Details »»
mod_rewrite
Version: 1.00, by kfiasche81 kfiasche81 is offline
Developer Last Online: May 2016 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 09-08-2005 Last Update: Never Installs: 1
 
No support by the author.

figured it was about time I updated my mod_rewrite tutorial for vBulletin. Therefore, I decided to provide you guys with the exact, full mod_rewrite that I use here at DaniWeb. It's written for a clean install of vB 3.0.7. This version is not for the faint of heart!

Some new features you can expect to find in this version, that aren't in previous versions, included multi-page support, support for linear, hybrid, and threaded thread modes, full support in the who's online (no more Unknown Locations!), previous / next thread links, and much more!

Attached is my massive .htaccess file. Rename it .htaccess and upload it to your forum directory. Also attached is an .xml file that contains all of the templates that need to be changed. They are already fully edited. Use the vB Admin Panel to create a new style out of the attached XML file. Then, simply edit it as you'd like. However, for the most part, CSS customizations will do - most of what I accomlish at DaniWeb is mere changing the CSS and the header and footer templates.

Below are the PHP files that need to be edited. You will notice two lines at a time. The first line represents what to search for, and the second line represents what to replace it with.

So without further ado ...

forumdisplay.php

Code:
$navbits["forumdisplay.php?$session[sessionurl]f=$forumID"] = $forumTitle;
$navbits["forum$forumID.html"] = $forumTitle; // edited by Dani

$announcementidlink = iif(!$vboptions['oneannounce'] , "&announcementid=$announcement[announcementid]");
$announcementidlink = iif(!$vboptions['oneannounce'] , "-$announcement[announcementid]");

$pagenav = construct_page_nav($totalthreads, "forumdisplay.php?$session[sessionurl]f=$forumid", "&sort=$sortfield&order=$sortorder&pp=$perpage&daysprune=$daysprune");
$pagenav = construct_page_nav($totalthreads, "forum$forumid", "-$sortfield-$sortorder-$perpage-$daysprune.html");

search.php

Code:
$highlightwords = '&highlight=' . urlencode(implode(' ', $display['highlight']));
$highlightwords = '-' . urlencode(implode(' ', $display['highlight']));

$display['forums']["$key"] = "<a href=\"forumdisplay.php?$session[sessionurl]f=$forumid\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';
$display['forums']["$key"] = "<a href=\"forum$forumid.html\"><b><u>" . $forumcache["$forumid"]['title'] . '</u></b></a>';

showthread.php

Code:
$highlightwords = iif($goto, '&', '&amp;') . 'highlight=' . urlencode($_GET['highlight']);
$highlightwords = '-' . urlencode($_GET['highlight']);

     exec_header_redirect("showthread.php?$session[sessionurl_js]p=$getlastpost[postid]$highlightwords#post$getlastpost[postid]");
     exec_header_redirect("threadedpost$getlastpost[postid]$highlightwords.html#post$getlastpost[postid]");

exec_header_redirect("showthread.php?$session[sessionurl_js]p=$posts[postid]$highlightwords#post$posts[postid]");
exec_header_redirect("threadedpost$posts[postid]$highlightwords.html#post$posts[postid]");

exec_header_redirect("showthread.php?$session[sessionurl_js]t=$threadinfo[threadid]&goto=lastpost$highlightwords");
exec_header_redirect("lastpostinthread$threadinfo[threadid]$highlightwords.html");

exec_header_redirect("showthread.php?$session[sessionurl_js]t=$thread[pollid]");
exec_header_redirect("thread$thread[pollid].html");

$pagenav = construct_page_nav($totalposts, "showthread.php?$session[sessionurl]t=$threadid", "&amp;pp=$perpage$highlightwords");
$pagenav = construct_page_nav($totalposts, "threadnav$threadid", "-$perpage$highlightwords.html");

$firstunread = 'showthread.php?' . $session['sessionurl'] . 't=' . $threadid . '&goto=newpost';
$firstunread = 'newpostinthread' . $threadid . '.html';

$pagenav = construct_page_nav($numhybrids, "showthread.php?$session[sessionurl]p=$_REQUEST[postid]", "&amp;pp=$perpage$highlightwords");
$pagenav = construct_page_nav($numhybrids, "post$_REQUEST[postid]", "-$perpage$highlightwords.html");

$navbits["forumdisplay.php?$session[sessionurl]f=$forumID"] = $forumTitle;
$navbits["forum$forumID.html"] = $forumTitle;

clientscript/vbulletin_thrdpostlist.js

Code:
window.location = "showthread.php?" + SESSIONURL + "postid=" + postid + "#poststop";
window.location = "post" + postid + ".html#poststop";

document.write('<a href="showthread.php?postid=' + postid + highlightwords + '#post' + postid + '" id="link' + postid + '"><i>' + morephrase + '</i></a></div>\n');
document.write('<a href="threadedpost' + postid + highlightwords + '.html#post' + postid + '" id="link' + postid + '"><i>' + morephrase + '</i></a></div>\n');

document.write('<a href="showthread.php?postid=' + postid + highlightwords + '#post' + postid + '" onclick="return showPost(' + postid + ')" id="link' + postid + '"' + titlestyle + '>' + title + '</a> ');
document.write('<a href="threadedpost' + postid + highlightwords + '.html#post' + postid + '" onclick="return showPost(' + postid + ')" id="link' + postid + '"' + titlestyle + '>' + title + '</a> ');

includes/functions_forumdisplay.php

Code:
$address = "showthread.php?$session[sessionurl]t=$thread[threadid]";
$address = "threadnav$thread[threadid]";

$address2 = "$thread[highlight]";
$address2 = "-$vboptions[maxposts]$thread[highlight].html";
includes/functions_online.php

Code:
$userinfo['where'] = "<a href=\"showthread.php?$session[sessionurl]t=$threadid\" title=\"$threadpreview\">$threadtitle</a>";
    $userinfo['where'] = "<a href=\"thread$threadid.html\" title=\"$threadpreview\">$threadtitle</a>";

    $userinfo['where'] = "<a href=\"showthread.php?$session[sessionurl]p=$postid#postid=$postid\" title=\"$threadpreview\">$threadtitle</a>";
    $userinfo['where'] = "<a href=\"post$postid.html#post$postid\" title=\"$threadpreview\">$threadtitle</a>";

$userinfo['where'] = "<a href=\"forumdisplay.php?$session[sessionurl]f=$forumid\">$forumtitle</a>";
$userinfo['where'] = "<a href=\"forum$forumid.html\">$forumtitle</a>";

Also, in functions_online.php, after
Code:
$userinfo['values'] = $values;
insert

Code:
// added by dani for seo hack
if (eregi("thread([0-9]+).html$", $filename, $tmatch)) 
{ 
$filename = 'showthread.php'; 
$values['threadid'] = $tmatch[1];
} 

if (eregi("forum([0-9]+).html$", $filename, $fmatch)) 
{ 
$filename = 'forumdisplay.php'; 
$values['forumid'] = $fmatch[1];
} 

if (eregi("post([0-9]+).html$", $filename, $pmatch)) 
{ 
$filename = 'showthread.php'; 
$values['postid'] = $pmatch[1];
} 
if (eregi("post([0-9]+).html#post([0-9]+)$", $filename, $pmatch)) 
{ 
$filename = 'showthread.php'; 
$values['postid'] = $pmatch[1];
} 
// added by dani for seo hack
TNX to dani..

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-09-2005, 06:43 PM
bigcurt's Avatar
bigcurt bigcurt is offline
 
Join Date: Nov 2004
Location: KierDarby.php
Posts: 1,009
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Umm, first I believe this has already been released, also did you ask Dani before releasing her code here? I just wanted to make sure, so just tell me.

~Curt
Reply With Quote
  #3  
Old 09-10-2005, 01:21 AM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whats this do?
Reply With Quote
  #4  
Old 09-10-2005, 10:34 AM
djr's Avatar
djr djr is offline
 
Join Date: Nov 2001
Location: Amsterdam
Posts: 220
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

- edit: Sorry, was being stupid.
Quote:
Originally Posted by GoTTi
whats this do?
This is for SEO purposes. It's essentialy serving search engine spiders static url's rich with (high) keyword density.
Reply With Quote
  #5  
Old 09-17-2005, 05:48 PM
italks italks is offline
 
Join Date: Jan 2004
Location: New Delhi,INDIA
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will this work on vBulletin 3.0.6 ???
Reply With Quote
Reply

Thread Tools

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 08:11 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04492 seconds
  • Memory Usage 2,245KB
  • Queries Executed 18 (?)
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
  • (8)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete