vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   vRewrite - SEOed URLs for vBulletin (https://vborg.vbsupport.ru/showthread.php?t=104484)

bollie 10-15-2006 10:33 AM

Supported ???? https://vborg.vbsupport.ru/showthread.php?t=128807

paulgrimshaw 10-15-2006 04:06 PM

Hi,
This is a great mod, but I am having trouble. when I goto my site http://www.madmash.com/forum it is getting redirected to http://madmash.com/forum.

Any idea why this is and how to fix?

Thanks,
Paul.

misterserveur 10-18-2006 03:43 PM

Hi ! thanks for this mod.

I enabled the following options (vRewrite 1.5.1 on vb 3.6.0)
- Showthread.php: Next&Prev
- External.php

But it doesn't rewrite the next/prev links, neither the links in external.php

How can I fix that ? Thanks.

StarBuG 10-20-2006 01:57 PM

Hi

I have a few problems and found a few bugs:

I have just installed the latest version 1.5.1 (new install) on vB 3.6.2.


All threads that are read with forum name rewrite on are unknown locations in WOL.

Unknown location
/chat-ecke/t-anonymes-schreiben-von-beitragen-ist-nun-moglich-885.html

I have used the vrewrite_htaccess file to generate my htaccess

There are a few other problems/bugs:

1: the search of "search-getdaily.html/search.php?searchid=XX" does only show images if you add <base href="$vboptions[bburl]/" /> to the search_results template as well ;)
2: "Latest threads on forum home" are not rewritten. Any chance this can be changed?
3: your textfile hacksNfixes.txt is missing the important hack/fix parts. It shows like:
Quote:

6. Members who have visited https://vborg.vbsupport.ru/showthread.php?t=82769
==========================
SEARCH FOR:

==========================
BELOW ADD:
==========================
I would need the instructions but can't find them :(

Any ideas how to fix these?

Ahh and one more question.
Is it possible to rewrite german umlaute like ? ? ? ? into ae oe ue ss ?

StarBuG

ps: Thanks for providing this great hack for free.

ShadowOne 10-20-2006 02:12 PM

No Thread specified. If you followed a valid link, please notify the administrator

I Keep Gettin That...

ShadowOne 10-20-2006 02:20 PM

Ahhh...NM....I Did The Generator...Great Hack!

Actually...The Member Bit Doesnt Work COrrectly...It Throws My Avatar Image Off...

Keyser Soze 10-20-2006 03:36 PM

Quote:

Originally Posted by StarBuG
Is it possible to rewrite german umlaute like ? ? ? ? into ae oe ue ss ?

Yes of course you can transform german umlauts to "ae", "ue" etc with my little hack right here.
Na klar kannst du deutsche Umlaute mit meinem kleinen Hack hier in "ae", "ue" etc umwandeln, so dass sie nicht komplett entfernt werden. :)

I am using this piece of code for my own forum.

REPLACE:
PHP Code:

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);


WITH:
PHP Code:

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 str_replace('?''ae'$txt);
    
$txt str_replace('?''oe'$txt);
    
$txt str_replace('?''ue'$txt);
    
$txt str_replace('?''ss'$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);



StarBuG 10-20-2006 03:55 PM

Thanks for your help, that worked.

For everyone who wants to use it also.
You need to modify the "vRewrite - Redirect handling" plugin ;)

Keyser Soze 10-20-2006 04:06 PM

Yes, or change the XML-file directly...

Martin64 10-21-2006 10:36 PM

Lovely hack, just tried it on one board, unfortunately I had to uninstall it after a few minutes, it caused too much server load.

It's a quite busy forum though (usually +1000 online, currently nearly 3000). I'll bookmark this and come back after server upgrades :P

raiderlax 10-22-2006 02:01 AM

When will it work for 3.6.2?

StarBuG 10-22-2006 09:35 AM

It does work with 3.6.2
I have it running on mine: www.patientenfragen.net

:Judge: 10-27-2006 07:15 AM

Well this has been very interesting, I some how "broke" my DC SEO and ended up replacing that with this here. Had a few problems with links and such but I think I got them all but one fixed.

Is there any chance in getting the user profile pages to something more simple like www.yoursite.com/forum/username ?

Other then that with the addon everything seems OK so far.

StarBuG 10-27-2006 10:37 AM

Is this hack still developed?

5wayshosting 10-27-2006 09:06 PM

Is this little script ok for 3.61 version?

:Judge: 10-27-2006 09:52 PM

Quote:

Originally Posted by 5wayshosting
Is this little script ok for 3.61 version?

It works just fine on my 3.6.2 forums, only trouble I have is with some of my addons but looks like I am working out those kinks as well.

StarBuG 10-28-2006 04:37 AM

Quote:

Originally Posted by :Judge:
It works just fine on my 3.6.2 forums, only trouble I have is with some of my addons but looks like I am working out those kinks as well.

With which of your addons does vrewrite has problems?

And do you have a fix for them?
Would you share your fixes?

bollie 10-29-2006 12:29 PM

Someone can help me ? https://vborg.vbsupport.ru/showthread.php?t=128807

veenu 10-31-2006 04:52 AM

Hi,
I m using V-bullatein forum 3.6.0. I have used the Vwrite to impliment url rewriting. Its working fine. But for some pages it creating problems.
The pages includes memebers list where while clicking on the "all threads by the perticular user" i found no page but an error that "page not found" . similar errors with the "todays post" and "new post" as well.

Other then this i am also facing error on the "quick link" page where "my profile" page not working.

If one workout these all sorts of error please post the solution.

Infinity.:(

ben07 11-03-2006 07:19 PM

I tired this on my board, and nothing happened?.

I'm running VB3.6.2

bollie 11-04-2006 06:51 AM

nice

masterross 11-05-2006 09:40 AM

i have problem with different styles.
images are rewrite wrong:
Code:

http://www.my-forum.com/moderator-admin-discussion/images/techtwo/buttons/edit.gif
should be:
Code:

http://www.my-forum.com/images/techtwo/buttons/edit.gif
Code:

moderator-admin-discussion/
is the sub-forum titile

aveon 11-05-2006 09:11 PM

hey man why do i get this error

The requested URL /forum/dini-filmler/t-onun-babasi-abdulmuttalibin-kurbani-3836-new.html was not found on this server.

:Judge: 11-07-2006 02:30 AM

One thing I have noticed is that in my whos been online within 24 hours not all the names link right. Most don't work while some do.

I may remove this, I have had more problems then I care to have. Granted it may help with search engines but im not worried about search engines being able to find their way around my site, its more important to me that members can get around without getting "Page Not Found"

blogtorank 11-16-2006 04:34 PM

Quote:

Originally Posted by bollie (Post 1110472)
I uninstall no Supported




ROFL, it's free man.... What do you expect? That's what these forums are here for!

Anyhow good job on this hack and it works great!!!

redlabour 11-16-2006 04:50 PM

Quote:

Known Issues

There are no known issues with the latest release (1.0).
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.

Quote:

Originally Posted by :Judge: (Post 1112122)
One thing I have noticed is that in my whos been online within 24 hours not all the names link right. Most don't work while some do.

I may remove this, I have had more problems then I care to have. Granted it may help with search engines but im not worried about search engines being able to find their way around my site, its more important to me that members can get around without getting "Page Not Found"

Correct !

Quote:

Originally Posted by blogtorank (Post 1118739)
ROFL, it's free man....

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.

aveon 11-22-2006 01:24 AM

hey man why do i get this error


Quote:

query: 5 - used to title member info7,10,10,10,10,10,10,7,7,7,7,7,7,7,7,7,7,7,3,7, 3,89,11,11,11,89,11,7,584,583,582,581,11,89
query: 6 - used to find last poster4829,4845,3287,4375,4574,4828,29,4425,48,382 2,264,227,3836,2428,4853,3112,4860,4250,4835,4012, 4620,3831,114,4803,2558,4859,4850,4871,4846,4564,4 487,4801,4373,4834,3189,919,4722,1163,3944,4514,24 87,4800,4863,3698,4673,4202,4374,3557,4852,4856,38 45,2662,4570,4668,4649,4827,4253,4123,3718,3979,19 70,4869,164,4318,4319,1020,4711,2445
query: 7 - used to find lastposter4871,4870,4850,3718,4869,4868,4867,4866, 4865,4864
total time: 0,68117

dadimes 11-29-2006 09:13 PM

Quote:

Originally Posted by lightwave (Post 1046253)
Oh yeh, in your instructions you have:

3) In forumdisplay, showthread, standard_error find:
$headinclude
Add before that:
<base href="$vboptions[bburl]/" />


Step #3 should also be done to MemberInfo (template) if you want the settings for members/username-id.html to work

AWESOME! This finally got my member rewrites to work

monstermunch 12-01-2006 11:15 PM

Hi,
Im looking at the mod and sounds interesting, i just wondered how all the users who have installed this found it affected their forums, has it helped?

How would the rewrite effect and forum thats already up and running, any inital negative results?

thanks

bollie 12-02-2006 06:23 AM

This hack seems to break the AJAX feature on the 'AJAX Post Thanks' hack. fix ??

monstermunch 12-05-2006 01:21 PM

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

McCarroll21 12-10-2006 11:36 AM

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.

minorgod 12-12-2006 10:14 PM

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>'


CustomizeVB 12-13-2006 09:52 PM

I'm having a problem with this. The New Posts link won't work for me anymore, any suggestions?

imported_infitech 12-13-2006 11:58 PM

Quote:

Originally Posted by redlabour (Post 1118754)
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.

Ziki 12-22-2006 03:03 PM

I have some problems with threads that contain - .They appear to not exist :)

zeropaid 12-26-2006 10:24 PM

Quote:

Originally Posted by CustomizeVB (Post 1138085)
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

mtlcore 12-29-2006 06:31 PM

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?

mtlcore 12-29-2006 06:40 PM

<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>

Ziki 12-29-2006 06:43 PM

That's it.Only uninstall and remove


All times are GMT. The time now is 08:07 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03399 seconds
  • Memory Usage 2,204KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (5)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete