Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-23 22:58:53

bg
Member
From: Pekin Illinois USA
Registered: 2005-02-20
Posts: 22
Website

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

#3 2009-05-23 23:27:34

bg
Member
From: Pekin Illinois USA
Registered: 2005-02-20
Posts: 22
Website

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

#4 2009-05-24 14:46:46

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

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.

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

#6 2009-05-24 21:43:10

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#7 2009-05-24 21:55:39

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Visitor Logs: How to NOT log my own IP?

Gocom to the rescue, thanks.

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

#9 2009-05-24 22:10:13

bg
Member
From: Pekin Illinois USA
Registered: 2005-02-20
Posts: 22
Website

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

#10 2009-05-24 22:29:24

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

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.

Offline

Board footer

Powered by FluxBB