User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Existing Scripts section within the Web Development category of DaniWeb, a massive community of 402,690 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,395 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Existing Scripts advertiser: Web Code Converter

The quick 'n' dirty ultra simple vBulletin SEO hack

Join Date: Dec 2004
Location: Fort Bragg, NC
Posts: 189
Reputation: mikeSQL is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 2
mikeSQL's Avatar
mikeSQL mikeSQL is offline Offline
Junior Poster

Re: The quick 'n' dirty ultra simple vBulletin SEO hack(UPDATED)

  #127  
Apr 24th, 2008
Originally Posted by cscgal View Post
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 the global_complete hook. The only difference to make is the last line should read:

  1. $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:
  1. function print_output($vartext, $sendheader = true)
  2. {
  3. global $pagestarttime, $querytime, $vbulletin;
  4. global $vbphrase, $stylevar;


For all updated and newer versions of vBulletin 3.7 which has been tested, im not quit sure for vB 3.6x though, these codes have a minor change. I hope this can get stickied somehow for the newer versions of vB incase other members would still love this wonderful SEO from the great Dani herself!

Below:
  1. $output = preg_replace($search_array, $replace_array, $output);
will not work, it will show a blank page, so as she mentioned earlier, make sure it still stands as
$vartext = preg_replace($search_array, $replace_array, $vartext);
Also, at the beginning, make sure:
  1. function print_output($vartext, $sendheader = true)
  2. {
  3. global $pagestarttime, $querytime, $vbulletin;
  4. global $vbphrase, $stylevar;
[/quote] has now changed too:
  1. function print_output($vartext, $sendheader = true)
  2. {
  3. global $pagestarttime, $querytime, $vbulletin, $show;
  4. global $vbphrase, $stylevar;
This should comeplete the file edits and update. The only file this will effect is the ./includes/functions.php . Enjoy!
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!;)
Reply With Quote  
All times are GMT -4. The time now is 5:20 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC