vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Forcing a particular style on searchers / spiders (https://vborg.vbsupport.ru/showthread.php?t=140133)

roddy 02-22-2007 12:42 PM

Forcing a particular style on searchers / spiders
 
I'm currently getting hammered for bandwidth - it's all good because it's necessary spider indexing and a subsequent increase in traffic, but I'd like to try and get the numbers down. I've done as much as I can in terms of removing sigs / avatars from guest views. I want to do more. I also suspect this will increase rankings by removing random bloat, a la the archive.

I have Zackery's very nice VB3 Lite style installed - great for PDA use and very light on bandwidth, as it should be.

So what I want to do is place a conditional like this somewhere:

If THIS_SCRIPT = showthread AND (user is guest OR user is a spider)
THEN styleid = 3

What I'm not yet sure about is:
Where do I place this so that it sets the style and doesn't get overridden later? SHOWTHREAD would be the logical place it seems to me, but is that too late? Globals.php?

I haven't been able to identify a conditional along the lines of "is_a_spider", but I see the who's online display identifies Googlebot et al, so I think it must be possible. Or do I just need to list a bunch of useragents?

Also, this needs to be temporary - if a member visits a showthread page, and then logs in, his style needs to be back to default.

I think that's clear - I understand it at least. I'm really just looking for guidance on the above - writing the actual code I can handle, with a bit of trial and error. Not sure I'm doing things the best way though, so comments welcome.


All times are GMT. The time now is 07:31 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01518 seconds
  • Memory Usage 1,705KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete