PDA

View Full Version : disable who's online but still view in acp


joeydood
10-26-2003, 10:00 PM
what this does:
only admins can see who's online by basically removing the requirement for the on/off option in the online.php and hiding a copy of it as adminonlie.php in /forums/admin/.

tested on 2.3.2

no support, i'm not sure if this is even a hack!

here's how to diable who's online and still view it in the acp:

1. edit /forums/online.php:

comment out the following code by putting slashes in front the following lines. this disables the requirement of the option being read in the settings:

//if (!$WOLenable) {
// eval("standarderror(\"".gettemplate("error_whosonlinedisabled")."\");");
//}

2. in online.php replace ALL instances of 'online.php' with 'adminonline.php'. this is so that when the page refreshes automagically, it will call itself, not the standard 'online.php' page.

3. save the online.php to adminonline.php

4. upload adminonline.php to /forums/admin/

5. edit /admin/index.php, put the following line of code after some meaningful place where you want the option to be in your acp navbar:

makenavoption("Users Online","adminonline.php?s=","<br>");

6. disable who's online in the acp so members can't click it.

7. goto acp and click your new link "Users Online" in your navbar.

Dean C
10-27-2003, 08:50 PM
Would be nice if you added your php code in the php tags so it will be easier to read :)

Logician
10-28-2003, 11:09 AM
I can't see how this is different that changing vb usergroup permission ("Can View Who's Online") to restrict WOL view to admins only?

Thx for sharing though..

joeydood
10-28-2003, 12:53 PM
I can't see how this is different that changing vb usergroup permission ("Can View Who's Online") to restrict WOL view to admins only?

Thx for sharing though..

DOH! i'm a newbie, please forgive...

Logician
10-28-2003, 07:43 PM
DOH! i'm a newbie, please forgive...
nothing to forgive.. Please keep hacking and keep sharing.. :) This is what this community is for..