Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Details »»

Version: , by fastforward fastforward is offline
Developer Last Online: Nov 2011 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 05-24-2001 Last Update: Never Installs: 35
 
No support by the author.

For vB 2.0

This little hackette is a quick fix to allow search engine bots to spider your threads.

Although this will allow the bots to index every thread on your site, it will not make the threads 'search engine optimized'. They will see exactly what you see when you visit your site. It simply removes the CGI bits from the URL's which prevents most search engine bots from spidering more than one level deep.

If you want a hack that allows to fully customize how the thread will look to the search engine bot, you should look at Overgrows more complete hack here.

The advantage of this hack over Overgrows is that it does not require htaccess support which can have performance issues. This could also be seen as a disadvantage though as my hack requires that you have mod_rewrite enabled on your Apache Server, whereas Overgrows method should work with just about any web host out there.

Take yer pick

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #132  
Old 01-06-2002, 05:57 PM
fastforward fastforward is offline
 
Join Date: Oct 2001
Location: NC, USA
Posts: 399
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by chaz7979
Doesnt google spider urls with ? now anyway?
You'll get a higher page rank with 'mysite.com/t127634.html' than if you used the normal url. Besides, google isn't the only searchengine out there.
Reply With Quote
  #133  
Old 01-06-2002, 06:21 PM
chaz7979 chaz7979 is offline
 
Join Date: Nov 2001
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh I know google isnt the only one out there but they are one of the only ones who was thought to have problems with the ? question marks.
Reply With Quote
  #134  
Old 01-09-2002, 05:20 AM
eva2000's Avatar
eva2000 eva2000 is offline
 
Join Date: Oct 2001
Location: Brisbane, Australia
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by fastforward

I think the issue is with multipage threads. My initial release only rewrote the first page of links.

The difficulty is not so much rewriting the links, it's maintaining the other options such as 'perpage' and sort order etc.
i see.. i'm happy with first page indexing only anyway
Reply With Quote
  #135  
Old 01-10-2002, 12:44 AM
Prince Prince is offline
 
Join Date: Oct 2001
Posts: 333
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by fastforward

Besides, google isn't the only searchengine out there.
No it's not, but it's the most important search engine!
Reply With Quote
  #136  
Old 01-20-2002, 04:32 PM
LanciaStratos's Avatar
LanciaStratos LanciaStratos is offline
 
Join Date: Oct 2001
Location: somewhere you're not
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by fastforward

I intend to revisit this very shortly. I've finally started to prepare for upgrading my forums to 2.2.1. It will probably be a couple of weeks though.
Hey fastforward, are you still planning on revisiting this hack?
Reply With Quote
  #137  
Old 01-21-2002, 04:56 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi folks,

I have an idea to make this hack more powerful, and require a new addition to this hack, possibly in the code.

I thought of this after I noticed I had many Netscape 4.x users, so I created new style set for them, and placed a link on the main page to "Fix Netscape errors" which simply sets their style id to use the original vB dynamic links.

This makes spiders and most surfers use the new (spider friendly) links, while those who click the "Fix link" can use original vB links in their templates.

The disadvantage, is that some users post links to other thread in spider-friendly format, that other members have trouble accessing if they have Netscape.

What I would like to do, instead, is this:

Detect if the visitor is using a browser agent (IE, Netscape, Mozilla), and if so, set their id to use a default style set (with vB's dynamic links)

If the user agent is other than (Mozilla-compatibele) then use a special style id that contain spider-friendly templates.

It initially sounded easy to me, but then I though that spider robots cannot be cookied, and any style id I assign them in my index.php code, may have to be re-checked in other parts of the code beside index.php? i.e. showthread etc.

Is there an easy way of accomplishing this?
Reply With Quote
  #138  
Old 02-02-2002, 03:41 AM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I had to modify a couple things in the links to get everything working properly.
This may apply to 2.2.2, however I'm not positive:

In my .htaccess file I have:
Quote:
RewriteEngine on
RewriteRule ^f([0-9]+)/?$ forumdisplay.php?forumid=$1&s=$2 [L]
RewriteRule ^t([0-9]+)\.html$ showthread.php?threadid=$1 [L]
RewriteRule ^t([0-9]+)-([0-9]+)\.html$ showthread.php?threadid=$1&perpage=15&pagenumber=$ 2 [L]
RewriteRule ^f([0-9]+)-([0-9]+)/$ forumdisplay.php?forumid=$1&daysprune=1000&sortord er=&sortfield=lastpost&perpage=40&pagenumber=$2 [L]
RewriteRule ^[ft]([0-9]+)/s([^/]*)/(.+)$ /$3 [L]
In forumhome templates I have:

<a href="$bburl/midiboard/f$forum[forumid]">

(midiboard is subdirectory of site)

In forumdisplay templates I have:

<a href="$bburl/f$forum[forumid]">

And in forumdisplaybit:

<a href="$bburl/t$thread[threadid].html">


Also the base href tag in the head include needed an extra trailing slash to make images work. Other then that everything seems to be okay.
Reply With Quote
  #139  
Old 02-02-2002, 01:39 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by tpearl5

Also the base href tag in the head include needed an extra trailing slash to make images work.
Tpearl, we have been slaving on this trying to fix it for old Netscape browsers, and none of us cought the missing slash problem.

Thanks! :up:
Reply With Quote
  #140  
Old 02-02-2002, 08:10 PM
tpearl5's Avatar
tpearl5 tpearl5 is offline
 
Join Date: Nov 2001
Location: PA
Posts: 1,014
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow.. I didn't know it was a problem. Images didn't work in MSIE without that slash for me.
Reply With Quote
  #141  
Old 02-02-2002, 08:38 PM
tamarian tamarian is offline
 
Join Date: Oct 2001
Location: Canada
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by tpearl5
Wow.. I didn't know it was a problem. Images didn't work in MSIE without that slash for me.
They worked fine for IE's, but Netscapes 4.7 and earlier had a problem with them.

I even started hacking the sessions and redirecting to different style id's based on user agents! Currently, registered members get the vB dynamic links, and guests get the spider-friendly ones.

I'll keep it that way, but I'll remove the link to Netscape upgrade.

That's always the case with debugging, you look hard for difficult mistakes, and they turn out to be too obvious to catch
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:37 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05137 seconds
  • Memory Usage 2,308KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete