Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Visitor Logs: How to NOT log my own IP?
I thought I’d read a forum post about how to do this long ago, but have searched under everything I could think of with no success. So, I’ll ask…
Is there a way to set Textpattern to ignore logging for my own IP address when I visit the site? Like most DSL users I’m supposed to have a dynamic IP address, but it hasn’t changed in three years. So If I could find a way to ignore logging from a specific IP I’d be happy.
TIA for any help!
Ooops… should mention I’m using TXP 4.0.8
Last edited by bg (2009-05-23 23:03:09)
— Bob
Offline
#2 2009-05-23 23:08:48
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Visitor Logs: How to NOT log my own IP?
bg wrote:
I thought I’d read a forum post about how to do this long ago, but have searched under everything I could think of with no success.
I bookmarked it at the time, here it is :) Don’t know if it’s still helpful though…
Offline
Re: Visitor Logs: How to NOT log my own IP?
Thanks, Els! I’ll give it a try and let you know if it still works in 4.0.8.
— Bob
Offline
Re: Visitor Logs: How to NOT log my own IP?
I tried Sencer’s code and for some reason it didn’t work for me, but there was another thread that suggested this:
In the /textpattern/include/txp_log.php file, look for (line 55):
safe_delete(‘txp_log’, “time < date_sub(now(), interval $expire_logs_after day)”);
Right after it:
safe_delete(“txp_log”, “`host` LIKE ’192.168.1.23’”);
Substitute 192.168.1.23 with your IP address.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#5 2009-05-24 21:41:26
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Visitor Logs: How to NOT log my own IP?
hcgtv wrote:
safe_delete("txp_log", "`host` LIKE '192.168.1.23'");
Substitute 192.168.1.23 with your IP address.
Hmm… thanks Bert, I tried this but my own visits are not removed from the logs…? (and yes, I’m sure I entered the right IP)
Last edited by els (2009-05-24 21:42:43)
Offline
Re: Visitor Logs: How to NOT log my own IP?
A plugin, rah_unlog_me :)
Last edited by Gocom (2009-05-24 21:43:40)
Offline
Re: Visitor Logs: How to NOT log my own IP?
Gocom to the rescue, thanks.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline
#8 2009-05-24 21:56:55
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Visitor Logs: How to NOT log my own IP?
hcgtv wrote:
Gocom to the rescue
As always :) Thanks anyway, Bert.
Offline
Re: Visitor Logs: How to NOT log my own IP?
OMG! I didn’t even have time to try those other suggestions yet and Voila! there’s a plug in. Cool beans, Jukka… and thanks!
— Bob
Offline
Re: Visitor Logs: How to NOT log my own IP?
Els,
I just remembered that I have Use DNS? set to No, so that’s why the host field has an IP address, instead of a domain name. Instead of ‘host’ in the example, you can use ‘ip’, but Gocom’s plugin is the better solution at this point.
We Love TXP . TXP Themes . TXP Tags . TXP Planet . TXP Make
Offline