View Single Post
  #433  
Old 03-02-2003, 01:14 PM
NexDog's Avatar
NexDog NexDog is offline
 
Join Date: Mar 2002
Location: Lost in the Nexus
Posts: 388
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OMG! Thirty googlebots just can't get enough of Nexology.

Teck, you are the man, without doubt.

Few things though. Have only seen them hit the Archive once or twice. They seem to be casing the forum due to the sessionhash being removed.

I tried the useragent hack (by inphinity) but that just returned:
Code:
Fatal error: Call to undefined function: no_sessionhash() in /home/httpd/vhosts/hostnexus.com/httpdocs/forum/global.php on line 296
Not sure if I was doing things wrong, but I removed your extra mod to functions.php:
Code:
function no_sessionhash()

{

  global $session;



  $agent = array(

    'crawl',

    'googlebot',

    'gulliver',

    'ia_archiver',

    'internetseer',

    'linkalarm',

    'mercator',

    'openbot',

    'pingalink',

    'psbot',

    'scooter',

    'slurp',

    'slysearch',

    'zeus',

    'zyborg',

    'otheruseragentcrawleryouwant'

  );



  foreach( $agent as $useragent )

  {

    if ( stristr( getenv( 'HTTP_USER_AGENT' ) , $useragent ) )

    {

      $session['sessionhash'] = '';

    }

  }

}
and replaced that with:
Code:
function useragentcheck( $match_agent, $agent_code )
{

  $agent = array(
    'googlebot'         => 'www.google.com/|||Google',
    'gulliver'          => 'www.northernlight.com/|||Northern Light',
    'ia_archiver'       => 'www.archive.org/|||The Internet Archive',
    'internetseer'      => 'www.internetseer.com/|||Internet Seer',
    'linkalarm'         => 'linkalarm.com/|||Link Alarm',
    'mercator'          => 'www.research.compaq.com/SRC/mercator/|||Mercator',
    'openbot'           => 'www.openfind.com.tw/|||Openbot',
    'pingalink'         => 'www.pingalink.com/|||PingALink Monitor',
    'psbot'             => 'www.picsearch.com/bot.html|||PicSearch',
    'scooter'           => 'www.altavista.com/|||AltaVista',
    'slurp'             => 'www.inktomi.com/slurp.html|||Inktomi',
    'turnitinbot'       => 'www.turnitin.com/robot/crawlerinfo.html|||Turnitin',
    'slysearch'         => 'www.turnitin.com/robot/crawlerinfo.html|||Turnitin',
    'zeus'              => 'www.waltbren.com/products/zeus_internet_robot.htm|||Zeus Internet Marketing',
    'zyborg'            => 'www.wisenutbot.com/|||WiseNut',
    'teoma'             => 'www.teoma.com/|||Teoma/Ask Jeeves',
    'spider'            => 'Web Spider',
    'spyder'            => 'Web Spyder',
    'crawl'             => 'Web Crawler',
    'robot'             => 'Web Robot'
  );

  foreach( $agent as $useragent => $agenturl )
  {
    if ( preg_match ("/^\d+$/", $useragent) )
    {
      $useragent = $agenturl;
      $agenturl  = "Search Engine";
    }

    if ( preg_match ("/". preg_quote ($useragent) ."/i", $match_agent) )
    {
      $agentinfo = preg_split ("/\|\|\|/", $agenturl);
           if (!($agentinfo[1])) {
              $agentinfo[0] = "http://www.robotstxt.org/wc/active.html";
              $agentinfo[1] = "Web Robot $useragent";
           }

           switch ($agent_code) {
             case 0:
               return 1;
               break;
             case 1:
               return $agentinfo[1];
               break;
             case 2:
               return '</a><a href="http://'. $agentinfo[0] .'" alt="'. $agentinfo[1] .'"><i>'. $agentinfo[1] .'</i>';
               break;
           }
    }
  }

}
Or can I just tack inphinity's hack onto the end of functions.php after your no_sessionhash() function?
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01735 seconds
  • Memory Usage 1,781KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete