![]() |
| ||
| The quick 'n' dirty ultra simple vBulletin SEO hack This is a very quick 'n' simple vBulletin SEO hack. It's easy to apply and it's the one I have been using here on DaniWeb for the past couple of months. I was going to wait until we went vB 3.5 to release it but I might as well do so now ... Disclaimer: This is for vBulletin 3.0.x. It should not be too complicated to port to 3.5 with their hooks system, but I have no experience with 3.5 and therefore don't want to say one way or another. If you use this hack, please link to DaniWeb in your footer. This is a free hack, and it can make or break the traffic to your site. I don't know of any other freely available hacks like this one. Please help us out in exchange for releasing this! STEP 1: Create an .htaccess file in your forum directory and put the following into it: Options +FollowSymLinks STEP 2: In the includes/functions.php file, below function print_output($vartext, $sendheader = 1) in 3.0.7 (in another version of 3.0.x, just put the code below the global declarations in the print_output function) add:// do Dani's SEO optimizationPlease do not duplicate all or part of this code elsewhere. Thanks should go out to Xenon for suggesting to me that I can rewrite URLs from within this function. Thanks!! ... And, please, give credit where credit is due - if you use this hack, please link back. |
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack Verynice Hack and is there any chanse we can get this work like the VBSeo from vbseo.com ? |
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack 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:$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: function print_output($vartext, $sendheader = true) |
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack Quote:
I haven't investigated the code close enough to know whether this function has access to the $thread['title'] variable ... I assume that it does, and if so, you can simply use it in the PHP code, but it remains untested. |
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack Hello cscgal, I've applied the hack to a new style and followed step by step (3 steps was easy :) ). I found a bug though. The multi-page links return a 404 error. The multi-page link show up as http://www.daniweb.com/techtalkforums/-1-20.html rather than http://www.daniweb.com/techtalkforum...ad34695-1.html |
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack This hack has been tested to have no problems on both a vB 3.0.7 installation as well as a vB 3.5 installation - both by editing the functions.php file as mentioned above. It has not yet been tested using the 3.5 hooks method. Which version are you working with? |
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack Quote:
I may have edited a few templates from the previous mod_rewrite hack so I'll get on this later this week and see where the problem lies. Thanks. |
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack Yes, that seems like it's almost definitely the problem. :) |
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack I've reverted the templates and files to the default stage. And whala~ everything is good to go. Except two things: Quote:
Quote:
|
| ||
| Re: The quick 'n' dirty ultra simple vBulletin SEO hack My hack only alters URLs in templates, not URLs that were generated in the php files themselves. If you want to fix problem #1 you illustrated, you would have to start editing PHP files. It's a trade off whether you want to be 100% SEO'ed or whether you want the hack to be self-contained. For me, I don't care about it redirecting to the non-SEO'd version as long as the spiders get a taste of newpostinthread.html and lastpostinthread.html To answer your second question, I didn't bother SEO'ing this because spiders never see the online.php page, it should be set to members-only access. |
| All times are GMT -4. The time now is 3:54 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC