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
  #1632  
Old 12-05-2006, 01:21 PM
monstermunch monstermunch is offline
 
Join Date: Jun 2005
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Im using 1.5.1 and am still getting the "Unknown Location" error on the who's online page, how to i stop the rewrite for this, i have read other posts but am not sure where/how i do it..

thanks
Reply With Quote
  #1633  
Old 12-10-2006, 11:36 AM
McCarroll21 McCarroll21 is offline
 
Join Date: Sep 2006
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The only broken link I can find on mine -- after using the htaccess generator -- are the 'new posts' links from my homepage and from my navbar. I run a vbadvanced homepage, what fixes do I need for that?

My links go to "http://www.braves-nation.com/forums//forums/search-getnew.html/" instead of "http://www.braves-nation.com/forums/search-getnew.html/"

Anyway to get that extra /forums/ out of there for links from my homepage -- mainly my welcome block -- and my navbar?

Edit: By the way, my links in the navbar are talking about the ones in the drop-down menu that says 'New Posts In'

Also, sometimes instead of going to ""http://www.braves-nation.com/forums/search-getnew.html/" it goes to "http://www.braves-nation.com/forums/search-getnew.html/search.php?searchid=3070" and I get a 404. Any fixes?

Edit2: Fixed. I just disabled the searches. Duh.
Reply With Quote
  #1634  
Old 12-12-2006, 10:14 PM
minorgod's Avatar
minorgod minorgod is offline
 
Join Date: Aug 2006
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There is a problem with vRewrite when using it with the "redirect threads" option enabled. If you try to change thread modes it will not let you because the redirected URL does not include the "mode" variable. After hacking several plugins to no avail, I discovered that the plugin attached to the "global_complete" hook is incorrectly rewriting the links and removing the "mode" variable. After further study, I discovered that the problem was not happening on the "hybrid" mode link, but it was happening on the "linear" and "threaded" mode links. If you rearrange the order of the variables in the SHOWTHREAD template, it stops vRewrite from rewriting those links improperly. You simply need to make this small change to your SHOWTHREAD template:

FIND:
PHP Code:
<if condition="$show['linearmode']">
        <
td class="vbmenu_option" title="nohilite"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_linear.gif" alt="$vbphrase[linear_mode]/> <strong>$vbphrase[linear_mode]</strong></td>
    <else />
        <
td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_linear.gif" alt="$vbphrase[linear_mode]/> <a href="showthread.php?$session[sessionurl]p=$FIRSTPOSTID&amp;mode=linear$highlightwords#post$FIRSTPOSTID">$vbphrase[switch_to_linear_mode]</a></td>
    </if>
    </
tr>
    <
tr>
    <if 
condition="$show['hybridmode']">
        <
td class="vbmenu_option" title="nohilite"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_hybrid.gif" alt="$vbphrase[hybrid_mode]/> <strong>$vbphrase[hybrid_mode]</strong></td>
    <else />
        <
td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_hybrid.gif" alt="$vbphrase[hybrid_mode]/> <a href="showthread.php?$session[sessionurl]mode=hybrid&amp;t=$thread[threadid]$highlightwords">$vbphrase[switch_to_hybrid_mode]</a></td>
    </if>
    </
tr>
    <
tr>
    <if 
condition="$show['threadedmode']">
        <
td class="vbmenu_option" title="nohilite"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_threaded.gif" alt="$vbphrase[threaded_mode]/> <strong>$vbphrase[threaded_mode]</strong></td>
    <else />
        <
td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_threaded.gif" alt="$vbphrase[threaded_mode]/> <a href="showthread.php?$session[sessionurl]p=$FIRSTPOSTID&amp;mode=threaded$highlightwords#post$FIRSTPOSTID">$vbphrase[switch_to_threaded_mode]</a></td>
    </if> 
REPLACE WITH:
PHP Code:
<if condition="$show['linearmode']">
        <
td class="vbmenu_option" title="nohilite"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_linear.gif" alt="$vbphrase[linear_mode]/> <strong>$vbphrase[linear_mode]</strong></td>
    <else />
        <
td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_linear.gif" alt="$vbphrase[linear_mode]/> <a href="showthread.php?$session[sessionurl]mode=linear&amp;p=$FIRSTPOSTID$highlightwords#post$FIRSTPOSTID">$vbphrase[switch_to_linear_mode]</a></td>
    </if>
    </
tr>
    <
tr>
    <if 
condition="$show['hybridmode']">
        <
td class="vbmenu_option" title="nohilite"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_hybrid.gif" alt="$vbphrase[hybrid_mode]/> <strong>$vbphrase[hybrid_mode]</strong></td>
    <else />
        <
td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_hybrid.gif" alt="$vbphrase[hybrid_mode]/> <a href="showthread.php?$session[sessionurl]mode=hybrid&amp;t=$thread[threadid]$highlightwords">$vbphrase[switch_to_hybrid_mode]</a></td>
    </if>
    </
tr>
    <
tr>
    <if 
condition="$show['threadedmode']">
        <
td class="vbmenu_option" title="nohilite"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_threaded.gif" alt="$vbphrase[threaded_mode]/> <strong>$vbphrase[threaded_mode]</strong></td>
    <else />
        <
td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/mode_threaded.gif" alt="$vbphrase[threaded_mode]/> <a href="showthread.php?$session[sessionurl]mode=threaded&amp;p=$FIRSTPOSTID$highlightwords#post$FIRSTPOSTID">$vbphrase[switch_to_threaded_mode]</a></td>
    </if> 
This is sort of a hack for something that really needs to be fixed in the "vRewrite - main script" plugin attached to the "global_complete" hook, but that plugin is so ugly I can't figure out where to fix it.

EDIT: After further study, it appears that you also need to modify your "VRewrite - redirect handling" plugin (attached to the global_start hook). Simply replace it with this edited code to keep the redirect script from destroying the "mode" variable.

PHP Code:
if (($vbulletin->options['vrewrite_external']) AND ($vbulletin->options['vRewrite_on'])) {
$current_script $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : $_ENV['REQUEST_URI'];
if (
preg_match("#external.php#"$current_script)) {
    
ob_start ();
    require(
"external.php");
    
$output ob_get_contents ();



    
$found preg_match_all('#showthread\.php\?t=([0-9]+)&amp;goto=newpost#i'$output$matches);
    if(
$found) {
        
$ids = array();
        for(
$i 0$i $found$i++) {
            if(
is_numeric($matches[1][$i]))
                
$ids[] = $matches[1][$i];
        }
        for (
$i 0$i count($ids); $i++) {
            
$ttitle urlize($vRewrite_thread["$ids[$i]"][title]); 
                           
$fid $vRewrite_thread["$ids[$i]"][ownerid];
            
$ftitle urlize($vRewrite_forum["$fid"][title]); 
                        
$tid $ids[$i];
            
$new = (($vbulletin->options['vRewrite_showthread'] == 1) ? $ftitle 'f-' $ftitle '-' $fid);
            
$output str_replace("showthread.php?t=$tid&amp;goto=newpost""$new/t-$ttitle-$tid-new{$vbulletin->options['vRewrite_extension_showthread']}"$output);
        }
    } 
// end found
    
ob_end_clean ();
    echo 
$output;
    exit();
}
}

if(
$vbulletin->options['vRewrite_redirect'] AND $vbulletin->options['vRewrite_on']) {
                global 
$myurl;
                
$myurl $vbulletin->options['bburl']; 

if(
THIS_SCRIPT == 'showthread') {

    if(!isset(
$_GET['is_vrewrite']) AND $vbulletin->options['vRewrite_redirect_showthread']){

                
// isnt all of this defined already in global .php? 
        
global $vbulletin;
        
$vbulletin->input->clean_gpc('r''threadid'TYPE_UINT);
        
$vbulletin->input->clean_gpc('r''postid'TYPE_UINT);
        
$vbulletin->input->clean_gpc('r''pagenumber'TYPE_UINT);
        
$vbulletin->input->clean_gpc('r''goto'TYPE_STR);

        switch (
$vbulletin->GPC['goto']) {
            case 
'newpost':
                
$threadid $vbulletin->GPC['threadid'];
                if (!empty(
$threadid)) {

                    
$getlastpost $db->query_first("
                        SELECT MIN(postid) AS postid, post.dateline, t.title as threadtitle, f.title as forumtitle, f.forumid as forumid
                        FROM " 
TABLE_PREFIX "post AS post JOIN " TABLE_PREFIX "thread AS t ON(t.threadid=post.threadid) JOIN " TABLE_PREFIX "forum as f ON(f.forumid=t.forumid)
                        WHERE post.threadid = "  
intval($threadid) . " AND post.visible = 1
                            AND post.dateline > " 
intval($vbulletin->userinfo['lastvisit']) . "
                        GROUP BY t.title, f.title, f.forumid, t.threadid, post.dateline

                        LIMIT 1
                    "
);
                        if (
$getlastpost['postid']) {
                            
                    
$dateline $getlastpost['dateline'];
                    
$getpstcnt $db->query_first("
                        SELECT COUNT(*) AS postcount
                                    FROM " 
TABLE_PREFIX "post
                                    WHERE threadid = 
$threadid AND visible = 1
                            AND dateline <= 
$dateline
                    "
);
                    
$postcount $getpstcnt['postcount'];
                    
$pp sanitize_maxposts($vbulletin->GPC['perpage']);
                        
$page ceil($postcount $pp);
                        if (
$page <= 0) {
                        
$page 1;
                    }

                                                
$fname urlize($getlastpost[forumtitle]);
                                                
$tname urlize($getlastpost[threadtitle]);
                            
$parentid $getlastpost[forumid];
                            
$new = (($vbulletin->options['vRewrite_showthread'] == 1) ? $fname 'f-' $fname '-' $parentid);
                            if (
$page <= 1) {
                                
exec_header_redirect("$myurl/$new/t-$tname-$threadid{$vbulletin->options['vRewrite_extension_showthread']}#post$getlastpost[postid]");
                            } else {
                                if(
$vbulletin->options['vRewrite_page'] == "1") { 
                                    
exec_header_redirect("$myurl/$new/t-$tname-page$page-$threadid{$vbulletin->options['vRewrite_extension_showthread']}#post$getlastpost[postid]");
                                } else {
                                    
exec_header_redirect("$myurl/$new/t-$tname-$threadid/page$page{$vbulletin->options['vRewrite_extension_showthread']}#post$getlastpost[postid]");
                                }
                            }
                        } else {
                            
exec_header_redirect("$myurl/showthread.php?t=$threadid&goto=lastpost");
                        }

                }
                break; 
            case 
'lastpost':
                
$threadid $vbulletin->GPC['threadid'];
                if (!empty(
$threadid)) {
                    if (
$getlastpost $db->query_first("
SELECT MAX(post.postid) AS postid, post2.dateline, t.title AS threadtitle, t.threadid, f.forumid, f.title AS forumtitle
                        FROM " 
TABLE_PREFIX "post AS post, " TABLE_PREFIX "post AS post2, " TABLE_PREFIX "thread AS t, " TABLE_PREFIX "forum AS f
                        WHERE post.threadid = "  
intval($threadid) . " AND post.visible = 1
                        AND post2.postid=post.postid
AND t.forumid= f.forumid
AND t.threadid = "  
intval($threadid) . "

                        GROUP BY post.postid DESC
                        LIMIT 1    
                "
))    {
                            
$dateline $getlastpost['dateline'];
                            
$getpstcnt $db->query_first("
                                SELECT COUNT(*) AS postcount
                                            FROM " 
TABLE_PREFIX "post
                                            WHERE threadid = 
$threadid AND visible = 1
                                                     AND dateline <= 
$dateline
                            "
);
                                    
$postcount $getpstcnt['postcount'];
                                    
$pp sanitize_maxposts($vbulletin->GPC['perpage']);
                                    
$page ceil($postcount $pp);
                                    if (
$page <= 0) {
                                         
$page 1;
                                    }
                            
                            
$fname urlize($getlastpost[forumtitle]);
                                                
$tname urlize($getlastpost[threadtitle]);

                            
$parentid $getlastpost[forumid];
                            
$new = (($vbulletin->options['vRewrite_showthread'] == 1) ? $fname 'f-' $fname '-' $parentid);
                            if (
$page <= 1) {
                                               
exec_header_redirect($myurl'/' $new '/t-' $tname'-'$threadid $vbulletin->options['vRewrite_extension_showthread'] .'#post' $getlastpost[postid]);
                            } else {
                                if(
$vbulletin->options['vRewrite_page'] == "1") { 
                                    
exec_header_redirect("$myurl/$new/t-$tname-page$page-$threadid{$vbulletin->options['vRewrite_extension_showthread']}#post$getlastpost[postid]");
                                } else {
                                    
exec_header_redirect("$myurl/$new/t-$tname-$threadid/page$page{$vbulletin->options['vRewrite_extension_showthread']}#post$getlastpost[postid]");
                                }

                            }

                        }
                }

                break;

        } 
// end switch

        
if (!empty($vbulletin->GPC['pagenumber']) AND empty($vbulletin->GPC['goto'])) {
            
$page $vbulletin->GPC['pagenumber'];
            if (
$getpageinfo $db->query_first("
                SELECT t.title as threadtitle, t.threadid AS threadid, f.title as forumtitle, f.forumid as forumid 
                FROM " 
TABLE_PREFIX "post AS p JOIN " TABLE_PREFIX "thread as t ON (t.threadid=p.threadid) JOIN " TABLE_PREFIX "forum AS f ON (f.forumid=t.forumid)
                WHERE t.threadid= " 
intval($threadid) . " AND p.visible = 1
                LIMIT 1
            "
)) {
                            
$fname urlize($getpageinfo[forumtitle]);
                            
$tname urlize($getpageinfo[threadtitle]);
                
$parentid $getpageinfo[forumid];
                
$new = (($vbulletin->options['vRewrite_showthread'] == 1) ? $fname 'f-' $fname '-' $parentid);

                if (
$page <= 1) {
                    
exec_header_redirect("$myurl/$new/t-$tname-$threadid{$vbulletin->options['vRewrite_extension_showthread']}");
                } else {
                    if(
$vbulletin->options['vRewrite_page'] == "1") { 
                        
exec_header_redirect("$myurl/$new/t-$tname-page$page-$threadid{$vbulletin->options['vRewrite_extension_showthread']}");
                    } else {
                        
exec_header_redirect("$myurl/$new/t-$tname-$threadid/page$page{$vbulletin->options['vRewrite_extension_showthread']}");
                    }
                }
            }
                        
        }

        
$postid $vbulletin->GPC['postid'];
        if (!empty(
$postid) AND empty($vbulletin->GPC['goto'])) {
            if (
$getpostinfo $db->query_first("
                SELECT p.dateline AS dateline, t.title as threadtitle, t.threadid, f.title as forumtitle, t.replycount AS replycount, f.forumid AS forumid
                FROM " 
TABLE_PREFIX "post AS p JOIN " TABLE_PREFIX "thread as t ON (p.threadid=t.threadid) JOIN " TABLE_PREFIX "forum AS f ON (t.forumid=f.forumid)
                WHERE p.postid = 
$postid
                LIMIT 1
            "
)) {
                        
$threadid $getpostinfo['threadid'];
                        
$date $getpostinfo['dateline'];
                
$getpstcnt $db->query_first("
                    SELECT COUNT(*) AS postcount
                                FROM " 
TABLE_PREFIX "post
                                WHERE threadid = 
$threadid AND visible = 1
                                      AND dateline <= 
$date
                "
);
                        
$postcount $getpstcnt['postcount'];
                        
$pp sanitize_maxposts($vbulletin->GPC['perpage']);
                        
$page ceil($postcount $pp);
                        if (
$page <= 0) {
                             
$page 1;
                        }
                        
$ftitle urlize($getpostinfo['forumtitle']);
                        
$tname urlize($getpostinfo[threadtitle]);
    
                
$parentid $getpostinfo[forumid];
                
$new = (($vbulletin->options['vRewrite_showthread'] == 1) ? $ftitle 'f-' $ftitle '-' $parentid);
                
                
//fix for linear and threaded mode selection by brett
                
if(!empty($vbulletin->GPC['mode'])){
                    
$modestring "?mode=".$vbulletin->GPC['mode'];
                }
                
//end fix for linear and threaded mode selection
                //note that $modestring has been added to the following three calls to exec_header_redirect()
                
if ($page <= 1) {
                    
exec_header_redirect("$myurl/$new/t-$tname-$threadid{$vbulletin->options['vRewrite_extension_showthread']}$modestring#post" $postid);
                } else {
                    if(
$vbulletin->options['vRewrite_page'] == "1") { 
                        
exec_header_redirect("$myurl/$new/t-$tname-page$page-$threadid{$vbulletin->options['vRewrite_extension_showthread']}$modestring#post" $postid);
                    } else {
                        
exec_header_redirect("$myurl/$new/t-$tname-$threadid/page$page{$vbulletin->options['vRewrite_extension_showthread']}$modestring#post" $postid);
                    }
                }
            } 
        }
        
// end post
        
        
$tid $vbulletin->GPC['threadid'];
        if (!empty(
$tid ) AND empty($vbulletin->GPC['goto'])) {
            if (
$getthreadinfo $db->query_first("
                SELECT t.title as threadtitle, f.title as forumtitle, f.forumid AS forumid
                FROM " 
TABLE_PREFIX "forum AS f JOIN " TABLE_PREFIX "thread as t ON (t.forumid=f.forumid)
                WHERE t.threadid = 
$tid
                LIMIT 1
            "
)) {
                        
$ftitle urlize($getthreadinfo['forumtitle']);
                        
$tname urlize($getthreadinfo['threadtitle']);
    
                
$parentid $getthreadinfo[forumid];
                
$new = (($vbulletin->options['vRewrite_showthread'] == 1) ? $ftitle 'f-' $ftitle '-' $parentid);
                
//fix for hybrid mode selection by brett
                
if(!empty($vbulletin->GPC['mode'])){
                    
$modestring "?mode=".$vbulletin->GPC['mode'];
                }
                
//end fix for hybrid mode selection
                //note that $modestring has been added to the following call to exec_header_redirect()
                
exec_header_redirect("$myurl/$new/t-$tname-$threadid{$vbulletin->options['vRewrite_extension_showthread']}$modestring");
            } 
        }

        
    } 
// end if rewrite isn't there
// end showthread

    
if(THIS_SCRIPT == 'forumdisplay') {
        if(!isset(
$_GET['is_vrewrite']) AND $vbulletin->options['vRewrite_redirect_forumdisplay']){

            if (!(
$_REQUEST['do'] == 'doenterpwd')) {
                
$vbulletin->input->clean_gpc('r''forumid'TYPE_UINT);
                
$forumid $vbulletin->GPC['forumid'];
                if (
$getforum $db->query_first("
                    SELECT title
                    FROM " 
TABLE_PREFIX "forum
                    WHERE forumid =  
$forumid 
            "
)) {
                
$title urlize($getforum[title]);

                
$x $_SERVER['QUERY_STRING'];
            if (!empty(
$x)) { 
                             
$x preg_replace('/s=(&)f=([0-9]+)(&)/'''$x);
                             
$x preg_replace('/(&)s=(&)f=([0-9]+)/'''$x);
                             
$x preg_replace('/(&)f=([0-9]+)/'''$x);
                             
$x preg_replace('/f=([0-9]+)(&)/'''$x);

                
// thisis really needed?:
                             
$x preg_replace('/f=([0-9]+)/'''$x);
                
// ??

                             
$x preg_replace('/order=desc(&)/'''$x);

                
$pg preg_match('#page=([0-9]+)#i'$x$matches);
                            if (
$pg) { 
                    
$page $matches[1];
                    
$x preg_replace('/page=([0-9]+)(&)/'''$x);
                }
                if (!empty(
$x)) {
                    
$x '?' $x;

                }
            } else {
                
$x '';
            }
                
$x = (($vbulletin->options['vRewrite_forumdisplay_slash'] == 1) ? '/' '') . $x
                if (
$page >= 2) {
                    
exec_header_redirect("$myurl/f-$title-$forumid/page$page{$vbulletin->options['vRewrite_extension_forumdisplay']}$x");
                } else {
                    
exec_header_redirect("$myurl/f-$title-$forumid{$vbulletin->options['vRewrite_extension_forumdisplay']}$x");
                }
            } 
// end 'if' SQL check
    
}
        } 
// end if rewrite isn't there
    
// end forumdisplay




    
if(THIS_SCRIPT == 'member') {
         if(!isset(
$_GET['is_vrewrite']) AND $vbulletin->options['vRewrite_redirect_member']){
                    
$vbulletin->input->clean_array_gpc('r', array(
                       
'userid' => TYPE_UINT,
                       
'username' => TYPE_NOHTML 
                    
));
                 if (!empty(
$vbulletin->GPC['userid'])) {
            
$userinfo verify_id('user'$vbulletin->GPC['userid'], 1115);
                        
$uid $userinfo['userid'];
                        
$uname urlize($userinfo['username']);
            if(
$vbulletin->options['vRewrite_memberrewrite'] == 1) {
                
exec_header_redirect("$myurl/u-$uname-$uid{$vbulletin->options['vRewrite_extension_member']}");
            } else {
                
exec_header_redirect("$myurl/members/$uname-$uid{$vbulletin->options['vRewrite_extension_member']}");
            }
                 }
        }
        } 
// end memberinfo



// end redirect on



function urlize($txt) {
    global 
$vbulletin;
    if (
$vbulletin->options['vrewrite_stopword_on']) {
        
$stop_words preg_split('#\s+#'$vbulletin->options['vrewrite_stopword_filter'] );
        foreach (
$stop_words AS $word) {
            
$txt preg_replace('#\s' $word '\s#i'' '$txt);
        }
    }
    
$txt unaccent($txt);
    
$txt html_entity_decode($txt);
    
$txt str_replace(' ''-'$txt);
    
$txt str_replace('_''-'$txt);
    
$txt preg_replace('#[^a-zA-Z0-9_\-]+#'''$txt);
    
$txt preg_replace('#[\-]+#''-'$txt);
    return 
strtolower($txt);
}

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);
}
$version $vbulletin->options['vrewriteversion']; 
global 
$vRewrite_copyright;
$vRewrite_copyright '<div align="center" class="smallfont">vRewrite ' $version ' SEOed URLs completed by <a href="http://www.techhelpforum.com">Tech Help Forum</a> and <a href="http://www.ChaloNa.com">Chalo Na</a>.</div>'
Reply With Quote
  #1635  
Old 12-13-2006, 09:52 PM
CustomizeVB CustomizeVB is offline
 
Join Date: Aug 2006
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm having a problem with this. The New Posts link won't work for me anymore, any suggestions?
Reply With Quote
  #1636  
Old 12-13-2006, 11:58 PM
imported_infitech's Avatar
imported_infitech imported_infitech is offline
 
Join Date: Apr 2004
Location: Queens, NY
Posts: 247
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by redlabour View Post
Sorry - i am shocked. This is a Lie.

vBa latest Threads Module still does not work (go directly to last Posting Arrow).

And this is one of the Errors that where display there for months.



Correct !



And because it is free others have to be warned before they gave their Time to something that makes more Problems then it helps.

Sounds hard ? Sorry - with native Language it is easier to sound friendlier. But i hope you understand my Motivation to post this.
Is support still being offered for this mod?
This is one of the reasons i don't install mods anymore.
Reply With Quote
  #1637  
Old 12-22-2006, 03:03 PM
Ziki's Avatar
Ziki Ziki is offline
 
Join Date: Nov 2005
Posts: 2,704
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have some problems with threads that contain - .They appear to not exist
Reply With Quote
  #1638  
Old 12-26-2006, 10:24 PM
zeropaid's Avatar
zeropaid zeropaid is offline
 
Join Date: Nov 2004
Location: San Diego, CA
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CustomizeVB View Post
I'm having a problem with this. The New Posts link won't work for me anymore, any suggestions?
I am having the same problem with the new posts and todays posts link. Anyone have a fix for this?

Also, not sure if related, but the quick edit functionality is now broken. I am running: 3.6.4
Reply With Quote
  #1639  
Old 12-29-2006, 06:31 PM
mtlcore mtlcore is offline
 
Join Date: Jul 2005
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Loveed the hack but I wish to completely remove it from my forums. I have uninstalled the product, removed the htaccess.

How do I completely remove it? and how to rebuilt the links?
Reply With Quote
  #1640  
Old 12-29-2006, 06:40 PM
mtlcore mtlcore is offline
 
Join Date: Jul 2005
Posts: 265
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="http://www.vrewrite.com/vrewrite-support/t-removing-everything-67.html" target="_blank">http://www.vrewrite.com/vrewrite-sup...ything-67.html</a>
Reply With Quote
  #1641  
Old 12-29-2006, 06:43 PM
Ziki's Avatar
Ziki Ziki is offline
 
Join Date: Nov 2005
Posts: 2,704
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's it.Only uninstall and remove
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 11:19 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.09800 seconds
  • Memory Usage 2,610KB
  • 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
  • (3)bbcode_php
  • (2)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
  • (3)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