Announcement

Collapse
No announcement yet.

Stop Certain Usergroups From Viewing Who's Online?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stop Certain Usergroups From Viewing Who's Online?

    Is there a way to not show " Users Currently Online " to certain usergroups? I looked under usergroup options and changed Can View Users Online to No but that didnt work. How do I completely stop them from seeing Users Currently Online on the Forumhome? Anyone know? Thanks

  • #2
    You can put the code from the forumhome template (for this particular function) inside a template conditional.

    <if condition="$bbuserinfo['usergroupid'] != '15'">
    the code here that shows the users currently online
    </if>

    This means. The user who browses the page, and is NOT in the usergroupid #15 will see the code.

    Comment


    • #3
      Originally posted by Floris View Post
      You can put the code from the forumhome template (for this particular function) inside a template conditional.

      <if condition="$bbuserinfo['usergroupid'] != '15'">
      the code here that shows the users currently online
      </if>

      This means. The user who browses the page, and is NOT in the usergroupid #15 will see the code.

      What exactly do you mean by the part a made bold?

      Im not good with code talk but I do know how to make changes so can you be just a bit clearer on what to do please. Thanks

      Comment


      • #4
        open FORUMHOME template

        Find this code:
        Code:
        <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]" rel="nofollow">$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]" rel="nofollow"><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>


        And around this code, add the above conditional

        replace the number 15 with the actual usergroupid that should not see it

        Comment


        • #5
          Sweet, thanks bro. That worked like a charm. I can get it to work with 1 usergroup but when I tried to add mutiple usergroups it didnt work. I basically just want staff to be able to see who's online so this is how I did it.

          <if condition="$bbuserinfo['usergroupid'] != '1,2,3,9,10,11,12">

          but that didnt work, am i doing something wrong? well I guess i am since its not working..lol

          Comment


          • #6
            <if condition="!is_member_of($bbuserinfo, 5, 7, 19, 16)">

            Comment


            • #7
              Thanks alot! Worked to perfection

              Comment


              • #8
                I just created a template... Custom_XYZ

                How do i stop specific usergroups from viewing it ?


                thks in advance...

                Comment

                Loading...
                Working...
                X