Usergroup Permission Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qubed
    Senior Member
    • Sep 2008
    • 148
    • 3.8.x

    Usergroup Permission Issue

    Hi -

    I am currently having a viewing permission with one of my usergroups. The usergroup is set up to not be able to "view whose online", however, that usergroup is still able to see other members currently online.

    Example:



    And with those settings listed above, this usergroup can still see this:



    Do i need to change something else somewhere? Let me know as I am terribly perplexed.
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24358
    • 5.7.X

    #2
    From Admin Help:

    This permission allows members of this group to view the online.php page. This page shows a detailed list of currently active users, their locations, etc. This permission only applies to online.php, not the "Currently Active Users" list on the forumhome page.
    If you wish to hide that part of the FORUMHOME page, you'll need to look into using a conditional statement to only show it to certain usergroups. There's more information available here regarding what you could use:

    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • qubed
      Senior Member
      • Sep 2008
      • 148
      • 3.8.x

      #3
      i took a look at that link and im not sure if anyone knows or not, but this is what i determined, i needed to use:

      If Usergroup Is or Is Not X
      --------------------------------------------------
      If the user is not show it to the x usergroup but show it to everyone else

      <if condition="$post['usergroupid'] != 6"></if>
      does anyone know where i would place this statement and if it is perhaps even the right one.

      Comment

      • qubed
        Senior Member
        • Sep 2008
        • 148
        • 3.8.x

        #4
        bump.

        Comment

        • DoE
          Senior Member
          • Sep 2007
          • 763

          #5
          Styles &Templates -> Style Manager -> Edit templates -> Forum Home Templates -> FORUMHOME

          Find: <div>$activeusers</div>

          Replace with: <if condition="is_member_of($vbulletin->userinfo, array(6))"><div>$activeusers</div></if>

          This will show What's going on to admins only. If you want to add other groups, add to the array and seperate with a comma. example: <if condition="is_member_of($vbulletin->userinfo, array(6,5,2))

          Personally I would use a plugin that would handle this; saves editing templates. Besides, why populate $activeusers with a long list that won't be displayed, if you do not have to?

          Comment

          • qubed
            Senior Member
            • Sep 2008
            • 148
            • 3.8.x

            #6
            thanks for the reply,

            does anyone know of a plugin that would do this?

            Comment

            • DoE
              Senior Member
              • Sep 2007
              • 763

              #7
              Plugins & Products -> Add New Plugin

              Product: vBulletin

              Hook Location: forumhome_loggedinuser

              Title: Hide Active Users from Specific Groups

              Execution Order: 5

              Plugin PHP Code:

              if ($vbulletin->userinfo['usergroupid'] != '6')
              {
              $loggedin = '';
              }

              Plugin is Active: Yes

              Then save it.

              This will hide the active users from anyone who is not an admin.

              As you will most likely hide it from most groups, just add AND..... to allow another group to see the list, eg Super Mods:

              if ($vbulletin->userinfo['usergroupid'] != '6' AND $vbulletin->userinfo['usergroupid'] != '5')
              {
              $loggedin = '';
              }

              Comment

              • qubed
                Senior Member
                • Sep 2008
                • 148
                • 3.8.x

                #8
                this is awesome thank you so much. this has worked wonderfully. quick question in addition to follow up on this, i dont mind opening a seperate thread, but if i wanted to hide statistics too, would this be similar to what i would add as well?

                thank you again for this.
                Last edited by qubed; Wed 3 Feb '10, 4:46am.

                Comment

                • DoE
                  Senior Member
                  • Sep 2007
                  • 763

                  #9
                  I haven't looked at the stats, but a template conditional like the one above would work easily.

                  Comment

                  • qubed
                    Senior Member
                    • Sep 2008
                    • 148
                    • 3.8.x

                    #10
                    thanks for the heads up. would this be a plugin id create in the forumhome? if so, are you familiar with which hook location? thank you.
                    Last edited by qubed; Wed 3 Feb '10, 4:45am.

                    Comment

                    • qubed
                      Senior Member
                      • Sep 2008
                      • 148
                      • 3.8.x

                      #11
                      bump

                      Comment

                      • qubed
                        Senior Member
                        • Sep 2008
                        • 148
                        • 3.8.x

                        #12
                        bump.

                        Comment

                        • Trevor Hannant
                          vBulletin Support
                          • Aug 2002
                          • 24358
                          • 5.7.X

                          #13
                          Follow DoE's post when you're creating the plugin and it will work fine.
                          Vote for:

                          - Admin Settable Paid Subscription Reminder Timeframe (vB6)
                          - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

                          Comment

                          • qubed
                            Senior Member
                            • Sep 2008
                            • 148
                            • 3.8.x

                            #14
                            thank you for the response, however, what i dont understand is which hook location to select to put this in to hide the statistics. this is the help i am seeking and the follow up question i was inquiring about in post #10. Thanks!
                            Last edited by qubed; Wed 3 Feb '10, 4:46am.

                            Comment

                            • Trevor Hannant
                              vBulletin Support
                              • Aug 2002
                              • 24358
                              • 5.7.X

                              #15
                              You don't - he's told you to create a plugin which will add the code to the relevant template for you without editing the template.
                              Vote for:

                              - Admin Settable Paid Subscription Reminder Timeframe (vB6)
                              - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

                              Comment

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