Hide certain usergroups in whoisonline
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #1
Hide certain usergroups in whoisonline
I wanna like to hide certain usergroup members from being displayed to certain groups in "who is online" list.

is this possible?

for example, i created bot usergroup and installed all bots in this usergroup. if some bots visit the site, they will appear in who is online list and it will annoying if the number is huge to certain groups like members, elite members ....

so can we make the bot usergroup being displayed to certain usergroups like admin, supermod and/or mod?
10-15-2010 06:19 AM
Find all posts by this user Quote this message in a reply
TriTop Offline
Member
***
Posts: 53
Joined: Apr 2008
Post: #2
RE: Hide certain usergroups in whoisonline
I think you have to edit the index.php.
Find:

PHP Code:
eval("\$onlinemembers .= \"".$templates->get("index_whosonline_memberbit", 1, 0)."\";");

replace with:

PHP Code:
if($user['usergroup'] != "x") {
eval("\$onlinemembers .= \"".$templates->get("index_whosonline_memberbit", 1, 0)."\";");
}


Replace "x" with the ID of usergroup you want to hide. Not tested...but should to be working.

10-16-2010 01:56 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #3
RE: Hide certain usergroups in whoisonline
I tried it but it is still showing.
(This post was last modified: 10-16-2010 05:05 AM by 1master1.)
10-16-2010 02:07 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Hide certain usergroups in whoisonline
That will affect the index page, not the online.php if that's what you're thinking.

Again, please state clearly what you did exactly and what exactly is showing.

My Blog
10-16-2010 09:54 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #5
RE: Hide certain usergroups in whoisonline
I had created a usergroup bot which is having gid "13" and i added all the bots to that group. I gave the "Bot" group to view the forum and view the threads. Now i added all the bots to this group.

We see that when bots access the site, they are shown in who is online along with other members and its annoying to check who is member and who is bot.

Don't say that change the bot username style to different that you can find it easily Tongue

I dont want them to be appeared in who is online  for all groups. I just want the bots to visible by certain usergroups only, like Admin, SMod or Mod, so the staff can have a track of it on the live site.

I did the same as mentioned by tritop in index.php file from the host. But it didnt hided the bots.

I also tried by adding the <if statement to the fetch="bots" tag line, but it also failed.

Is there other way to achieve this?
10-16-2010 08:01 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Hide certain usergroups in whoisonline
Find the following in index.php and delete it:

PHP Code:
            $onlinemembers .= $comma.format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']);
            $comma = ", ";


Haven't tested.


My Blog
(This post was last modified: 10-16-2010 09:08 PM by ZiNgA BuRgA.)
10-16-2010 09:07 PM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #7
RE: Hide certain usergroups in whoisonline
i mixed both your idead, tri and zinga. well i added the ($user['usergroup'] == "gid") in the elseif(bots){ --- } statement which is above the line specified by zinga. i'm waiting for a bot to access the site and i check it and inform here.
this may fulfill my requirement of the thread title.

Quote:so can we make the bot usergroup being displayed to certain usergroups like admin, supermod and/or mod?
10-17-2010 06:53 AM
Find all posts by this user Quote this message in a reply
1master1 Offline
Member
***
Posts: 232
Joined: Oct 2010
Post: #8
RE: Hide certain usergroups in whoisonline
mission accomplished. the bots stopped appearing from index, who is online list. Smile now it is appearing only in "who is online complete" list and i have the control of this list. Biggrin
(This post was last modified: 10-17-2010 08:43 AM by 1master1.)
10-17-2010 08:43 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: