Black Pearl

Hiding whois online from all except admins on viewonline.php - Black Pearl

Hiding whois online from all except admins on viewonline.php

by TheButcher2 » Thu Jul 03, 2014 10:31 am

Hi



Hide who is online

Is there a way that only admins can see who is online on viewonline.php




I asked this in the other forum, and had some code modifications suggested, I have done all of them, and for some reason registered members can still see the whois info on viewonline.php

Here is the thread so you see what changes I made so far.

viewtopic.php?f=46&t=2250281

Thanks
User avatar
TheButcher2
Registered User
Posts: 1037
Joined: Tue May 13, 2014 11:38 pm

Re: Hiding whois online from all except admins on viewonline

by 5hocK » Thu Jul 03, 2014 11:23 am

The code from the post here works, adding <!-- IF U_ACP --> before code and ending with <!-- ENDIF --> after means only someone with admin permissions can see what's inside.

Here it is working: http://www.phpbbmods.co.uk/zone51/index.php

User: test
Pass: test123

Edit:
To stop anyone but admins going directly to /viewonline.php

Open viewonline.php and find

Code: Select all

$user->setup();

After add:

Code: Select all

if (!$auth->acl_get('a_'))
{
    trigger_error('You are not authorized to view this page');
}
5hocK
Registered User
Posts: 3149
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: Hiding whois online from all except admins on viewonline

by TheButcher2 » Thu Jul 03, 2014 11:32 am

Thank you Shock, not to mess this up, may I ask you.

I should leave all the changes in places, where in the code on which pages do I add those commands.

Thank you for your help
User avatar
TheButcher2
Registered User
Posts: 1037
Joined: Tue May 13, 2014 11:38 pm

Re: Hiding whois online from all except admins on viewonline

by 5hocK » Thu Jul 03, 2014 11:38 am

See the post viewtopic.php?f=46&t=2250281#p13666271
The only difference between the find and replace with is the replace with has <!-- IF U_ACP --> before and <!-- ENDIF --> after.

Have you modified those files in any other way? (index_body.html and viewforum_body.html) If not then just have mine :)
5hocK
Registered User
Posts: 3149
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: Hiding whois online from all except admins on viewonline

by TheButcher2 » Thu Jul 03, 2014 11:59 am

Much appreciated it worked like a charm mate.

I uploaded your original (index_body.html and viewforum_body.html) did the find and replace as you suggested in the previous post on viewonline.php and it works like a charm.

Thanks a million

Peace
User avatar
TheButcher2
Registered User
Posts: 1037
Joined: Tue May 13, 2014 11:38 pm