Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vRewrite - SEOed URLs for vBulletin Details »»
vRewrite - SEOed URLs for vBulletin
Version: 1.5.1, by Immortal Immortal is offline
Developer Last Online: May 2010 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-04-2006 Last Update: 05-15-2006 Installs: 506
Uses Plugins Template Edits
Additional Files  
No support by the author.

About

vRewrite is an advance but simple system to rewrite vB's URLs. The rewrite system uses preg_match_all and str_replace to rewrite the URLs. It will rewrite any URLs that are dynamic ex: showthread.php?t= to /the-forum/title-of-the-forum-id.html. Why? SEs (Search Engines) rate results based on filename. Not only that, but most SEs give a "boost" to static URLs (what we do here) versus dynamic URLs. vRewrite accomplishes both of this, for all URLs that a search engine (or a guest) will see.

Installation

Please download vRewrite.zip and read install.html for more information on how to install it.

Requirements

vRewrite assumes that you are using Apache with the mod_rewrite module enabled, and running vBulletin 3.5.x. However, if you ask for support here on IIS' module or on vBulletin 3.0.x - I will be more then happy to assist you.

Contributions

I would like to thank Chroder and Cole for assisting me release vRewrite. I could not have released it if it wasn't for them.

I would like to thank the following people/boards for helping beta test vRewrite and making it a better product.

Gaming Ultimate, BP Gaming, NBS Designz Cyclez, Hosting-Talk and Forum University.

Copyright

I've spent many hours working and perfecting vRewrite. The only thing I ask you to do is if you use it, please keep the link back. If you wish to put it in your style instead, simply remove or comment out that line. However, if you use vRewrite you MUST link back. That is the only thing I ask.

Known Issues

There are no known issues with the latest release (1.0).

Support / Issues

If you have any problems or discover a bug please post here in this thread. I have also included my email in the install.html email for one-on-one support. The only thing I ask you is please do not post this email address publicly - it is my personal email.

Changelog

1.5 Release - vRewrite 1.5 has become stable, and all users under 1.5 RC3 and 1.0 need to upgrade. Support for 1.0 will no longer be offered, and you will be told simply to upgrade. Please continue to keep all bug and feature suggestions on the bug tracker at:

Code:
http://www.techhelpforum.com/vrewrite
1.1 Release - Several bug fixes, and a few new features. Details here.

03/26/06 - Updated the thread to reflect vRewrite 1.5 Beta links. vRewrite files has NOT changed.

03/11/06 - Updated the thread to take advantage of vB.org's new prefix feature. vRewrite itself has NOT changed.

1.0 Release (02/19/06) - I have released the much awaited 1.0. This is the first stable release of vRewrite. All users now should be safe installing vRewrite. For more information, and how to upgrade, please see here.

1.0 Preview (01/12/06) - I have released a preview version of 1.0. This is the final version before 1.0 is considered stable. I believe everything should work in this new preview, but one bug (see known issues). Please see here for more information and how to upgrade.

01/05/06 - Updated ZIP to include a fix for boards running a table prefix. You do not need to upgrade unless you previously had SQL errors. You can upgrade by importing the product and choose "Allow Overwrite".

Donations

Any donations are very much appreciated! I do this out of my free time and work many hours on it - all for free. Anything to help is always very welcomed

If you use vRewrite, please click Install. This helps you keep track of additional upgrades and shows to me that you care about vRewrite


You may not post vRewrite ZIP or any files contained in the ZIP on any website. You may not also post any support requests/give support on any website other then this one, without my permission. If you do so, you will get a DMCA for copyright infringement. I do not want this spread to pirated users. Please stop piracy and do not share the source outside of this thread and vB.org/com. Thanks.

Support will only be obtained at:
https://vborg.vbsupport.ru/forumdisplay.php?f=182

Supporters / CoAuthors

Show Your Support

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

Comments
  #312  
Old 01-29-2006, 08:21 PM
Immortal Immortal is offline
 
Join Date: Jul 2005
Location: Cincinnati, OH
Posts: 403
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah okay I see it now. I'll try and work on it. If you'd like do you want me to tell you how to turn that part of vRewrite off?

Quote:
Originally Posted by vrdesigner
Hi,
I have installed this hack on a german vb3.5.3 and got the 404 error.
Could you post your .htaccess along with your URL?
Reply With Quote
  #313  
Old 01-29-2006, 08:31 PM
vrdesigner vrdesigner is offline
 
Join Date: May 2004
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, my .htaccess file that of the zip:
Quote:
RewriteEngine On
RewriteBase /
# Default

RewriteRule ^f-(.*)-page-(.*)-(.*).html forumdisplay.php?f=$1&page=$2&order=$3
RewriteRule ^f-(.*)-(.*).html forumdisplay.php?f=$2 [L]
RewriteRule ^u-(.*)-(.*).html member.php?u=$2 [L]
RewriteRule ^memberlist-(.*)-(.*)-(.*)-(.*).html memberlist.php?ltr=$1&pp=$2&sort=$3&order=$4 [L]
RewriteRule ^(.*)/t-(.*)-(.*).html showthread.php?t=$3&is_vrewrite [L]
RewriteRule ^(.*)-(.*)-lastpost.html showthread.php?goto=lastpost&t=$2 [L]
RewriteRule ^(.*)-(.*)-newpost.html showthread.php?goto=newpost&t=$2 [L]
RewriteRule ^(.*)-(.*)-lastpost.html showthread.php?goto=lastpost&t=$2 [L]
RewriteRule ^(.*)-(.*)-(.*).html showthread.php?goto=$3&t=$2 [L]
RewriteRule ^(.*)/t-(.*)-(.*)-page-(.*).html showthread.php?t=$3&page=$4 [L]
RewriteRule ^markread.html forumdisplay.php?do=markread [L]
RewriteRule ^(.*)/p-(.*)-(.*).html showthread.php?p=$3 [L]
RewriteRule ^print-(.*)-(.*).html printthread.php?t=$2 [L]
RewriteRule ^sendtofriend-(.*)-(.*).html sendmessage.php?do=sendtofriend&t=$2 [L]
RewriteRule ^search-(.*).html search.php?do=$1 [L]
RewriteRule ^(.*)-(.*)/newthread.php newthread.php?do=newthread&f=$2[L]
RewriteRule ^(.*)/newpostnoquote-(.*).php newreply.php?do=newreply&noquote=1&p=$2[L]
RewriteRule ^(.*)/newpost-(.*).php newreply.php?do=newreply&p=$2[L]
RewriteRule ^p-(.*).html showpost.php?p=$1&postcount=$1 [L]



# Other options
RewriteRule ^siteforums/(.*)-(.*).html forumdisplay.php?f=$2 [L]
RewriteRule ^members/(.*)-(.*).html member.php?u=$2 [L]
RewriteRule ^(.*)/(.*)-(.*).html showthread.php?t=$3 [L]

# Sitemap
RewriteRule ^(sitemap.*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
My URL is: http://www.politikarena.de
at the moment, the vrewrite hack is disabled in the admincp.
Reply With Quote
  #314  
Old 01-29-2006, 08:42 PM
Immortal Immortal is offline
 
Join Date: Jul 2005
Location: Cincinnati, OH
Posts: 403
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Weird, and mod_rewrite is enabled?
Reply With Quote
  #315  
Old 01-29-2006, 09:26 PM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Immortal
Ah okay I see it now. I'll try and work on it. If you'd like do you want me to tell you how to turn that part of vRewrite off?
thats fine, if you can tell how to turn that part off..

right now I have it disabled again
Reply With Quote
  #316  
Old 01-29-2006, 10:06 PM
AWS's Avatar
AWS AWS is offline
 
Join Date: Nov 2001
Location: Joliet, IL
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Loco.M
thats fine, if you can tell how to turn that part off..

right now I have it disabled again
I have this installed on my test box. I use IIS so I had to modify the rules which I did. When I use the xml file from the zip everything works except it only rewrites the first thread in each forum like a few other have noted in the thread.
When I apply the fix here https://vborg.vbsupport.ru/showpost....&postcount=300
the thread urls all get rewritten, but, then the only things that gets rewritten is the forums and threads. Everything else is back to vbulletin default. The one thing it breaks completely is viewing the user profile.
I haven't looked at the code to chase down the problem. I will when I get a chance. If I find the fix I'll post it.
Reply With Quote
  #317  
Old 01-29-2006, 10:20 PM
Immortal Immortal is offline
 
Join Date: Jul 2005
Location: Cincinnati, OH
Posts: 403
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Weird AWS, I'll try and take time to fix it.

Loco.M:

Try this:

PHP Code:
if($vbulletin->options['vRewrite_on'])
{
if(
$vbulletin->options['vRewrite_forumrewrite'] == "2") {
#------------------------------
# Replace Forums
#------------------------------
$found preg_match_all('#<a href="forumdisplay\.php\?f=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT forumid, title FROM " TABLE_PREFIX "forum WHERE forumid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$title urlize($f['title']);
        
$fid $f['forumid'];
        
$title str_replace("-","",$title);

        
$output str_replace("<a href="forumdisplay.php?f=$fid"""<a href="siteforums/$title-$fid.html""$output);
    }


}
    }
#------------------------------
# Replace Forums
#------------------------------
$found preg_match_all('#<a href="forumdisplay\.php\?f=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT forumid, title FROM " TABLE_PREFIX "forum WHERE forumid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$title urlize($f['title']);
        
$fid $f['forumid'];

        
$output str_replace("<a href="forumdisplay.php?f=$fid"""<a href="f-$title-$fid.html""$output);
    }


}
if(
$vbulletin->options['vRewrite_memberrewrite'] == "2") {
#------------------------------
# Replace User
#------------------------------
$found preg_match_all('#member\.php\?u=([0-9]+)#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT userid, username FROM " TABLE_PREFIX "user WHERE userid IN($ids)");

    while(
$u $vbulletin->db->fetch_array($res))
    {
        
$username urlize($u['username']);
        
$uid $u['userid'];

        
$output str_replace("member.php?u=$uid""members/$username-$uid.html"$output);
    }


}
    }
#------------------------------
# Replace User
#------------------------------
$found preg_match_all('#member\.php\?u=([0-9]+)#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT userid, username FROM " TABLE_PREFIX "user WHERE userid IN($ids)");

    while(
$u $vbulletin->db->fetch_array($res))
    {
        
$username urlize($u['username']);
        
$uid $u['userid'];

        
$output str_replace("member.php?u=$uid""u-$username-$uid.html"$output);
    }


}

#------------------------------
# Replace showthread.php?goto=newpost
#------------------------------
$found preg_match_all('#<a href="showthread\.php\?goto=newpost&amp;t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, title, forumid FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$n $vbulletin->db->fetch_array($res))
    {
        
$title urlize($n['title']);
        
$tid $n['threadid'];
        
$fid $n['forumid'];


        
$output str_replace("<a href="showthread.php?goto=newpost&amp;t=$tid"""<a href="$title-$tid-newpost.html""$output);
    }


}

#------------------------------
# Replace Last Post User (Forum)
#------------------------------
$found preg_match_all('#<a href="member\.php\?find=lastposter&amp;f=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT lastposter, forumid FROM " TABLE_PREFIX "forum WHERE forumid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$lp $f['lastposter'];

        
$lpidinfo $vbulletin->db->query_first("SELECT userid, username FROM " TABLE_PREFIX "user WHERE username='$lp'");
        
$lp urlize($lpidinfo['username']);
        
$lpid $lpidinfo['userid'];
        
$fid $f['forumid'];

        

        
$output str_replace("<a href="member.php?find=lastposter&amp;f=$fid"""<a href="u-$lp-$lpid.html""$output);
    }


}

#------------------------------
# Replace Last Post User (Thread)
#------------------------------
$found preg_match_all('#<a href="member\.php\?find=lastposter&amp;t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT lastposter, threadid FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$lp $f['lastposter'];

        
$lpidinfo $vbulletin->db->query_first("SELECT userid, username FROM " TABLE_PREFIX "user WHERE username='$lp'");
        
$lp urlize($lpidinfo['username']);
        
$lpid $lpidinfo['userid'];
        
$tid $f['threadid'];

        

        
$output str_replace("<a href="member.php?find=lastposter&amp;t=$tid"""<a href="u-$lp-$lpid.html""$output);
    }


}
#-----------------------------------
# DO NOT REMOVE OTHERWISE YOU 
# WILL BE SENT A DMCA FOR COPYRIGHT 
# INFRINGEMENT YOU MAY NOT USE THIS 
# PLUGIN WITHOUT THIS LINE OF CODE
# IF YOU WISE TO REMOVE THIS AND
# ADD IT TO YOUR STYLE, FEEL FREE
# AS LONG AS THE COPYRIGHT REMAINS
#-----------------------------------

$output .= '<div align="center" class="smallfont">SEOed URLs completed by <a href="http://www.techhelpforum.com">Tech Help Forum</a>.</div>';


if(
$vbulletin->options['vRewrite_showthreadrewrite'] == "2") {
#------------------------------
# SHOWTHREAD
#------------------------------
$found preg_match_all('#<a href="showthread\.php\?t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$title urlize($t['title']);
        
$tid $t['threadid'];
        
$fid $t['forumid'];
        
$foruminfo $vbulletin->db->query_first("SELECT title FROM " TABLE_PREFIX "forum WHERE forumid='$fid'");
        
$fname urlize($foruminfo['title']);
        
$fname str_replace("-","",$fname);
        
$title str_replace("-"," ",$title);

        
$output str_replace("<a href="showthread.php?t=$tid"""<a href="$fname/$title-$tid.html""$output);
    }


}
    }
#------------------------------
# SHOWTHREAD
#------------------------------
$found preg_match_all('#<a href="showthread\.php\?t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$title urlize($t['title']);
        
$tid $t['threadid'];
        
$fid $t['forumid'];
        
$foruminfo $vbulletin->db->query_first("SELECT title FROM " TABLE_PREFIX "forum WHERE forumid='$fid'");
        
$fname urlize($foruminfo['title']);

        
$output str_replace("<a href="showthread.php?t=$tid"""<a href="$fname/t-$title-$tid.html""$output);
    }


}
/*
#------------------------------
# SHOWTHREAD and page
#------------------------------
$found = preg_match_all('#showthread\.php\?t=([0-9]+)&amp;page=([0-9]+)#i', $output, $matches);

if($found)
{
    // Build an array of ID's
    $ids = array();

    // Keep track of page nums that go with tid's
    $temp = array();

    for($i = 0; $i < $found; $i++)
    {
        // $temp[<threadid>] = <page>
        $temp[ $matches[1][$i] ] = $matches[2][$i];

        if(is_numeric($matches[1][$i]))
            $ids[] = $matches[1][$i];
    }
    $ids = implode(',', $ids);

    // Go through each
    $res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

    while($t = $vbulletin->db->fetch_array($res))
    {
        $title = urlize($t['title']);
        $tid = $t['threadid'];
        $fid = $t['forumid'];
        $foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
        $fname = urlize($foruminfo['title']);
        $page = $temp[$tid];
        

        $output = str_replace("showthread.php?t=$tid&amp;page=$page", "$fname/t-$title-$tid-page-$page.html", $output);


    }

*/


}

#------------------------------
# showpost
#------------------------------
$found preg_match_all('#<a href="showpost\.php\?p=([0-9]+)&amp;postcount=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        
$temp$matches[1][$i] ] = $matches[2][$i];
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);


    
// Go through each
    
$res $vbulletin->db->query_read("SELECT postid, title FROM " TABLE_PREFIX "post WHERE postid IN($ids)");

    while(
$p $vbulletin->db->fetch_array($res))
    {
        
$pid $p['postid'];
        
$postcount $temp[$pid];
        
$output str_replace("<a href="showpost.php?p=$pid&amp;postcount=$postcount"""<a href="p-$pid.html""$output);    }



}


#------------------------------
# Print SHOWTHREAD
#------------------------------
$found preg_match_all('#<a href="printthread\.php\?t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, title FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$title urlize($t['title']);
        
$tid $t['threadid'];

        
$output str_replace("<a href="printthread.php?t=$tid"""<a href="print-$title-$tid.html""$output);
    }


}

#------------------------------
# Email SHOWTHREAD
#------------------------------
$found preg_match_all('#<a href="sendmessage\.php\?do=sendtofriend&amp;t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, title FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$title urlize($t['title']);
        
$tid $t['threadid'];

        
$output str_replace("<a href="sendmessage.php?do=sendtofriend&amp;t=$tid"""<a href="sendtofriend-$title-$tid.html""$output);
    }


}

#------------------------------
# New Thread
#------------------------------
$found preg_match_all('#<a href="newthread\.php\?do=newthread&amp;f=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT forumid, title FROM " TABLE_PREFIX "forum WHERE forumid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$title urlize($f['title']);
        
$fid $f['forumid'];

        
$output str_replace("<a href="newthread.php?do=newthread&amp;f=$fid"""<a href="$title-$fid/newthread.php""$output);
    }


}

#------------------------------
# New Post
#------------------------------
$found preg_match_all('#<a href="newreply\.php\?do=newreply&amp;noquote=1&amp;p=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, postid FROM " TABLE_PREFIX "post WHERE postid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$tid $t['threadid'];
        
$pid $t['postid'];
        
$threadinfo $vbulletin->db->query_first("SELECT title, forumid FROM " TABLE_PREFIX "thread WHERE threadid='$tid'");
        
$title urlize($threadinfo['title']);
        
$fid $threadinfo['forumid'];
        
$f fetch_foruminfo($fid); 
        
$fname urlize($f['title']);



        
$output str_replace("<a href="newreply.php?do=newreply&amp;noquote=1&amp;p=$pid"""<a href="$fname/newpostnoquote-$pid.php""$output);
    }


}

#------------------------------
# New Post
#------------------------------
$found preg_match_all('#<a href="newreply\.php\?do=newreply&amp;p=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, postid FROM " TABLE_PREFIX "post WHERE postid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$tid $t['threadid'];
        
$pid $t['postid'];
        
$threadinfo $vbulletin->db->query_first("SELECT title, forumid FROM " TABLE_PREFIX "thread WHERE threadid='$tid'");
        
$title urlize($threadinfo['title']);
        
$fid $threadinfo['forumid'];
        
$f fetch_foruminfo($fid); 
        
$fname urlize($f['title']);



        
$output str_replace("<a href="newreply.php?do=newreply&amp;p=$pid"""<a href="$fname/newpost-$pid.php""$output);
    }


}

#------------------------------
# Search
#------------------------------
$found preg_match_all('#<a href="search\.php\?searchid=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT userid, searchid FROM " TABLE_PREFIX "search WHERE searchid IN($ids)");

    while(
$s $vbulletin->db->fetch_array($res))
    {
        
$userid $s['userid'];
        
$searchid $s['searchid'];
        

        
$output str_replace("search.php?searchid=$searchid""search-$userid-$searchid.html"$output);
    }


}


#------------------------------
# misc pages
#------------------------------
$output str_replace("search.php?do=getnew","search-getnew.html",$output);
$output str_replace("search.php?do=getdaily","search-getdaily.html",$output);
$output str_replace("forumdisplay.php?do=markread","markread.html",$output);
}

/**
 * Turn a string into a URL friendly string
 *
 * @param string $txt The string to work on
 * @return string The new string
 */
function urlize($txt)
{
    
$txt unaccent($txt);
    
$txt html_entity_decode($txt);
    
$txt str_replace(' ''-'$txt);
    
$txt preg_replace('#[^a-zA-Z0-9_\-]+#'''$txt);
    
$txt preg_replace('#[\-]+#''-'$txt);

    return 
strtolower($txt);
}

/**
 * Turn accented characters into normal characters
 *
 * @param string $txt The string to remove the accents from
 * @return string Your new clean string
 */
function unaccent($txt)
{
    
$trans get_html_translation_table(HTML_ENTITIES);
    
    foreach(
$trans as $literal => $entity)
    {
        if(
ord($literal) >= 192)
        {
            
$search[]   = $literal;
            
$replace[]  = substr($entity11);
        }
    }

    return 
str_replace($search$replace$txt);

Reply With Quote
  #318  
Old 01-29-2006, 10:41 PM
AWS's Avatar
AWS AWS is offline
 
Join Date: Nov 2001
Location: Joliet, IL
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Immortal
Weird AWS, I'll try and take time to fix it.

Loco.M:

Try this:

PHP Code:
if($vbulletin->options['vRewrite_on'])
{
if(
$vbulletin->options['vRewrite_forumrewrite'] == "2") {
#------------------------------
# Replace Forums
#------------------------------
$found preg_match_all('#<a href="forumdisplay\.php\?f=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT forumid, title FROM " TABLE_PREFIX "forum WHERE forumid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$title urlize($f['title']);
        
$fid $f['forumid'];
        
$title str_replace("-","",$title);

        
$output str_replace("<a href="forumdisplay.php?f=$fid"""<a href="siteforums/$title-$fid.html""$output);
    }


}
    }
#------------------------------
# Replace Forums
#------------------------------
$found preg_match_all('#<a href="forumdisplay\.php\?f=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT forumid, title FROM " TABLE_PREFIX "forum WHERE forumid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$title urlize($f['title']);
        
$fid $f['forumid'];

        
$output str_replace("<a href="forumdisplay.php?f=$fid"""<a href="f-$title-$fid.html""$output);
    }


}
if(
$vbulletin->options['vRewrite_memberrewrite'] == "2") {
#------------------------------
# Replace User
#------------------------------
$found preg_match_all('#member\.php\?u=([0-9]+)#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT userid, username FROM " TABLE_PREFIX "user WHERE userid IN($ids)");

    while(
$u $vbulletin->db->fetch_array($res))
    {
        
$username urlize($u['username']);
        
$uid $u['userid'];

        
$output str_replace("member.php?u=$uid""members/$username-$uid.html"$output);
    }


}
    }
#------------------------------
# Replace User
#------------------------------
$found preg_match_all('#member\.php\?u=([0-9]+)#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT userid, username FROM " TABLE_PREFIX "user WHERE userid IN($ids)");

    while(
$u $vbulletin->db->fetch_array($res))
    {
        
$username urlize($u['username']);
        
$uid $u['userid'];

        
$output str_replace("member.php?u=$uid""u-$username-$uid.html"$output);
    }


}

#------------------------------
# Replace showthread.php?goto=newpost
#------------------------------
$found preg_match_all('#<a href="showthread\.php\?goto=newpost&amp;t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, title, forumid FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$n $vbulletin->db->fetch_array($res))
    {
        
$title urlize($n['title']);
        
$tid $n['threadid'];
        
$fid $n['forumid'];


        
$output str_replace("<a href="showthread.php?goto=newpost&amp;t=$tid"""<a href="$title-$tid-newpost.html""$output);
    }


}

#------------------------------
# Replace Last Post User (Forum)
#------------------------------
$found preg_match_all('#<a href="member\.php\?find=lastposter&amp;f=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT lastposter, forumid FROM " TABLE_PREFIX "forum WHERE forumid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$lp $f['lastposter'];

        
$lpidinfo $vbulletin->db->query_first("SELECT userid, username FROM " TABLE_PREFIX "user WHERE username='$lp'");
        
$lp urlize($lpidinfo['username']);
        
$lpid $lpidinfo['userid'];
        
$fid $f['forumid'];

        

        
$output str_replace("<a href="member.php?find=lastposter&amp;f=$fid"""<a href="u-$lp-$lpid.html""$output);
    }


}

#------------------------------
# Replace Last Post User (Thread)
#------------------------------
$found preg_match_all('#<a href="member\.php\?find=lastposter&amp;t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT lastposter, threadid FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$lp $f['lastposter'];

        
$lpidinfo $vbulletin->db->query_first("SELECT userid, username FROM " TABLE_PREFIX "user WHERE username='$lp'");
        
$lp urlize($lpidinfo['username']);
        
$lpid $lpidinfo['userid'];
        
$tid $f['threadid'];

        

        
$output str_replace("<a href="member.php?find=lastposter&amp;t=$tid"""<a href="u-$lp-$lpid.html""$output);
    }


}
#-----------------------------------
# DO NOT REMOVE OTHERWISE YOU 
# WILL BE SENT A DMCA FOR COPYRIGHT 
# INFRINGEMENT YOU MAY NOT USE THIS 
# PLUGIN WITHOUT THIS LINE OF CODE
# IF YOU WISE TO REMOVE THIS AND
# ADD IT TO YOUR STYLE, FEEL FREE
# AS LONG AS THE COPYRIGHT REMAINS
#-----------------------------------

//$output .= '<div align="center" class="smallfont">SEOed URLs completed by <a href="http://www.techhelpforum.com">Tech Help Forum</a>.</div>';


if($vbulletin->options['vRewrite_showthreadrewrite'] == "2") {
#------------------------------
# SHOWTHREAD
#------------------------------
$found preg_match_all('#<a href="showthread\.php\?t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$title urlize($t['title']);
        
$tid $t['threadid'];
        
$fid $t['forumid'];
        
$foruminfo $vbulletin->db->query_first("SELECT title FROM " TABLE_PREFIX "forum WHERE forumid='$fid'");
        
$fname urlize($foruminfo['title']);
        
$fname str_replace("-","",$fname);
        
$title str_replace("-"," ",$title);

        
$output str_replace("<a href="showthread.php?t=$tid"""<a href="$fname/$title-$tid.html""$output);
    }


}
    }
#------------------------------
# SHOWTHREAD
#------------------------------
$found preg_match_all('#<a href="showthread\.php\?t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$title urlize($t['title']);
        
$tid $t['threadid'];
        
$fid $t['forumid'];
        
$foruminfo $vbulletin->db->query_first("SELECT title FROM " TABLE_PREFIX "forum WHERE forumid='$fid'");
        
$fname urlize($foruminfo['title']);

        
$output str_replace("<a href="showthread.php?t=$tid"""<a href="$fname/t-$title-$tid.html""$output);
    }


}
/*
#------------------------------
# SHOWTHREAD and page
#------------------------------
$found = preg_match_all('#showthread\.php\?t=([0-9]+)&amp;page=([0-9]+)#i', $output, $matches);

if($found)
{
    // Build an array of ID's
    $ids = array();

    // Keep track of page nums that go with tid's
    $temp = array();

    for($i = 0; $i < $found; $i++)
    {
        // $temp[<threadid>] = <page>
        $temp[ $matches[1][$i] ] = $matches[2][$i];

        if(is_numeric($matches[1][$i]))
            $ids[] = $matches[1][$i];
    }
    $ids = implode(',', $ids);

    // Go through each
    $res = $vbulletin->db->query_read("SELECT threadid, forumid, title FROM " . TABLE_PREFIX . "thread WHERE threadid IN($ids)");

    while($t = $vbulletin->db->fetch_array($res))
    {
        $title = urlize($t['title']);
        $tid = $t['threadid'];
        $fid = $t['forumid'];
        $foruminfo = $vbulletin->db->query_first("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid='$fid'");
        $fname = urlize($foruminfo['title']);
        $page = $temp[$tid];
        

        $output = str_replace("showthread.php?t=$tid&amp;page=$page", "$fname/t-$title-$tid-page-$page.html", $output);


    }

*/


}

#------------------------------
# showpost
#------------------------------
$found preg_match_all('#<a href="showpost\.php\?p=([0-9]+)&amp;postcount=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        
$temp$matches[1][$i] ] = $matches[2][$i];
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);


    
// Go through each
    
$res $vbulletin->db->query_read("SELECT postid, title FROM " TABLE_PREFIX "post WHERE postid IN($ids)");

    while(
$p $vbulletin->db->fetch_array($res))
    {
        
$pid $p['postid'];
        
$postcount $temp[$pid];
        
$output str_replace("<a href="showpost.php?p=$pid&amp;postcount=$postcount"""<a href="p-$pid.html""$output);    }



}


#------------------------------
# Print SHOWTHREAD
#------------------------------
$found preg_match_all('#<a href="printthread\.php\?t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, title FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$title urlize($t['title']);
        
$tid $t['threadid'];

        
$output str_replace("<a href="printthread.php?t=$tid"""<a href="print-$title-$tid.html""$output);
    }


}

#------------------------------
# Email SHOWTHREAD
#------------------------------
$found preg_match_all('#<a href="sendmessage\.php\?do=sendtofriend&amp;t=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, title FROM " TABLE_PREFIX "thread WHERE threadid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$title urlize($t['title']);
        
$tid $t['threadid'];

        
$output str_replace("<a href="sendmessage.php?do=sendtofriend&amp;t=$tid"""<a href="sendtofriend-$title-$tid.html""$output);
    }


}

#------------------------------
# New Thread
#------------------------------
$found preg_match_all('#<a href="newthread\.php\?do=newthread&amp;f=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT forumid, title FROM " TABLE_PREFIX "forum WHERE forumid IN($ids)");

    while(
$f $vbulletin->db->fetch_array($res))
    {
        
$title urlize($f['title']);
        
$fid $f['forumid'];

        
$output str_replace("<a href="newthread.php?do=newthread&amp;f=$fid"""<a href="$title-$fid/newthread.php""$output);
    }


}

#------------------------------
# New Post
#------------------------------
$found preg_match_all('#<a href="newreply\.php\?do=newreply&amp;noquote=1&amp;p=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, postid FROM " TABLE_PREFIX "post WHERE postid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$tid $t['threadid'];
        
$pid $t['postid'];
        
$threadinfo $vbulletin->db->query_first("SELECT title, forumid FROM " TABLE_PREFIX "thread WHERE threadid='$tid'");
        
$title urlize($threadinfo['title']);
        
$fid $threadinfo['forumid'];
        
$f fetch_foruminfo($fid); 
        
$fname urlize($f['title']);



        
$output str_replace("<a href="newreply.php?do=newreply&amp;noquote=1&amp;p=$pid"""<a href="$fname/newpostnoquote-$pid.php""$output);
    }


}

#------------------------------
# New Post
#------------------------------
$found preg_match_all('#<a href="newreply\.php\?do=newreply&amp;p=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT threadid, postid FROM " TABLE_PREFIX "post WHERE postid IN($ids)");

    while(
$t $vbulletin->db->fetch_array($res))
    {
        
$tid $t['threadid'];
        
$pid $t['postid'];
        
$threadinfo $vbulletin->db->query_first("SELECT title, forumid FROM " TABLE_PREFIX "thread WHERE threadid='$tid'");
        
$title urlize($threadinfo['title']);
        
$fid $threadinfo['forumid'];
        
$f fetch_foruminfo($fid); 
        
$fname urlize($f['title']);



        
$output str_replace("<a href="newreply.php?do=newreply&amp;p=$pid"""<a href="$fname/newpost-$pid.php""$output);
    }


}

#------------------------------
# Search
#------------------------------
$found preg_match_all('#<a href="search\.php\?searchid=([0-9]+)"#i'$output$matches);

if(
$found)
{
    
// Build an array of ID's
    
$ids = array();

    for(
$i 0$i $found$i++)
    {
        if(
is_numeric($matches[1][$i]))
            
$ids[] = $matches[1][$i];
    }
    
$ids implode(','$ids);

    
// Go through each
    
$res $vbulletin->db->query_read("SELECT userid, searchid FROM " TABLE_PREFIX "search WHERE searchid IN($ids)");

    while(
$s $vbulletin->db->fetch_array($res))
    {
        
$userid $s['userid'];
        
$searchid $s['searchid'];
        

        
$output str_replace("search.php?searchid=$searchid""search-$userid-$searchid.html"$output);
    }


}


#------------------------------
# misc pages
#------------------------------
$output str_replace("search.php?do=getnew","search-getnew.html",$output);
$output str_replace("search.php?do=getdaily","search-getdaily.html",$output);
$output str_replace("forumdisplay.php?do=markread","markread.html",$output);
}

/**
 * Turn a string into a URL friendly string
 *
 * @param string $txt The string to work on
 * @return string The new string
 */
function urlize($txt)
{
    
$txt unaccent($txt);
    
$txt html_entity_decode($txt);
    
$txt str_replace(' ''-'$txt);
    
$txt preg_replace('#[^a-zA-Z0-9_\-]+#'''$txt);
    
$txt preg_replace('#[\-]+#''-'$txt);

    return 
strtolower($txt);
}

/**
 * Turn accented characters into normal characters
 *
 * @param string $txt The string to remove the accents from
 * @return string Your new clean string
 */
function unaccent($txt)
{
    
$trans get_html_translation_table(HTML_ENTITIES);
    
    foreach(
$trans as $literal => $entity)
    {
        if(
ord($literal) >= 192)
        {
            
$search[]   = $literal;
            
$replace[]  = substr($entity11);
        }
    }

    return 
str_replace($search$replace$txt);

Nothing works with this one. Everything is vbulletin default.
Reply With Quote
  #319  
Old 01-29-2006, 10:43 PM
Immortal Immortal is offline
 
Join Date: Jul 2005
Location: Cincinnati, OH
Posts: 403
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AWS, the only difference between that and the one posted earlier is that the SHOWTHREAD's pages is commented out. So the issue will still be there for you, I'll try and ponder on a solution for you.
Reply With Quote
  #320  
Old 01-30-2006, 04:41 AM
T2DMan T2DMan is offline
 
Join Date: Apr 2004
Location: Auckland, New Zealand
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Getting the vBulletin url's corrected is certainly not a small task, and you have certainly done well getting this far. Yes, I happen to support the one rewrite that I consider does a 110% job at rewrites, but you are getting there.

I like the nextthread/prevthread per hosting talk but the archive seems to be broken there.

I have now read through all the posts here and it looks like you have got many things covered. But can I suggest that you add the following:

  • That you recommend the use of the vbulletin option to have the archive linking directly to the actual threads. This gets the most Google PR/link value etc to the actual threads - this was an option I was able to get added to vBulletin 3.5.
  • or - that your rewrite does the direct to url rewrite on the archive/sitemap.
  • And that the thread url on the archive is rewritten.
  • when the root forum url is linked, that instead of it being "/index.php", that it be just "/". Matt Cutts says Google is working on determining what url should be the correct url, but better that each site do it for themselves.
  • You are working on the newpost/latest post? - in the pre 3.5 vBulletin, my rewrite kept the initial url, but then when it searched for the url in the php, it then did a 301 redirect to the proper url - correctly paginated. That general logic should be able to be coded for your plugins. Rather similar to what you have done for the nextthread/previous thread
  • there will be other issues, but those are the ones I see at the moment.
Google SiteMap

Should be an easy job to either mod my vbgsitemap, or the vbseo one for your url's.

On page SEO

No mention of seo'ing of vBulletin is complete without talking about onpage SEO.

If the first words of the title are the words that you are optimizing for, then this phrase should also be in the meta description twice, in an h1, and then repeated in sentence/paragraph form immediately following the h1. Most people posting threads do not repeat the title in the text they write, so repeating it via a formula makes sense. In looking around the forums mentioned on this thread I have seen a few using my formula. In general, with a proper url rewrite (almost achieved here), plus great onpage SEO I have been able to get many vBulletin sites so that their forums and threads are all showing high on the SERP's.

And with good search phrase selection, those pages are then able to get good traffic for the forums.

The onpage hints are just the same as needed for any site, and can be found on most SEO pages, but I have some specific template changes mentioned on my Search Engine Optimize vBulletin 3.5 thread.
Reply With Quote
  #321  
Old 01-30-2006, 05:09 PM
trilljester's Avatar
trilljester trilljester is offline
 
Join Date: Jul 2005
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent job! I missed all of my rewritten URLs when I converted from IPB to VBulletin. I know that Google can handle dynamic URLs to a degree, but I think this will improve my rankings out there.

Couple of bugs:

1. Send thread to a friend does not work. I commented it out for the plugin code, and now it's fine. It kept reporting a thread not found error, or something to that effect. The URL looked good, not sure where the problem was.

2. Viewing public profile of users has some issues. This is somewhat complicated, so I'll try my best to explain:

My user ID is #1. I have another frequent poster who's ID is 14. When we both post in a thread, her profile comes up as mine.

To see this in action, visit this thread:

http://www.trilliummud.com/holos/vis...h-my-1086.html

To see the bad behavior, hover over the first poster's url, and it reads:
http://www.trilliummud.com/holos/mem...uffho-631.html

The second post down was posted by Earthrooster. her user ID is 14. The URL for her profile is messed up. it reads:

http://www.trilliummud.com/holos/members/jester-1.html4

My profile works great though, as evidenced later in the thread:
http://www.trilliummud.com/holos/members/jester-1.html

It appears the regular expression is a little too general, and probably needs to be refined.

Other than that, everything else appears to be working great! I'll probably add some custom rewrites for my arcade, and can post them here, unless you have someplace else that we can post our custom rewrites for the next version?

Thanks!
Reply With Quote
Reply


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 02:28 AM.


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.08680 seconds
  • Memory Usage 2,787KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete