MyBB Community Forums

Full Version: remove super admin IP from posts and online?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So I want to remove the SUPER ADMIN ip from being viewed in posts and pretty much anywhere on the forums I want it blocked from staff,mods,admin

so only super admins can see super admin IP's

this isnt about a trust thing so please dont say I need to trust them I do I just dont feel comfortable with people seeing my IP. I remember doing it on one of my old forums but I forgot and I cant find the tutorial


I found this but its not right

replace
{$user_ip}
with
HTML Code
<if $user['usergroup'] != 4 then>{$user_ip}</if>

or

<if !is_super_admin($user['uid']) then>{$user_ip}</if>

inc/functions_online.php

so if anyone can point me in the right direction I would really appreciate it. Also I don't want IP logging off completely I want to just hide SUPER ADMIN ip from everyone elses eyes but other superadmins
That is because the templates do not support conditionals. You will need a hook for that. Anyway, for the hook try the postbit, whereas for the php code for your function try this:

global $mybb;
if($post['uid'] == 1)
{
$mybb->settings['logip'] = 0;
}

I haven''t test it but it should do the trick.
There is of course the option to ADD the power to use conditionals in templates - this

http://mybbhacks.zingaburga.com/showthread.php?tid=260
(2012-11-09, 10:18 PM)borbole Wrote: [ -> ]That is because the templates do not support conditionals. You will need a hook for that. Anyway, for the hook try the postbit, whereas for the php code for your function try this:

global $mybb;
if($post['uid'] == 1)
{
$mybb->settings['logip'] = 0;
}

I haven''t test it but it should do the trick.

question where exactly do I place that? I'm not much of a developer I'm learning though
(2012-11-09, 10:25 PM)Leefish Wrote: [ -> ]There is of course the option to ADD the power to use conditionals in templates - this

http://mybbhacks.zingaburga.com/showthread.php?tid=260

I was not aware of that plugin. It looks very useful. Thanks for the link.

(2012-11-09, 10:47 PM)sn4g Wrote: [ -> ]
(2012-11-09, 10:18 PM)borbole Wrote: [ -> ]That is because the templates do not support conditionals. You will need a hook for that. Anyway, for the hook try the postbit, whereas for the php code for your function try this:

global $mybb;
if($post['uid'] == 1)
{
$mybb->settings['logip'] = 0;
}

I haven''t test it but it should do the trick.

question where exactly do I place that? I'm not much of a developer I'm learning though

You will need to create a hook for that. Here is the guide to the plugin.

http://docs.mybb.com/Plugins.html

Or you can edit manually the php file that holds the postbit area. Atm I do not have access to the mybb files to look up the exact code but place it somewhere after the postbit plugin hook has been called.
Another solution I have used it to create a task to obfuscate the IP addresses of select staff (I actually do it for anyone on my staff).

Just set it to an interval you can feel comfortable with and then customize it for uid=1 or a list of uids you want to keep cleared. (Remember you only need to obfuscate lastip because regip doesn't change and isn't shown in posts, but you will need to handle regip by hand).
Is it possible to block your IP out to other members and staff in the Admin log and the mod log also?
(2012-11-10, 04:25 AM)MYBB GHOST Wrote: [ -> ]Is it possible to block your IP out to other members and staff in the Admin log and the mod log also?

If you trust your staff..you should trust them enough with your ip...your users cannot see the IP's in posts...only you.
(2012-11-10, 04:30 AM)WebOutfit Wrote: [ -> ]
(2012-11-10, 04:25 AM)MYBB GHOST Wrote: [ -> ]Is it possible to block your IP out to other members and staff in the Admin log and the mod log also?

If you trust your staff..you should trust them enough with your ip...your users cannot see the IP's in posts...only you.

Just for sectrity reasons, you know just in case.
(2012-11-10, 04:25 AM)MYBB GHOST Wrote: [ -> ]Is it possible to block your IP out to other members and staff in the Admin log and the mod log also?

Yes, it is. The code I posted should hide it in the Moderator logs too I think. Whereas to hide in the Admin logs you will need a custom plugin.
Pages: 1 2