Log in

View Full Version : Miscellaneous Hacks - Hide Admin IP


11-19-2013, 11:00 PM
Removed

Krusty1231
11-20-2013, 10:33 AM
Very helpful. Thanks for this.

Raptor
09-27-2014, 06:02 PM
Very strange that i get a 404 error when trying to save this

if i use different php code it saves fine - bizarre ?

Sharingan_Okami
12-04-2014, 05:10 PM
Thanks

da_judge
12-22-2014, 02:13 PM
works very well, although to get it working on my setup had to change Execution order from 5 to 0 ;)

BTW... if you start thread.. 1st post dont hide ip only replys have ips hidden ?

im using multipule ids fyi

Justinphx
12-25-2014, 12:41 PM
I just tried this as well and works fine by hiding replies to posts. But, if you create a thread it displays your real IP and thus making this plug in moot. Hopefully the coder has a fix for this as it would be a very useful plugin for many.

ozzy47
12-27-2014, 12:40 AM
I just tried this as well and works fine by hiding replies to posts. But, if you create a thread it displays your real IP and thus making this plug in moot. Hopefully the coder has a fix for this as it would be a very useful plugin for many.

Try the same code, but add another plugin using the hook, threaddata_presave

Justinphx
12-28-2014, 12:37 AM
Thanks Ozzy. I was just looking into that this afternoon and thought that would do the trick. As always, thanks for the assistance. Works like a charm.

ozzy47
12-28-2014, 12:46 AM
Excellent, glad to hear it worked. :)

woodmj
01-20-2015, 03:31 PM
Hi, I was just wondering if there was a way to use this code to hide the Admin's IP in Who's Online?

Dave
01-20-2015, 03:40 PM
Hi, I was just wondering if there was a way to use this code to hide the Admin's IP in Who's Online?

That script wont work for the who's online script.
You should hook into online_complete with something like:

$hide_user_ids = array(1, 2, 3);

foreach($onlinebits as $key=>$val){
if(in_array($val['userid'], $hide_user_ids)){
$onlinebits[$key]['host'] = '1.1.1.1';
$onlinebits[$key]['host_encoded'] ='1.1.1.1';
}
}

woodmj
01-20-2015, 05:01 PM
Thanks Dave. Works great :-)

Vaira
02-02-2015, 11:21 AM
Thanks Ozzy. I was just looking into that this afternoon and thought that would do the trick. As always, thanks for the assistance. Works like a charm.

It doesn't work here! The first post at a new thread always gets the real IP, the second post not....do I have to change the code somewhere? I have used the same code @ threaddata_presave

Update: It works when using the hook location :threadfpdata_presave :)

zorcocuq
04-10-2015, 08:16 PM
Thank you @semprot

ukdalai
06-13-2015, 04:03 PM
ok so you can replace the ip with a dummy, but can you stop it adding the ip completely for an array of users say:

$hide_user_ids = array(1, 2, 3);


so, i dont want the ip displayed for any posts for admins, or given users

Craig

ukdalai
06-14-2015, 09:49 AM
i have it working, but i think the ip will still be shown in modcp, is there a way to just not log ip's for given users.

Craig

the one
12-01-2015, 07:16 AM
This works but when i view whosonline i can still see my normal ip address.

I dont want to turn off who can view ip address for super moderators but how do i hide my ip address from them

cheers