| | |
The quick 'n' dirty ultra simple vBulletin SEO hack
Please support our Existing Scripts advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2008
Posts: 10
Reputation:
Solved Threads: 0
cscgal, thank you for the hack!
I have VB 3.7.0 RC2 and vbAdvanced 3.0.0 installed. This hack works great for the forum part, but doesn't seem to affect the main page, which is vbAdvanced territory. My guess is that vbAdvanced doesn't use print_output function from forum.
In its cmps_index.php file it calls for this function to print the main page:
That function is defined in includes/vba_cmps_include_top.php
It may sound silly, but I cannot figure out how to rewrite urls inside that function. Does anyone have any ideas? I would truly appreciate your help!
I have VB 3.7.0 RC2 and vbAdvanced 3.0.0 installed. This hack works great for the forum part, but doesn't seem to affect the main page, which is vbAdvanced territory. My guess is that vbAdvanced doesn't use print_output function from forum.
In its cmps_index.php file it calls for this function to print the main page:
print_portal_output($home);
It may sound silly, but I cannot figure out how to rewrite urls inside that function. Does anyone have any ideas? I would truly appreciate your help!
•
•
Join Date: Mar 2008
Posts: 10
Reputation:
Solved Threads: 0
I have found a solution for vbAdvanced modules urls not rewriting. You can see the fix here:
http://www.vbadvanced.com/forum/showthread.php?t=27041
http://www.vbadvanced.com/forum/showthread.php?t=27041
•
•
Join Date: Apr 2008
Posts: 8
Reputation:
Solved Threads: 0
I learnt a valuable lesson today, DO NOT USE Dreamweaver as a text editor. I switched to Crimson and that fixed the Reverse Sort Order.
Still haven’t figured out why “Go to last post” doesn’t work and think if I did it would also fix “Go to first unread post”
You don’t have member.html or replies.html so I’ve added them below.
.htaccess
hook
Still haven’t figured out why “Go to last post” doesn’t work and think if I did it would also fix “Go to first unread post”
You don’t have member.html or replies.html so I’ve added them below.
.htaccess
RewriteRule ^member([0-9]+).html$ member.php?u=$1 [L] RewriteRule ^replies([0-9]+).html$ misc.php?do=whoposted&t=$1 [L]
hook
'#<a ([^>]*)href' . preg_quote("=\"misc.php?$session[sessionurl]do=whoposted&t=") . '([0-9]+)"#',
'#<a ([^>]*)href' . preg_quote("=\"member.php?$session[sessionurl]u=") . '([0-9]+)"#'
'<a \1href="replies\2.html"',
'<a \1href="member\2.html"' Last edited by hinksta; Apr 11th, 2008 at 10:02 pm.
•
•
•
•
Update:
I just took a look at vB 3.5. Based on what I can see - and this still goes untested - add the .htaccess file as mentioned above. Then, throw all the PHP code into theglobal_completehook. The only difference to make is the last line should read:
php Syntax (Toggle Plain Text)
$output = preg_replace($search_array, $replace_array, $output);
We're doing a find/replace on the parsed $output instead of the raw $vartext because, quite simply, a hook doesn't exist earlier in the function. So hopefully it will work.
If for whatever reason that above hook doesn't work, the fail-safe way that will 100% work in vB 3.5 is to add the exact code as in the original tutorial below:
php Syntax (Toggle Plain Text)
function print_output($vartext, $sendheader = true) { global $pagestarttime, $querytime, $vbulletin; global $vbphrase, $stylevar;
Below:
php Syntax (Toggle Plain Text)
$output = preg_replace($search_array, $replace_array, $output);
$vartext = preg_replace($search_array, $replace_array, $vartext);
php Syntax (Toggle Plain Text)
function print_output($vartext, $sendheader = true) { global $pagestarttime, $querytime, $vbulletin; global $vbphrase, $stylevar;
php Syntax (Toggle Plain Text)
function print_output($vartext, $sendheader = true) { global $pagestarttime, $querytime, $vbulletin, $show; global $vbphrase, $stylevar;
dynastyCODERS#1 when it comes to Programming Tutorials, Database designs and discussions, Operating Systems, you name it, check us out and drop us a line to tell us your opinions on any and everything in mind!;)
•
•
Join Date: Apr 2008
Posts: 8
Reputation:
Solved Threads: 0
Although this mod does work on 3.6.9 some off my rewrites are not as they are here on DaniWeb, also it breaks the urls in the archive from archive/index.php/f-1.html to archive/index.php?f-1.html so I have two questions.
1: Are you still using this mod yourself here at DaniWeb if so do you have an update to include the missing rewrites you have here?
2: Is this mod still supported?
1: Are you still using this mod yourself here at DaniWeb if so do you have an update to include the missing rewrites you have here?
2: Is this mod still supported?
I am only using up to 3.6.8, and I continue to use $output.
This hack was nevery really supported. It is something I wrote for DaniWeb, implemented on DaniWeb, and then decided to share what was working for me.
As time allows, I periodically stop by and see if I can help anyone out, but that time has gotten scarce over the past year.
Over the course of the past few years, I've added additional rules to the version I personally use, but it is still majorly based off of what I've released here.
After vBulletin 3.7 goes gold, and I am forced into upgrading my own sites to a 3.7 version of this hack, I will most likely offer the 3.7 version that I'll be using in the form of a product xml file.
This hack was nevery really supported. It is something I wrote for DaniWeb, implemented on DaniWeb, and then decided to share what was working for me.
As time allows, I periodically stop by and see if I can help anyone out, but that time has gotten scarce over the past year.
Over the course of the past few years, I've added additional rules to the version I personally use, but it is still majorly based off of what I've released here.
After vBulletin 3.7 goes gold, and I am forced into upgrading my own sites to a 3.7 version of this hack, I will most likely offer the 3.7 version that I'll be using in the form of a product xml file.
•
•
Join Date: May 2008
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
I am only using up to 3.6.8, and I continue to use $output.
This hack was nevery really supported. It is something I wrote for DaniWeb, implemented on DaniWeb, and then decided to share what was working for me.
As time allows, I periodically stop by and see if I can help anyone out, but that time has gotten scarce over the past year.
Over the course of the past few years, I've added additional rules to the version I personally use, but it is still majorly based off of what I've released here.
After vBulletin 3.7 goes gold, and I am forced into upgrading my own sites to a 3.7 version of this hack, I will most likely offer the 3.7 version that I'll be using in the form of a product xml file.
Cheers Dani! I began using vbulletin 2 days ago so....i'm going to wait for the xml instead of attempting to DIY my interpretation of the thread's 13 pages
Last edited by callumbush; May 4th, 2008 at 9:30 pm.
![]() |
Similar Threads
- vBulletin + SEO hack + vBadvanced CMPS (Existing Scripts)
Other Threads in the Existing Scripts Forum
- Previous Thread: Vbulletin
- Next Thread: Need a tool to measure distance on virtual earth
| Thread Tools | Search this Thread |







