Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-06 19:54:07

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

[solved]remove your own ip from logs?

is there a working hack/plugin to remove your own ip from textpatterns builtin log/referral system? i dont want to add a separate logging system. tried google analytics and that thing updates slower than all holy hell. i found one thread about hacking txp_log.php but it was from 2004 ah!

Last edited by iblastoff (2007-08-06 20:49:12)

Offline

#2 2007-08-06 20:18:45

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [solved]remove your own ip from logs?

That hack still works for me.

In txp_log.php, in function log_list, after this line (around #55):

safe_delete('txp_log', "time < date_sub(now(), interval $expire_logs_after day)");

I added

$ip = @gethostbyaddr($_SERVER['REMOTE_ADDR']);
safe_delete("txp_log", "`host` LIKE '$ip' AND `time` > date_sub(now(),interval 1 day)");

Offline

#3 2007-08-06 20:48:57

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [solved]remove your own ip from logs?

ahh perfect! thank you!

Offline

Board footer

Powered by FluxBB