Changeset 39

Show
Ignore:
Timestamp:
2007-11-27 18:31:50 (4 years ago)
Author:
hannes
Message:

new config file: bots.php (ticket #15)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/admin/index.php

    r1 r39  
    4848// import version number 
    4949require_once('../includes/config/version.php'); 
     50 
     51// bots definition 
     52require_once('includes/config/bots.php'); 
    5053 
    5154// get memberstages 
  • trunk/admin/redirectors/logout.php

    r19 r39  
    3636// import version number 
    3737require_once('../../includes/config/version.php'); 
     38// bots definition 
     39require_once('../../includes/config/bots.php'); 
    3840// formatting object 
    3941$F = new Format(); 
  • trunk/includes/session.php

    r20 r39  
    2424 
    2525// ignore well-known bots 
    26 if (stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'Slurp') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'ia_archiver') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'Harvest') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'crawl') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'bot') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'jeeves') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'spider') === FALSE) { 
     26if (in_array(strtolower($_SERVER['HTTP_USER_AGENT']), $BOTS) === FALSE) { 
    2727    // save session info in subdirectory instead of system-wide /tmp/ 
    2828    ini_set('session.save_path', $SETTINGS['fspath'] . 'sessions'); 
     
    168168    } 
    169169    // don't list well-known bots in online table 
    170     if (isset($_SESSION['secdata']['useragent']) && $_SESSION['secdata']['useragent'] != '' && stristr($_SERVER['HTTP_USER_AGENT'], 'Googlebot') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'Slurp') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'ia_archiver') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'Harvest') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'crawl') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'bot') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'jeeves') === FALSE && stristr($_SERVER['HTTP_USER_AGENT'], 'spider') === FALSE) { 
     170    if (isset($_SESSION['secdata']['useragent']) && in_array(strtolower($_SERVER['HTTP_USER_AGENT']), $BOTS) === FALSE) { 
    171171        // new entry to table 
    172172        $q = $C->prepare('INSERT INTO ' . $SETTINGS['dbtableprefix'] . 'online (onlinememberid, onlinetime, onlinesession) VALUES (:memberid, :time, :session)'); 
  • trunk/index.php

    r13 r39  
    4545// import version number 
    4646require_once('includes/config/version.php'); 
     47 
     48// bots definition 
     49require_once('includes/config/bots.php'); 
    4750 
    4851// get memberstages 
  • trunk/install.php

    r38 r39  
    208208                // set permissions for version.php 
    209209                @chmod('includes/config/version.php', 0660); 
     210                // set permissions for bots.php 
     211                @chmod('includes/config/bots.php', 0660); 
    210212                if ($ok == 1) { 
    211213                    /* set up database */ 
  • trunk/redirectors/forumjump.php

    r24 r39  
    3636// import version number 
    3737require_once('../includes/config/version.php'); 
     38// bots definition 
     39require_once('../includes/config/bots.php'); 
    3840// formatting object 
    3941$F = new Format(); 
  • trunk/redirectors/login.php

    r19 r39  
    3636// import version number 
    3737require_once('../includes/config/version.php'); 
     38// bots definition 
     39require_once('../includes/config/bots.php'); 
    3840// crypto module 
    3941require('../includes/config/crypt.php'); 
  • trunk/redirectors/logout.php

    r19 r39  
    3737// import version number 
    3838require_once('../includes/config/version.php'); 
     39// bots definition 
     40require_once('../includes/config/bots.php'); 
    3941// formatting object 
    4042$F = new Format(); 
  • trunk/redirectors/markasread.php

    r19 r39  
    3737// import version number 
    3838require_once('../includes/config/version.php'); 
     39// bots definition 
     40require_once('../includes/config/bots.php'); 
    3941// formatting object 
    4042$F = new Format(); 
  • trunk/redirectors/pollvote.php

    r19 r39  
    3636// import version number 
    3737require_once('../includes/config/version.php'); 
     38// bots definition 
     39require_once('../includes/config/bots.php'); 
    3840// formatting object 
    3941$F = new Format(); 
  • trunk/redirectors/postinghelp.php

    r19 r39  
    3636// import version number 
    3737require_once('../includes/config/version.php'); 
     38// bots definition 
     39require_once('../includes/config/bots.php'); 
    3840// formatting object 
    3941$F = new Format(); 
  • trunk/redirectors/preview.php

    r20 r39  
    3636// import version number 
    3737require_once('../includes/config/version.php'); 
     38// bots definition 
     39require_once('../includes/config/bots.php'); 
    3840// formatting object 
    3941$F = new Format(); 
  • trunk/redirectors/showip.php

    r19 r39  
    3636// import version number 
    3737require_once('../includes/config/version.php'); 
     38// bots definition 
     39require_once('../includes/config/bots.php'); 
    3840// formatting object 
    3941$F = new Format(); 
  • trunk/redirectors/uploadavatar.php

    r19 r39  
    3636// import version number 
    3737require_once('../includes/config/version.php'); 
     38// bots definition 
     39require_once('../includes/config/bots.php'); 
    3840// formatting object 
    3941$F = new Format();