Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
[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
Offline
Pages: 1