943,708 Members | Top Members by Rank

Ad:
You are currently viewing page 13 of this multi-page discussion thread; Jump to the first page
Apr 7th, 2008
0

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

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hinksta is offline Offline
8 posts
since Apr 2008
Apr 7th, 2008
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hinksta is offline Offline
8 posts
since Apr 2008
Apr 8th, 2008
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hinksta is offline Offline
8 posts
since Apr 2008
Apr 10th, 2008
0

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

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!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
osjak is offline Offline
10 posts
since Mar 2008
Apr 11th, 2008
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
osjak is offline Offline
10 posts
since Mar 2008
Apr 11th, 2008
0

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

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 10:02 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hinksta is offline Offline
8 posts
since Apr 2008
Apr 24th, 2008
0

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

Click to Expand / Collapse  Quote originally posted by cscgal ...
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:

php Syntax (Toggle Plain Text)
  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:
php Syntax (Toggle Plain Text)
  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:
php Syntax (Toggle Plain Text)
  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:
php Syntax (Toggle Plain Text)
  1. function print_output($vartext, $sendheader = true)
  2. {
  3. global $pagestarttime, $querytime, $vbulletin;
  4. global $vbphrase, $stylevar;
[/QUOTE] has now changed too:
php Syntax (Toggle Plain Text)
  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!
Reputation Points: 16
Solved Threads: 3
Junior Poster
mikeSQL is offline Offline
196 posts
since Dec 2004
Apr 25th, 2008
0

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

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
hinksta is offline Offline
8 posts
since Apr 2008
Apr 26th, 2008
0

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

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.
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
May 4th, 2008
0

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

Click to Expand / Collapse  Quote originally posted by cscgal ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
callumbush is offline Offline
2 posts
since May 2008
Message:
Previous Thread in Configuring Readymade Scripts Forum Timeline: Setting Up ColorBox(jQuery Modal window) In Blogger
Next Thread in Configuring Readymade Scripts Forum Timeline: how to create a custom category on opencart





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC