![]() |
Quote:
I'm thinking I might as well kill my archive now :smoke: cheers mate! |
Hi lierduh, sorry to bother you about this. But I need some help concerning the approvements you`ve done to the spider friendly hack. I`ve gone through all the steps in your hack, it works great in every area except one, the forumdisplay part.
The first problem is with multipage threads, in forumdisplay it will only show a error page if I click the page buttons. I`ve disabled that hack but the url shows something like "f123--2" which is strange. Any theories about this one? What should I check? The second problem is that the pagenumber buttons are a bit funky, test this one http://www.radiomute.com/f112-3.html. Click on different pages, unexplainable :) I`m completely aware that this is not your problem, as I can see you`re hack works perfect for everyone else, but I don`t understand this though I`ve looked into it. Cheers, Haakon |
1.
I presume you mean the multiple page thread links displayed under a forumdisplay. It should be something like t3593-15-5.html If you had it as: f123--2 then your template is not done properly. The template you need to change is: ================ For forumdisplay_multipagenav_pagenumber Replace <a href="showthread.php?s=$session[sessionhash]&threadid=$thread[threadid]&perpage=$pperpage&pagenumber=$acurpage">$acurpage </a> with <a href="t$thread[threadid]-$pperpage-$acurpage.html">$acurpage</a> ====================== 2. My original rewriterule set the "daysprune=30" (the second rewriterule). Your default setting for "Default view age" is "Last Day". You need to make them the same. My own forums setting at the moment is "the beginning" for the "Default view age" and the rewriterule is "daysprune=1000" That will show all the threads, making them all ready to feed the Googlebots. You can set "Default view age" for each forum through Admin panel, click Modify forums and then "setting". As the side note says, 1000 means from the beginning. |
Hi, changed the rewrite rule to my settings and it works with no funky behavior..... thanks!
The 1st problem didn`t get solved though. It`s like it dosn`t recognize the $pperpage variable. The pages will get spidered from the showthread templates though, so it`s no krisis. Thanks again, Haakon |
Is there a way to NOT monkey with the links for multiple pages for memberlist or search? I block the bots for those anyway, and the more rules I have, the easier it will be to break down the road. Any solutions?
|
Quote:
If you do not want the robots to index your memberlist or search results (I don't think they will go and fill your search terms anyway). Just create a robots.txt file and they won't bother. |
First, I'd like to thank lierduh for reworking the original hack. It's finally working like a charm on my site.
I'm having one bit of a problem, though. I've noticed, by looking at Who's Online, that some users have unknown locations such as those: /t2094-3.html ? s = xxxxxxxxxxxxxxxxxxx /f8 ? s = xxxxxxxxxxxxxxxxxxx /f13 ? s = xxxxxxxxxxxxxxxxxxx Note: Extra spaces added, because vB.org removes the session part, when posted as it is. xxxxxx in place of session as well to avoid problems. :) I was using the original version of the hack, so I used to have URLs like http://www.pinkfloydfan.net/f8, instead of http://www.pinkfloydfan.net/f8.html, so the second and third unknown locations might be because of old references that users posted. (Any clue on how to update old references in posts?), but I have no clue of why the first location (/t2094-3.html ? s = xxxxx) is showing up like that. Any ideas on this? Thanks a lot again! |
Not sure why the session id is added.
Perhaps you could check the web log, see extractly what URL was accessed, ie. with or without the session id. It may also help you to find out where the link was originated, ie. know as the referrer. |
This is probably a stupid question... but where would I find httpd.conf??? I can't find it in anywhere...
|
httpd.conf is part of the Apache installation... this mod assumes that you're running your own server....
Too bad it isn't working for me anyways. (Latest version of Apache) |
I'm having some issues with forumdisplay. Please check http://www.pinkfloydfan.net/f20.html and look at the page navigation. Click on any of them, say, page 2. I'm taken to an URL such as http://www.pinkfloydfan.net/forumdis...age=50-2.html, which does not work (that is, I'm shown the first page of the forum as well).
I'd really appreciate any input on this, please. I've changed everything according to this post, and have already doublechecked it. Thanks a lot, Paulo |
Ok, since the issues I brought up on my last post were also happening in other parts of the site (for instance, in the Control Panel, while choosing an avatar, users could not choose any page other than 2 - we've got lots of avatars), he would get an URL such as the one described on the past post.
I've just uninstalled all the parts of this hack that deal with page navigation and, of course, everything is working fine again. Of course search engines won't be indexing any pages other than page 1 of all of my threads, but at least everything is working. If anyone got these problems and/or wants to try to fix them, I'll try to help. Just thought I'd post my experiences here. :) |
There has to be an easy way of doing this... all my pages are html using the mod rewrite and I've made the mod a long, long time ago....
|
Hii all,
This is a TOP most important hack for vBulletin that was ever done and will be ever done ( might be ), if someone can get it to work with every aspect/page of vbulletin (incase it is yet to be done ?? ) ! I would want to use this hack on my yet to be launched forums and i'd like to know, if the attachment in the first post of this thread is a workiable version for this hack ?? If not kindly attach a file with instructions to get it to work ! I do have a suggestion for fastforward and all other lead developers, contributing developers and behind the scene developers : Kindly contact Brett_tbake of WebMasterWorld, who has successfully implemented this kind of hack for his forums. however, we should keep in mind that his forums are custom coded and not using vBulletin. but what i mean to say is that, he can sure give you some inputs to make this hack easy to use and get it to work. I request one of you developers get in touch with him there at webmasterworld.com. I do have another question : My forums are installed in a subdomain, meaning.... http://xyz.mydomain.com and not /forums/ type of directory, if i have to get this to work, what if any changes should i make ?? Also, kindly some one give me a link to the thread for Overgorw's hack on this , none of the previously potsed url's work for me ! As a sidenote, i'd like to mention that i am using version 2.3.0, and i hope this hack works for this latest version ?? Thank you very much for working on this hack. Cheers |
My hack seems to work. It's simple but I have no idea if they are being properly indexed. Search engines change their search methods over time and it is tough to track. I've been keeping my forums as is (my pages end in .html files) since it works and little hassle.
But hacks are hacks. A writer is under no obligation to provide support whatsoever so we have to live with it. |
Quote:
cheers! |
Quote:
|
just curious....should the forumdisplay links look like:
forumdisplay.php?s=&forumid=14&daysprune=30&sortor der=&sortfield=lastpost&perpag e=40-3.html ? All the other links are now short with no "?" symbols etc. Thanks. Great work btw, much appreciated! |
Hi Lierduh
I'm having one problem with the hack. Clicking on any of the links at the bottom of forumdisplay (2,3,4 etc) brings up the same page, page 1. I saw someone else had this problem and I changed the rewrite rule as you suggested, but the problem still exists. Any ideas? Thanks. |
Quote:
Please provide the problem URLs, you can remove the domain part if you do not want to reveal that. Please also provide the related rewrite rules. (PS: Don't pay anyone until you do this, it could just be a simply fix. https://vborg.vbsupport.ru/showthrea...090#post377090 ) |
Lierduh,
Thanks for the response :) At http://domain.com/forums/f1.html The links on the bottom to view older threads are as follows: 2 - http://domain.com/forums/forumdispla...page=40-2.html 3 - http://domain.com/forums/forumdispla...page=40-3.html etc. All bring up the same initial forum page when clicked My rewrite rules are: RewriteEngine on RewriteRule ^/forums/f([0-9]+)/?$ /forums/forumdisplay.php?forumid=$1 [L] RewriteRule ^/forums/f([0-9]+)\.html$ /forums/forumdisplay.php?forumid=$1 [L] RewriteRule ^/forums/f([0-9]+)-([0-9]+)\.html$ /forums/forumdisplay.php?forumid=$1&daysprune=1000&sortord er=&sortfield=lastpost&perpage=25&pagenumber=$2 [L] RewriteRule ^/forums/t([0-9]+)\.html$ /forums/showthread.php?threadid=$1 [L] RewriteRule ^/forums/t([0-9]+)-([0-9]+)-([0-9]+)\.html$ /forums/showthread.php?threadid=$1&perpage=$2&pagenumber=$ 3 [L] RewriteRule ^/forums/t([0-9]+)-([0-9]+)--(.*)--([0-9]+)\.html$ /forums/showthread.php?threadid=$1&perpage=$2&highlight=$3 &pagenumber=$4 [L] RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^/forums/memberlist.php$ /forums/memberlist.php?%1&pagenumber=%2? [L] RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ RewriteRule ^/forums/search.php$ /forums/search.php?%1&pagenumber=%2? [L] Thanks for any help. BTW, I have no problem paying you for fixing it either :) I just need to get it working quickly. Thanks. Allen |
Looks like you have not edited the php file.
==== >8 open forumdisplay.php Find $pagenav = getpagenav($totalthreads,"forumdisplay.php?s=$sess ion[sessionhash]&forumid=$forumid&daysprune=$daysprune&sortorder=$ sortorder&sortfield=$sortfield&perpage=$perpage"); replace it with: $pagenav = getpagenav($totalthreads,"f$forumid"); ====== >8 You need to find the php file (forumdisplay.php) and edit it according to my original post. You can put "//" without the quote in front of that line to comment out the old code and add the line of new code next line to it. I will try to come back to this forum soon to see if you have fixed it. Thanks but no, I will not accept payment for something like this. :) |
I changed servers again and unfortunately I can't get this hack working. The server has ensim on the backend running redhat. In the .htaccess I have:
PHP Code:
The board pages are at http://board.midibuddy.net Please help! What could I possibly be doing wrong? |
lierduh,
Thanks very much. such a stupid oversight....works great now. |
i've moved to a new server and this code doesnt work anymore for some reason
if it you can get it working either here's another way: 1) set a 404.php as your 404 handler in your .htacess or httpd.conf Code:
ErrorDocument 404 /404.php Code:
<? if anyone uses it, let me know if it works for you ps. there one issue with this sollution: you still get a line in your error log about a missing file... |
Is there a .htaccess version of this? I tried the rewrite rule in the first post and got a 500 internal error.
|
I don't get behind that mod_rewrite stuff :(
Could someone try to explaine what i should add to my .htaccess when i want to redirect: http://www.mydomain.com/pages/index?firma=john borne or http://www.mydomain.com/pages/index?firma=iwonttellyou to http://www.mydomain.com/pages/john borne or http://www.mydomain.com/pages/iwonttellyou ?? thx in advance ;) |
I'm using Google AdSense to pay for my forum, and the side effect of having the ads on the site is that they send thousands of spiders to try and figure out what is going on and what contextual adverts to place.
So... to this thread I came. Big thanks to fastforward and lierduh for all their work. But... I have found a couple of small bugs... most of them I've ironed out (unfortunately they were painful to find so it took a while and I can't recall every little thing I've done)... but there is one that is lingering: In forumdisplay.php, when I'm viewing a forum: http://www.bowlie.com/forum/f2.html If I sort the forum by the number of thread replies. It's fine. But then if I page onto the second page of the results... it's forgotten that I wanted it sorted. A user pointed this out to me... but in essence... forum sorting doesn't work under this system. I'll try and figure it out myself, but I feel I'm not as versed in mod-rewrite and the subtleties as others here... so anyone who can help, please do :) |
OK, got it working again...
Here's the modification I made: In forumdisplay.php lierduh changed: PHP Code:
PHP Code:
PHP Code:
Code:
# |
Just checked, and lierduh you also suffer from this bug... so I'll assume that everyone who has done this also suffers from it.
The change I've made isn't aesthetically pleasing, but it does work and stays true to the spider friendly purpose. To summarise to those joining the end of this thread and wondering where to begin: First, follow fastforward's instructions on the first page of this thread... you need to do this before anything else to be familiar with what is going on before it gets scarier: https://vborg.vbsupport.ru/showthrea...threadid=18035 Then follow lierduh's instructions within his post... there are several major improvements over the initial code. https://vborg.vbsupport.ru/showthrea...137#post348137 If you're confident at this point and everything is working, then go through the whole codebase and replacing the relevant forumdisplay and showthread parts with the new format... stripping out sessionhashes as you go along (I've disabled the option in user prefs to not use cookies and made cookies compulsory). Finally... to resolve the nagging bug about sorting and page spanning, do the stuff in my post above: https://vborg.vbsupport.ru/showthrea...256#post418256 It's a lot of work, and certainly daunting. Would I attempt it if I were seriously unsure about this stuff? Nope. But if you are comfortable working with the template system and editing the php files... then the benefits of being spidered are considerable and can do a lot for your forum (increase members or increase advert revenue). |
I'm getting a bit carried away by this now, and someone needs to stop me :)
I've applied the same idea to assist with reducing bandwidth :) In my .htaccess file I've added this: Code:
# Simply change all references of avatar.php?userid=$post[userid]&$post[dateline]... and variations, for av$post[userid]-$post[dateline].gif Don't worry about the extension, the correct mime-type will be returned by the php... and that's whats important. Then change template postbit_attachment so that the URL for attachments is this : atp$post[postid].$post[attachmentextension] Note that this also sidesteps a bug in Mozilla whereby downloading a zip file from a php page would prompt a php file extension rather than zip. I've been hacking for sure, and again I don't recall clearly every change I made. But if you got the gist of everything else in this thread then I've no doubt you can do this. Essentially the point is that a lack of querystring allows the browser and proxies/caches to cache the avatars and attachments. This obviously reduces bandwidth... and also reduces database load. I have high hopes for this little addition to this very fine hack ;) |
One last bug fix.
If you use lots of standard avatars... then the page navigation over pages of avatars from member.php will be broken (you'll only ever get the first page)... so you will also need to insert this: Code:
RewriteCond %{QUERY_STRING} ^(.*)-([0-9]+)\.html$ |
Btw, I am doing something similar in vB3 - it's a lot easier, since sessionhash is coded by itself now. :)
|
Thanks for the terrific job on the great hack guys. I'm one of the few who doesn't need to have their forums added to search engines, but it's great for everyone who uses Google AdSense to gain some revenue. I have a question, does anyone know how to get the sessionhashes removed from the navbits? i.e.:
My_vbulletin_board > Some_Forum > This_is_my_post Listed near the top in each forum or post level page. This same problem affects the Forum Jump menu on the bottom left and no doubt many other pages, but from personal experience, these are most commonly used ones. This is not interesting for those who use this hack purely to get their pages Googled but for those who're using this for AdSense sessionhashes nearly always means that you'll be getting charity placeholders for banners instead (since the crawler thinks that it hasn't cached the page to generate an appropriate banner). It also looks like that if a link on the forum sends you back to the index any different from http://www.mywebsite.com/forums/index.php (i.e. http://www.mywebsite.com/forums/index.php?s= or just http://www.mywebsite.com/forums/) that it will generate placeholder banners too. Perhaps this can be avoided as well? |
My reason for all of this is AdSense... I'm not bothered about spidering at all.
I manually removed all mentions of 'sessionhash' as appropriate throughout the whole codebase (php & templates). There's a few subtle ones that linger... for example in the replacement variables for the styles... modify the header to remove the sessionhash from the main image and core navigation. The page nav bit is buried in admin/functions.php and you can remove the sessionhash from there. I also then adjusted all of my user options and registration forms to remove the option to not use cookies. And modified the FAQ to say that cookies are compulsory. |
One thing to point out is that even when you successfully remove all sessionhashes... Google spiders still visit with one!
I think their software has learnt vb and just compensates and discards. But this didn't bother me because the lack of sessionhashes and querystrings does help with being cached by proxies (the particularly dumb ones that AOL seem to use). So there is a benefit to it... but not as much as you think there will be. |
Quote:
|
Oh no, my mistake :)
In my online.php there was still a place where a sessionhash was being echoed and I incorrectly thought that the spiders were using a hash... but they're not... it's just the display to me of where the spider is that inserted the hash. Ignore that last bit :) Which is good... as now it clearly is working better than I thought. |
Thanks for the reply Buro9. I wonder if it's possible to get a step-by-step guide how to remove all the sessionhashes on every page where it is needed. If you or anyone has that amount of spare time of course ;)
filburt1's beta script looks like something that could work with AdSense too, this might be interesting to look into. Did anyone try anything like this out for AdSense? EDIT: VB3 works like a charm with AdSense. I can't wait for RC1 (just like nearly everyone else here). |
Found another bug:
The admin function to merge threads did not work, because your thread URL's are now of a different format. postings.php and the action 'domergethread' expected a URL with 'threadid=' in it. But if you've followed all instructions (!) your formats are more similar to: http://www.bowlie.com/forum/t5249.html and http://www.bowlie.com/forum/t5249-15-3.html So, to fix this, do this: FIND (in postings.php): Code:
$getthreadid=intval(substr($mergethreadurl,strpos($mergethreadurl,"threadid=")+9)); Code:
// HACK : START : SPIDER FRIENDLY URLS All it's doing is stripping out the threadid from the new format URL and putting that in the variable in the same way the old code did. As you'll note, I always leave old-code lying around commented out in case I ever want to roll-back... it's just my style... but if you trust my work you can delete that line. I also always leave those START and END blocks in, so I can see what the hell I changed and why :) Ogmuk, simply put... I started by using the template search to find all templates with 'sessionhash' in them. Then I edited each and every template (nigh on all of them) and removed the applicable code... which usually boils down to: Code:
s=$session[sessionhash] Once removed from all templates, I then searched through all .php files in the root of the forum directories, and similarly replaced all sessionhashes. EXCEPT where I found $dbsession[sessionhash] as this was usually being written TO the cookie and wasn't being echoed. You will have to read through each instance, but it's obvious that if it's appearing in a URL you can strip it out... but if it's in code then you'll probably want to keep it there. And lastly... I have AdSense running on my site, and thought I'd share this last tip for you: AdSense advises you not to place adverts on pages that you have to be logged on to view, or on search results pages. The former is because they'll never correctly spider it and serve relevant adverts (I bet you see ones for password cracking and security!), and the second is because the pages changes too frequently and by the time it's spidered it's useless. Both in effect will show inappropriate or public service adverts which do nothing for your revenue... and lower your click-throughs by increasing impressions... and also generate server load by sending too many spiders your way. So... I've written some JavaScript to only put adverts on pages that I know I WANT to show AdSense adverts on... here it is for you :) Code:
<script type="text/javascript"> Hope all of that info helps everyone. Cheers David K |
All times are GMT. The time now is 12:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|