Recent Topics

[2.x] Statistics - remove given IPs from stats

Started by on Oct 31, 2008 – Contents updated: Oct 31, 2008

Oct 31, 2008 21:29    

My b2evolution Version: 2.x

Let's take me as an example.

I write posts at home or at work... so I'm actually adding hits into my stats and that is not nice.

I want to remove or make b2evolution not to log the entries from given IPs... how can I do that for my blog ?

Thanx !

Oct 31, 2008 22:09

Open skins/_html_footer.inc.php and change the following

PHP

$Plugins->trigger_event('SkinEndHtmlBody');
 
switch( true )
{
    case !is_logged_in():            // Skip logged in users
    case $Hit->IP == '127.0.0.1':    // Skip IP
        break;
    
    default:
        $Hit->log();                // Log the hit on this page    
}
debug_info(); // output debug info if requested

Good luck


Form is loading...

Community software – This forum is powered by b2evolution CMS, a complete engine for your website.