Changes in trunk/vb4 [45:63]


Ignore:
Location:
trunk/vb4
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/vb4/upload/includes/bad-behavior/core.inc.php

    r45 r63  
    143143                        } 
    144144                        return false; 
    145                 } elseif (stripos($ua, "Googlebot") !== FALSE || stripos($ua, "Mediapartners-Google") !== FALSE) { 
     145                } elseif (stripos($ua, "Googlebot") !== FALSE || stripos($ua, "Mediapartners-Google") !== FALSE || stripos($ua, "Google Web Preview") !== FALSE) { 
    146146                        require_once(BB2_CORE . "/searchengine.inc.php"); 
    147147                        if ($r = bb2_google($package)) { 
  • trunk/vb4/upload/includes/functions_vb_badbehavior.php

    r45 r63  
    44* @package      vB Bad Behavior (vB4) 
    55* @author       Eric Sizemore <admin@secondversion.com> 
    6 * @version      1.0.4 
     6* @version      1.0.5 
    77* @license      GNU LGPL http://www.gnu.org/licenses/lgpl.txt 
    88*  
  • trunk/vb4/upload/admincp/vb_badbehavior.php

    r45 r63  
    44* @package      vB Bad Behavior (vB4) 
    55* @author       Eric Sizemore <admin@secondversion.com> 
    6 * @version      1.0.4 
     6* @version      1.0.5 
    77* @license      GNU LGPL http://www.gnu.org/licenses/lgpl.txt 
    88*  
     
    198198 
    199199                        print_cells_row(array( 
    200                                 $log['ip'] . iif($userid !== false, "<br />UserID:<a href=\"{$vbulletin->options['bburl']}/member.php?{$vbulletin->session->vars['sessionurl']}u=$userid\" target=\"_blank\">$userid</a>"), 
     200                                /* IP, UserID (if applicable) */ 
     201                                $log['ip'] . " <small>(<a href=\"http://who.is/whois-ip/ip-address/$log[ip]/\" target=\"_blank\">whois</a>)</small>" .   
     202                                iif($userid !== false, "<br />UserID:<a href=\"{$vbulletin->options['bburl']}/member.php?{$vbulletin->session->vars['sessionurl']}u=$userid\" target=\"_blank\">$userid</a>"), 
     203                                /* Date */ 
    201204                                $log['date'], 
     205                                /* Key */ 
    202206                                "<a href=\"#\" onclick=\"window.open('vb_badbehavior.php?{$vbulletin->session->vars['sessionurl']}do=keycheck&key=$log[key]', 'keycheck', 'width=200,height=200');return false;\">$log[key]</a>", 
     207                                /* User Agent */ 
    203208                                "<input type=\"text\" value=\"$log[user_agent]\" onclick=\"alert(this.value);\"$_title />", 
     209                                /* Request Method */ 
    204210                                $log['request_method'], 
     211                                /* Protocol */ 
    205212                                $log['server_protocol'], 
     213                                /* Request URI */ 
    206214                                "<input type=\"text\" value=\"$log[request_uri]\" onclick=\"alert(this.value);\"$_title />", 
     215                                /* Request Entity */ 
    207216                                iif($log['request_entity'], "<textarea rows=\"4\" cols=\"30\" onclick=\"alert(this.value);\"$_title>$log[request_entity]</textarea>"), 
     217                                /* HTTP Headers */ 
    208218                                "<textarea rows=\"4\" cols=\"30\" onclick=\"alert(this.value);\"$_title>$log[http_headers]</textarea>" 
    209219                        ), 0, 0, -8, 'top', 0, 1); 
  • trunk/vb4/product-vb_badbehavior.xml

    r45 r63  
    44        <description>vBulletin Bad Behavior integration. Bad Behavior prevents spammers from ever delivering their junk, and in many 
    55cases, from ever reading your site in the first place.</description> 
    6         <version>1.0.4</version> 
     6        <version>1.0.5</version> 
    77        <url><![CDATA[http://www.vbulletin.org/forum/misc.php?do=producthelp&pid=vb_badbehavior4]]></url> 
    88        <versioncheckurl><![CDATA[http://www.vbulletin.org/forum/misc.php?do=productcheck&pid=vb_badbehavior4]]></versioncheckurl> 
     
    4848                        <phpcode><![CDATA[if ($vbulletin->options['vb_badbehavior_enabled'] == 1) 
    4949{ 
    50         require_once(DIR . '/includes/functions_vb_badbehavior.php'); 
     50        $bb2_run = true; 
    5151 
    52         bb2_start(bb2_read_settings()); 
     52        if ($vbulletin->userinfo['userid'] > 0) 
     53        { 
     54                if ($vbulletin->options['vb_badbehavior_bypass_user'] AND $vbulletin->options['vb_badbehavior_bypass_user_joindate'] < 1) 
     55                { 
     56                        $bb2_run = false; 
     57                } 
     58                else if ( 
     59                        $vbulletin->options['vb_badbehavior_bypass_user'] 
     60                        AND $vbulletin->options['vb_badbehavior_bypass_user_joindate'] > 0 
     61                        AND ((TIMENOW - $vbulletin->userinfo['joindate']) / 86400) > $vbulletin->options['vb_badbehavior_bypass_user_joindate'] 
     62                ) 
     63                { 
     64                        $bb2_run = false; 
     65                } 
     66                else if (is_member_of($vbulletin->userinfo, 5, 6, 7)) 
     67                { 
     68                        $bb2_run = false; 
     69                } 
     70        } 
    5371 
    54         $headinclude .= bb2_insert_head();  
     72        if ($bb2_run === true) 
     73        { 
     74                require_once(DIR . '/includes/functions_vb_badbehavior.php'); 
     75 
     76                bb2_start(bb2_read_settings()); 
     77 
     78                $headinclude .= bb2_insert_head(); 
     79        } 
    5580}]]></phpcode> 
    5681                </plugin> 
     
    100125                        <phrase name="setting_vb_badbehavior_log_filter_title" date="1303159579" username="Eric" version="1.0.3"><![CDATA[Log Filter Keys]]></phrase> 
    101126                        <phrase name="setting_vb_badbehavior_log_filter_desc" date="1303159579" username="Eric" version="1.0.3"><![CDATA[Enter a list of keys you want filtered out of the log results. Please make sure you place each key on a separate line.]]></phrase> 
     127                        <phrase name="setting_vb_badbehavior_bypass_user_title" date="1306438736" username="Eric" version="1.0.5"><![CDATA[Bypass Users]]></phrase> 
     128                        <phrase name="setting_vb_badbehavior_bypass_user_desc" date="1306438736" username="Eric" version="1.0.5"><![CDATA[Should vB Bad Behavior skip processing request made by forum users/members?]]></phrase> 
     129                        <phrase name="setting_vb_badbehavior_bypass_user_joindate_title" date="1306438736" username="Eric" version="1.0.5"><![CDATA[Bypass Users - Join Date]]></phrase> 
     130                        <phrase name="setting_vb_badbehavior_bypass_user_joindate_desc" date="1306438736" username="Eric" version="1.0.5"><![CDATA[If you've enabled the Bypass Users option, you can set a number of days here. Anything greater than 0, vB Bad Behavior will only bypass users/members if their join date is greater than or equal to this amount of days.]]></phrase> 
    102131                        <phrase name="settinggroup_vb_badbehavior" date="1302045263" username="Eric" version="1.0.0"><![CDATA[vB Bad Behavior Options]]></phrase> 
    103132                </phrasetype> 
     
    155184                                <defaultvalue>00000000</defaultvalue> 
    156185                        </setting> 
     186                        <setting varname="vb_badbehavior_bypass_user" displayorder="120"> 
     187                                <datatype>boolean</datatype> 
     188                                <optioncode>yesno</optioncode> 
     189                                <defaultvalue>0</defaultvalue> 
     190                        </setting> 
     191                        <setting varname="vb_badbehavior_bypass_user_joindate" displayorder="130"> 
     192                                <datatype>number</datatype> 
     193                                <defaultvalue>0</defaultvalue> 
     194                        </setting> 
    157195                </settinggroup> 
    158196        </options> 
  • trunk/vb4/README.txt

    r45 r63  
    22* @package      vB Bad Behavior (vB4) 
    33* @author       Eric Sizemore <admin@secondversion.com> 
    4 * @version      1.0.4 
     4* @version      1.0.5 
    55* @license      GNU LGPL http://www.gnu.org/licenses/lgpl.txt 
    66*  
     
    7171 
    7272=== Changelog === 
     73Version 1.0.5, 05/26/2011 
     74- Added option for bypassing users/members. 
     75- If the visitor is a user, and is in usergroup 5, 6, or 7 (admin/mod/super mod) - Bad Behavior is bypassed. 
     76- Modified bad-behavior core to check for Google Web Preview 
     77        o file edited: /includes/bad-behavior/core.inc.php 
     78- Added a link beside the IP address in the log for WhoIs. 
     79 
    7380Version 1.0.4, 04/28/2011 
    7481- Bad Behavior upgraded to 2.1.13 (fixes search engine block issues) 
Note: See TracChangeset for help on using the changeset viewer.