PDA

View Full Version : limit viewing of "currently active users"


45wheelgun
03-03-2010, 06:07 PM
I would like to limit the viewing of the list of "currently active users" on the main forum page to 3 user groups only (admin/mod/supermod). I can't seem to find a switch in the settings or a hack on vbulletin.org that addresses this need.

Seem like the syntax shouldn't be to hard, but I don't trust myself to not screw it up. Can someone give me the short answer? IE: add the following to thisorthat template before/after thisorthat code.

Thanks,
Dave

--------------- Added 1267702664 at 1267702664 ---------------

Bump to the top. I am assuming this is just a conditional wrapped around the existing code. Can some one throw me a bone?

ChopSuey
03-04-2010, 12:41 PM
Use IF Condition to show to the usergroups that you want. But if they go to yousite.com/online.php they will still be able to see it.

swiper the fox
03-04-2010, 03:49 PM
AdminCP ---- Usergroups----Usergroup Manager
Edit usergroup & find:

Who's Online Permissions

Can View Who's Online Yes No <=== choose here whether you want viewing or not

is this what you are looking for ?

45wheelgun
03-04-2010, 05:37 PM
Use IF Condition to show to the usergroups that you want. But if they go to yousite.com/online.php they will still be able to see it.

I have online.php turned off based on user group permissions.

I am referring to the "currently active users" list that appears on the forum home page in the "What's going on" area. My moderators and I find that a handy tool, but we don't want it visible to the public. Unlike the online.php, "currently active users" only has an "on/off" switch in the adminCP, it doesn't appear in the user group permissions.

I was hoping someone could point me to the template I need to edit. I am thinking it is the forum home template. I think I only need to edit the "logged in" section as I have it turned off for visitors. I was hoping for someone to point me to the section of code that need the If Condition in front of it and the /IF at the end, along with the proper syntax to make it happen.

Thank you for the replies everyone.

Dave

--------------- Added 1267731761 at 1267731761 ---------------

Can View Who's Online Yes No <=== choose here whether you want viewing or not

is this what you are looking for ?

Actually, no, but thanks. I have that turned off for the user groups, but I am referring to the list that appears in the "What is going on?" section. I have that list set so it only shows to people who are logged in, but i want to restrict it even more and only show it to Mods/Admins.

borbole
03-04-2010, 08:16 PM
Find that part where logged in users is defined and place it inside the if conditional:

<if condition="is_member_of($bbuserinfo, 5,6,7)">the code here</if> and it should do the trick.

I don''t use vb 3 but if you would post the appropriate code here I will make the changes for you.

45wheelgun
03-04-2010, 11:37 PM
Thank you for the replies. I think this is the code I need from the forumhome template. Hopefully someone here can confirm I have the correct spot:

<if condition="$show['loggedinusers']">
<!-- logged-in users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
<a href="online.php$session[sessionurl_q]">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
<tr>
<td class="alt2"><a href="online.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
<div>$activeusers</div>
</div>
</td>
</tr>
</tbody>
<!-- end logged-in users -->
</if>

ChopSuey
03-05-2010, 04:29 AM
NO you have the correct spot.
Here ya go
<if condition="is_member_of($bbuserinfo, 5,6,7)">
<if condition="$show['loggedinusers']">
<!-- logged-in users -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_activeusers')"><img id="collapseimg_forumhome_activeusers" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_activeusers].gif" alt="" border="0" /></a>
<a href="online.php$session[sessionurl_q]">$vbphrase[currently_active_users]</a>: $totalonline (<phrase 1="$numberregistered" 2="$numberguest">$vbphrase[x_members_and_y_guests]</phrase>)
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_activeusers" style="$vbcollapse[collapseobj_forumhome_activeusers]">
<tr>
<td class="alt2"><a href="online.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/whos_online.gif" alt="$vbphrase[view_whos_online]" border="0" /></a></td>
<td class="alt1" width="100%">
<div class="smallfont">
<div style="white-space: nowrap"><phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">$vbphrase[most_users_ever_online_was_x_y_at_z]</phrase></div>
<div>$activeusers</div>
</div>
</td>
</tr>
</tbody>
<!-- end logged-in users -->
</if>
</if>

borbole
03-05-2010, 08:48 AM
That should do it.