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 374,439 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,995 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:
Views: 46641 | Replies: 135
Reply
Join Date: Apr 2008
Posts: 8
Reputation: hinksta is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hinksta hinksta is offline Offline
Newbie Poster

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

  #121  
Apr 7th, 2008
If I click to view a new post in a thread say newpostinthread118html when the page is loaded the url has changed to showthread.php?p=401#post401 not the rewrite url.
Is this the way it should be or have I messed something up?
Reply With Quote  
Join Date: Apr 2008
Posts: 8
Reputation: hinksta is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hinksta hinksta is offline Offline
Newbie Poster

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

  #122  
Apr 7th, 2008
I just noticed you answered this in post #10

Could you let me know how to edit the php files to have the "go to first uread post" and "go to last post" with the rewrite?

please please please
Reply With Quote  
Join Date: Apr 2008
Posts: 8
Reputation: hinksta is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hinksta hinksta is offline Offline
Newbie Poster

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

  #123  
Apr 8th, 2008
I’m no longer so sure this works with 3.6.9. The following links work here on daniweb but not on my default 3.6.9

Reverse Sort Order
Member Profile
Go to last post
Go to first unread post
Reply With Quote  
Join Date: Mar 2008
Posts: 6
Reputation: osjak is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
osjak osjak is offline Offline
Newbie Poster

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

  #124  
Apr 10th, 2008
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:
print_portal_output($home);
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!
Reply With Quote  
Join Date: Mar 2008
Posts: 6
Reputation: osjak is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
osjak osjak is offline Offline
Newbie Poster

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

  #125  
Apr 11th, 2008
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
Reply With Quote  
Join Date: Apr 2008
Posts: 8
Reputation: hinksta is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hinksta hinksta is offline Offline
Newbie Poster

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

  #126  
Apr 11th, 2008
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
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&amp;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 9:02 pm.
Reply With Quote  
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  
Join Date: Apr 2008
Posts: 8
Reputation: hinksta is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
hinksta hinksta is offline Offline
Newbie Poster

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

  #128  
Apr 25th, 2008
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?
Reply With Quote  
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,873
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 108
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

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

  #129  
Apr 26th, 2008
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.
Reply With Quote  
Join Date: May 2008
Posts: 2
Reputation: callumbush is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
callumbush callumbush is offline Offline
Newbie Poster

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

  #130  
May 4th, 2008
Originally Posted by cscgal View Post
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 8:30 pm.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Existing Scripts Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Existing Scripts Forum

All times are GMT -4. The time now is 12:15 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC