vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - DC SEO vB URL Rewrite (https://vborg.vbsupport.ru/showthread.php?t=91324)

xtreme-mobile 10-23-2005 11:32 AM

how do i know idf this is working? im a little confused as to what this does

this is what shows as a link to a thread after installing (i cant see any difference)


this is a show thread

http://www.talk-365.com/forum/showth...=1237#post1237

should it have .html in there somewhere? does this mean its not working? im confused lol

UPDATE when i go into a thread it now shows like this

http://www.talk-365.com/forum/t75-kids-suggestions.html

does this mean its working 100% now?

dn lodge 10-23-2005 11:39 AM

Quote:

Originally Posted by deathemperor
would you like to share the xml file of the edited plugin ?

also what about the showthread url if I don't want to display the thread title on url ?

thanks for your help

ok I got some time.

I'll just give you my whole xml file I edited. If you go into plugin manager, and then click edit on the first listed file for this hack, this is what you have to replace. Leave the 2nd url mod rewrite file alone.

heres my global_complete
Please note, for this XML file to work, you must have the same .htaccess code as me, as this is configured to display forums as forum-14.html and threads the defualt way except this removes the "t" that was before the topic number. So if you want to use my XML, replace your current .htaccess with the following...

Code:

RewriteEngine On
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?f=$1 [L]
RewriteRule ^([0-9]+)(((-p)([0-9]+))?)([A-Za-z0-9\-]+)\.html$ showthread.php?t=$1&page=$5&pp=10 [L]

and your global_complete with the following..

PHP Code:

// lets fix the forum links in the navbar
if(THIS_SCRIPT == 'forumdisplay' OR THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'newreply')
{
    
preg_match_all('/<a href="forumdisplay\.php\?f=([0-9]+)">(.*?)<\/a>/i'$GLOBALS['navbits']['breadcrumb'], $nnavbits);
    
$size sizeof($nnavbits[1]);
    for(
$i 0$i <= $size$i++)
    {
        
$output str_replace('forumdisplay.php?f=' $nnavbits[1][$i] . '"''f' $nnavbits[1][$i] . '-' strtolower(str_replace('--''-'preg_replace('/[^A-Za-z0-9-]+/i'''str_replace(' ''-'$nnavbits[2][$i])))) . '.html"'$output);
    }
}

// we better do the same here on forumhome and forumdisplay
if(THIS_SCRIPT == 'index' OR THIS_SCRIPT == 'forumdisplay')
{
    
preg_match_all('/<a href="forumdisplay\.php\?f=([0-9]+)">(.*?)<\/a>/i'$GLOBALS['forumbits'], $seobits);
    
$size sizeof($seobits[1]);
    for(
$i 0$i $size$i++)
    {
        if(!
preg_match('/forum_link\.gif".*?forumdisplay.php\?f=' $seobits[1][$i] . '/is'$GLOBALS['forumbits']))
        {
            
$output str_replace('forumdisplay.php?f=' $seobits[1][$i] . '"''forum-' $seobits[1][$i] . '' strtolower(str_replace('--''-'preg_replace('/[^0-9]+/i'''str_replace(array(' ''<strong>''</strong>'), array('-'''''), $seobits[2][$i])))) . '.html"'$output);
        }
    }
}

// we need to fix the thread links and also the multi-page thread links on forumdisplay
if(THIS_SCRIPT == 'forumdisplay')
{
        
// normal thread bits
     
if(!empty($GLOBALS['threadbits']))
     {
            
preg_match_all('/<a href="showthread\.php\?t=([0-9]+)" id="(.*)">(.*?)<\/a>/i'$GLOBALS['threadbits'], $seobits2);
            
$size sizeof($seobits2[1]);
            for(
$j 0$j $size$j++)
            {
                   
$output str_replace('showthread.php?t=' $seobits2[1][$j] . '"''' $seobits2[1][$j] . '-' strtolower(str_replace('--''-'str_replace(' ''-'preg_replace('/[^\sA-Za-z0-9]+/'''$seobits2[3][$j])))) . '.html"'$output);
            }
    }
    
        
// normal thread bits
     
if(!empty($GLOBALS['threadbits_sticky']))
     {
            
preg_match_all('/<a href="showthread\.php\?t=([0-9]+)" id="(.*)">(.*?)<\/a>/i'$GLOBALS['threadbits_sticky'], $stickybits);
            
$size sizeof($stickybits[1]);
            for(
$j 0$j $size$j++)
            {
                   
$output str_replace('showthread.php?t=' $stickybits[1][$j] . '"''' $stickybits[1][$j] . '-' strtolower(str_replace('--''-'str_replace(' ''-'preg_replace('/[^\sA-Za-z0-9]+/'''$stickybits[3][$j])))) . '.html"'$output);
            }
    }
        
        
// do pagenav
        
if(substr_count($GLOBALS['threadbits'], 'page=') > 0)
        {
               
preg_match_all('/<a href="showthread\.php\?t=([0-9]+)&amp\;page=([0-9]+)">(.*?)<\/a>/i'$GLOBALS['threadbits'], $lala);
               
$somesize sizeof($lala[1]);
               for(
$i 0$i <= $somesize$i++)
               {
                   
$tid $lala[1][$i];
                   
preg_match('/<a href="showthread\.php\?t=(' $tid ')" id="(.*)">(.*)<\/a>/i'$GLOBALS['threadbits'], $somematch);
                   
$output str_replace(
                       
'showthread.php?t=' $lala[1][$i] . '&amp;page=' $lala[2][$i], 
                       
'' $lala[1][$i] . '-p' $lala[2][$i] . '-' strtolower(str_replace('--''-'str_replace(' ''-'preg_replace('/[^\sA-Za-z0-9]+/'''$somematch[3])))) . '.html"'$output
                   
);
                   unset(
$tid$somematch);
               }
        }
}

// we need to rewrite the pagenav links on showthread and also similar threads O_.
if(THIS_SCRIPT == 'showthread')
{
    
// do pagenav
        
if($GLOBALS['totalposts'] > $GLOBALS['perpage'])
        {
            
preg_match_all('/<a class="smallfont" href="showthread\.php\?t=([0-9]+)(&amp\;page=([0-9]+))?&amp\;pp=([0-9]+)".*>(.*?)<\/a>/i'$GLOBALS['pagenav'], $seobits3);
            
$size2 sizeof($seobits3[1]);
            for(
$k 0$k $size2$k++)
            {
                if(
$seobits3[2][$k] != '')
                {
                
$output str_replace('showthread.php?t=' $seobits3[1][$k] . '&amp;page=' $seobits3[3][$k] . '&amp;pp=' $seobits3[4][$k], '' $seobits3[1][$k] . '-p' $seobits3[3][$k] . '-' strtolower(str_replace('--''-'str_replace(' ''-'preg_replace('/[^\sA-Za-z0-9]+/'''$GLOBALS['thread']['title'])))) . '.html"'$output);
            }
            else
            {
                
$output str_replace('showthread.php?t=' $seobits3[1][$k] . '&amp;pp=' $seobits3[4][$k], '' $seobits3[1][$k] . ($seobits3[1][$k] == '' '-p' $seobits3[3][$k]) . '-' strtolower(str_replace('--''-'str_replace(' ''-'preg_replace('/[^\sA-Za-z0-9]+/'''$GLOBALS['thread']['title'])))) . '.html"'$output);
            }
            }
        }
        
// do similar threads
        
if($GLOBALS['vboptions']['showsimilarthreads'] AND $GLOBALS['thread']['similar'])
        {
            
preg_match_all('/<a href="showthread\.php\?t=([0-9]+)">(.*?)<\/a>/i'$GLOBALS['similarthreads'], $seobits4);
               
$yetanothervar sizeof($seobits4[1]);
               for(
$l 0$l $yetanothervar$l++)
               {
                   
$output str_replace('showthread.php?t=' $seobits4[1][$l] . '"''' $seobits4[1][$l] . '-' strtolower(str_replace('--''-'str_replace(' ''-'preg_replace('/[^\sA-Za-z0-9]+/'''$seobits4[2][$l])))) . '.html"'$output);
               }
        }



I hope I helped someone or anyone! If you need any help...

aim: daredevilbp
msn: neomania60@hotmail.com
- Credits to www.DnLodge.com

dn lodge 10-23-2005 11:40 AM

yes, its working, your probably just didnt refresh your page aftyer install or something. If you didnt know what this did, it creates most of your forum files to .html so its alot more navigatable for search engines.

Quote:

Originally Posted by xtreme-mobile
how do i know idf this is working? im a little confused as to what this does

this is what shows as a link to a thread after installing (i cant see any difference)


this is a show thread

http://www.talk-365.com/forum/showth...=1237#post1237

should it have .html in there somewhere? does this mean its not working? im confused lol

UPDATE when i go into a thread it now shows like this

http://www.talk-365.com/forum/t75-kids-suggestions.html

does this mean its working 100% now?


xtreme-mobile 10-23-2005 11:49 AM

nice one thanks for fast response

look forward to seeing some good results

clicked install ;)

Zhen-Xjell 10-24-2005 09:46 PM

Hi folks, I have this installed. As an FYI, I have modified this to permit non-english characters to be enhanced (at least for the extended ASCII such as ?????, etc). This applies for the topics and the forums.

This is very similar to my SEO hack for all the *Nuke/phpbb sites:

http://googletap.com

Great work on getting this hack working. I know there is the commercial vbSEO hack, however, with some help, we can make this free one better if folks are interested.

Nutz 10-24-2005 09:56 PM

This is a very good hack. Good work Dean C.

PS: I'm loving the Johnny Cash Pic :)

Thanks,
Mat

Lizard King 10-24-2005 10:43 PM

Quote:

Originally Posted by Zhen-Xjell
Hi folks, I have this installed. As an FYI, I have modified this to permit non-english characters to be enhanced (at least for the extended ASCII such as ?????, etc). This applies for the topics and the forums.

This is very similar to my SEO hack for all the *Nuke/phpbb sites:

http://googletap.com

Great work on getting this hack working. I know there is the commercial vbSEO hack, however, with some help, we can make this free one better if folks are interested.

may i ask how did you permit non english characters :)

Zhen-Xjell 10-24-2005 11:36 PM

Quote:

Originally Posted by Lizard King
may i ask how did you permit non english characters :)

Sure, let me get my site finalized (its a new install) and I'll make the data available. :) Should take a day or two.

vau7 10-25-2005 03:27 AM

One Problem: Have you ever moved 1 Posting into another Thread?
In this case you have to give vBulletin a URL of the Thread where the Post has to be moved, and unfornatelty vB doesnt want to take the new URLs.

I wrote this little workaround for my moderators, you can use it for yours:

Quote:





I hope this Bug will be fixed.

D|ver 10-25-2005 02:18 PM

Quote:

Originally Posted by Zhen-Xjell
Sure, let me get my site finalized (its a new install) and I'll make the data available. :) Should take a day or two.

thank you
i could use that too :D

Dean C 10-25-2005 03:42 PM

I'm not 100% on this but what does the W3C schema say about non-english characters in URI's?

Greivog 10-26-2005 05:45 PM

Is there a way to get this working on windows based servers?

Thanks

Paul

peety 10-27-2005 01:43 PM

Has the 301 permanent redirect issue been solved in this release?

Nutz 10-27-2005 08:47 PM

Is there any chance of getting the "Last Post" links on the forum home to be the same SEO format?

Thanks,
Mat

xtreme-mobile 10-28-2005 05:31 PM

how can we get it to convert the actual post them selves? can this be done cos all its doing on mine is the thgread titles not the actaual post?

any one know?

cheers

mfizzel 10-28-2005 06:35 PM

Dean C thank you so much for all of your work on this, I've yet to install (haven't upgraded to 3.5 from 3.0.x) but I'm following this thread very closely and this will be one of the first plugins I install for my 3.5 board.

I also look forward to your latest update of this code that you mentioned, I'd also be happy to donate towards this project - the time you spend on this is greatly appreciated :)

yinyang 10-29-2005 08:41 AM

this is working great for my forum titles. but the thread titles aren't showing the titles. any ideas what may be wrong?

Nutz 10-29-2005 03:04 PM

Got a link yinyang?

Thanks,
Mat

mfizzel 10-30-2005 02:48 AM

I installed it, it installed flawlessly.

My forum titles and thread titles are all now in .html format with proper thread titles, this is quite awesome :D...I've yet to run into any issues, but I've only been running it for today.

[high]* mfizzel clicks install[/high]

StarBuG 10-30-2005 03:27 PM

Hi

Thank you for this plugin but there is an issue.

I have specified a subforum as a link.
The rewrite works just fine up to the link forum.
After that all urls are the normal forum urls with no rewrite.

take a look:
http://www.hiphop-battles.com/forum/index.php
(below "Beatbox Tutorials" it stops)

the issue is only present on the index page.

Any idea where the problem is?

Dean C 10-30-2005 04:36 PM

It's fixed in the latest beta. I have a user who is kind enough to be testing it at the moment :) And no I won't rewrite lastpost URLs for reasons stated earlier in the thread :)

StarBuG 10-30-2005 06:25 PM

Quote:

Originally Posted by Dean C
It's fixed in the latest beta. I have a user who is kind enough to be testing it at the moment :) And no I won't rewrite lastpost URLs for reasons stated earlier in the thread :)

If you need more beta tester let me know ;)

Glovebox 10-30-2005 06:39 PM

Installed & promptly uninstalled. Even with the newest version it didnt list correctly any forums that are listed under forums that are links.

mfizzel 10-30-2005 07:24 PM

DC, if you could release a google sitemap hack that works with this, you'd be KING :D

ILTK 10-30-2005 09:21 PM

Quote:

Originally Posted by Dean C
It's fixed in the latest beta. I have a user who is kind enough to be testing it at the moment :) And no I won't rewrite lastpost URLs for reasons stated earlier in the thread :)

Woot, last thing I was waiting for was the forum clean urls working when you have subforums as links in the cell headers, super :)

But, wouldnt the lastpost be tagged as duplicate though? - there is the clean url pointing to the thread, and then the lastpost is still php?

I guess it's easy to get around, you can just do a conditional and check if the visitor is logged in, if they are then show the lastpost links, if not, don't show them. I allready do that with the print-thread link, I have seen google bot spider the print-thread links even with rel=nofollow on it, don't know if it indexes it, but you never know.

ILTK 10-30-2005 09:59 PM

Subforums as links in the cell headers on forumhome still doesn't work.

After some messing around with different settings, as far as I can tell, as soon as you have a forum where you have it setup so the subforums shows as links in the tablecell below, AND you set the parent forum to 'act as forum=yes' then the rewrite will stop working from that point on.

This setup causes rewrite links to stop working:

Main forum (Act as forum=yes)
-- subforum1 subforum2 subforum 3
(Any forums below this point is also not rewritten no matter what settings)

If I have the same setup and set 'Main forum' in the example above to 'Act as forum=no' then everything works.

Hope this helps a little figuring out this bug.

EDIT: add to the above, if you have any subforum in the above setup where it is a link (Enter an url in 'Forum Link') then it also stops working.

Zhen-Xjell 10-31-2005 12:21 AM

We have second, third and forth tier subforums displaying and re-writing with no issues.

ILTK 10-31-2005 02:02 PM

Quote:

Originally Posted by Zhen-Xjell
We have second, third and forth tier subforums displaying and re-writing with no issues.

Try and add a subforum that is a link (Add forum, enter 'Forum Link')

Like this:

Main Forum
--Subfoum
---- ChildForum1 Childforum2(Link) <= Stops working from here and any forums after.

No biggie, I can live without that functionallity, I'll just ad the links I had like that to the navbar or something.

StarBuG 10-31-2005 02:21 PM

Quote:

Originally Posted by ILTK
Try and add a subforum that is a link (Add forum, enter 'Forum Link')

Like this:

Main Forum
--Subfoum
---- ChildForum1 Childforum2(Link) <= Stops working from here and any forums after.

No biggie, I can live without that functionallity, I'll just ad the links I had like that to the navbar or something.

He has a working beta that is currently tested before release so be patient ;)

Zhen-Xjell 10-31-2005 02:33 PM

Quote:

Originally Posted by ILTK
Try and add a subforum that is a link (Add forum, enter 'Forum Link')

Like this:

Main Forum
--Subfoum
---- ChildForum1 Childforum2(Link) <= Stops working from here and any forums after.

No biggie, I can live without that functionallity, I'll just ad the links I had like that to the navbar or something.

I understand, let me try it.

Dean C 10-31-2005 03:25 PM

Quote:

Originally Posted by ILTK
Subforums as links in the cell headers on forumhome still doesn't work.

After some messing around with different settings, as far as I can tell, as soon as you have a forum where you have it setup so the subforums shows as links in the tablecell below, AND you set the parent forum to 'act as forum=yes' then the rewrite will stop working from that point on.

This setup causes rewrite links to stop working:

Main forum (Act as forum=yes)
-- subforum1 subforum2 subforum 3
(Any forums below this point is also not rewritten no matter what settings)

If I have the same setup and set 'Main forum' in the example above to 'Act as forum=no' then everything works.

Hope this helps a little figuring out this bug.

EDIT: add to the above, if you have any subforum in the above setup where it is a link (Enter an url in 'Forum Link') then it also stops working.

As I have said earlier in the thread, this bug has been fixed in the latest beta. I don't have time to release this beta right now but shall do in the next 1-2 weeks (unless someone wants to do my essays ;)).

ILTK 10-31-2005 11:11 PM

Quote:

Originally Posted by Dean C
As I have said earlier in the thread, this bug has been fixed in the latest beta. I don't have time to release this beta right now but shall do in the next 1-2 weeks (unless someone wants to do my essays ;)).

Ah, sorry I read it as you had updated it allready

Brandon Sheley 11-01-2005 06:47 AM

this look good, i clicked install just so i can track it, more then likely ill try it :D

i went ahead and installed. .works great :) thx
and best of all, its not 150$..hehe

RobK 11-01-2005 07:43 AM

There's another bug, so it is no langer possible to join 2 threads in a new on with this extension installed ...

Dean C 11-02-2005 02:52 PM

Quote:

Originally Posted by RobK
There's another bug, so it is no langer possible to join 2 threads in a new on with this extension installed ...

I'm aware of this, I don't have time to look right now as I'm online in class, but I'm sure there's a nice little plugin location that we can use to solve this problem :)

SB2002 11-02-2005 04:58 PM

Installed, works perfectly on 3.5.1. I have one question though, on vbadvanced the individual news posts on the main page don't use the optimised code when you click on the news item, is there any way I can fix this or should I just leave it as is?

BTW, i have to say, great hack, thanks for bringing it to the masses for free :D

yinyang 11-02-2005 05:46 PM

Quote:

Originally Posted by Nutzz
Got a link yinyang?

Thanks,
Mat

yup, Studio City Forum .

thanks for looking into it. i greatly appreciate it. the forums show up properly, but the threads don't. weird!

Dean C 11-03-2005 07:01 AM

Quote:

Originally Posted by SB2002
Installed, works perfectly on 3.5.1. I have one question though, on vbadvanced the individual news posts on the main page don't use the optimised code when you click on the news item, is there any way I can fix this or should I just leave it as is?

BTW, i have to say, great hack, thanks for bringing it to the masses for free :D

The way I optimize this is on a per-need basis. vBadvanced is a third-party script and I have no idea how it works. If someone wants to look into what the THIS_SCRIPT constant is in the vBadvanced file and whether or not it uses its own global.php/init.php, and contributes code which follows the current structure, I'll include it in the release. But i'd rather not get into providing support for third-party addons :)

Dean C 11-03-2005 07:02 AM

Quote:

Originally Posted by yinyang
yup, Studio City Forum .

thanks for looking into it. i greatly appreciate it. the forums show up properly, but the threads don't. weird!

Your threads appear rewritten for me.

gael11 11-03-2005 08:19 AM

Sorry if the question have been asked but is it possible to rewrite this letters: ? ? ? because in french theirs are very used. Thanks ;)


All times are GMT. The time now is 05:50 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.01996 seconds
  • Memory Usage 1,937KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (17)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