Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
removing the ip address that appears in new post emails
Avatar
Internet Able
Member
Free Members
sp_UserOfflineSmall Offline
Jul 7, 2012 - 6:03 am

Hi,

Two questions

1) when a user makes a new post, I (as a moderator) receive an email with the posters ip address.

I'm a bit of a privacy freak and would rather this didn't appear in the email. Is there a way to change this ?

2) who else would receive this ip address - subscriptions? Other mods?

Thanks in advance

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 7, 2012 - 6:40 am

This only appears to those admins/moderators signed up for admin notification emails. It will never be seen by your ordinary forum members

Interestingly - and typically! - this was actually added after much lobbying by our users!

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 7, 2012 - 9:35 am

but there is a filter that can be used to strip it out from the emails to admins/mods if you really wanted...  but as Andy says, no regular users will see IP addresses...

Avatar
Internet Able
Member
Free Members
sp_UserOfflineSmall Offline
Jul 9, 2012 - 1:48 am

I guess you cant please all of the people all of the time ... especially not webmasters 🙂

 

Could you tell me how I go out about setting up that filter?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 9, 2012 - 4:48 am

The filter in question is 'sph_admin_email'. This passes 3 arguments: The $message (which, of course, is what needs to be returned), The $newpost array which contains the entire set of data for the new post. And an $id which is the user id of the admin the email is being compiled for.

So the IP address would then need to be extracted from the $message and the modified $message returned as a result. Not ideal and probably a case for a regular expression. Oh how I hate those!

For reference these filters are standard WordPress hooks and their use is described in the WP codex: http://codex.wordpress.org/Plugin_API

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626