Show Users Browsing Threads only for admins

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HumanNature
    Member
    • Apr 2004
    • 41

    Show Users Browsing Threads only for admins

    I am wondering if is posible that only the administrators are able to see "

    Show Users Browsing Threads " and "Show Users Browsing Forum ".

    Thanks
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    It would be possible, however the data would still be called even if it wasnt shown for non admins, that is without hacking, however if you want to show it just for you

    In the showthread template find

    HTML Code:
    <!-- currently active users -->
    <if condition="$show['activeusers']">
    	<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    	<tr>
    		<td class="tcat" colspan="2">
    			<phrase 1="$totalonline" 2="$numberregistered" 3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
    		</td>
    	</tr>
    	<tr>
    		<td class="alt1" colspan="2">
    			<span class="smallfont">$activeusers</span>
    		</td>
    	</tr>
    	</table>
    </if>
    <!-- currently active users -->
    replace with

    HTML Code:
    <if condition="$bbuserinfo[usergroupid] == 6">
    <!-- currently active users -->
    <if condition="$show['activeusers']">
    	<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    	<tr>
    		<td class="tcat" colspan="2">
    			<phrase 1="$totalonline" 2="$numberregistered" 3="$numberguest">$vbphrase[users_viewing_this_thread_x_y_z]</phrase>
    		</td>
    	</tr>
    	<tr>
    		<td class="alt1" colspan="2">
    			<span class="smallfont">$activeusers</span>
    		</td>
    	</tr>
    	</table>
    </if>
    <!-- currently active users -->
    </if>
    In forumhome_forumbit_level1_post

    find
    HTML Code:
    <if condition="$show['browsers']"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
    replace with

    HTML Code:
    <if condition="($show['browsers']) AND ($bbuserinfo[usergroupid] == 6)"><span class="smallfont">(<phrase 1="$forum[browsers]">$vbphrase[x_viewing]</phrase>)</span></if>
    [/html]

    Comment

    • HumanNature
      Member
      • Apr 2004
      • 41

      #3
      Thanks Zachery

      So if I do this the efect over the performance will be the same than if all users are able to see it. Is that what you were saying?

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        Yes, this would be just the same if everyone was seeing it, to make it so only admins caused the tiny bit of extra load you would need to edit files.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...