Announcement

Collapse
No announcement yet.

Add Detailed IP Info Modal to the Who's Online page

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    6 is Administrator. The CSS is for those usergroups you don't want to see the new IP link by hiding it, not the one who should see the new IP link.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #17
      Originally posted by glennrocksvb View Post
      this also means that this mod cannot be done in vbcloud as it does not allow to edit existing vb5 templates.

      boooooo

      Comment


      • glennrocksvb
        glennrocksvb commented
        Editing a comment
        There must be workaround to it.

      #18
      I corrected the HTML Code I cited in post #15 (input error). This is now what I have added to css_additional.css:
      Code:
      /* Hide Detailed IP Info link with Modal - START */
      #vb-page-body[data-usergroupid="5"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="7"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="20"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="29"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="30"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="31"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="32"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="33"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="34"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="35"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="36"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="37"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="38"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="39"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="43"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="44"] .resolveIpLink-new,
      #vb-page-body[data-usergroupid="53"] .resolveIpLink-new {
      display: none;
      }
      /* Hide Detailed IP Info link with Modal - END */
      The mod works as described, and with the above, I've limited the additional information to just the Administrators.

      The Linux Community has given me much. I do what I can to return the favor!

      Comment


        #19
        Glad it's now working.

        You have a lot of usergroups. Which usergroups did you restrict the Who's Online module permissions to? Did you allow those usergroups to see the module?
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


          #20
          In our case, those listed in the css_additional.css are the usergoups who can see Who's Online. My understanding (correct me if I'm wrong) is that this MOD allows the additional information to be accessed by those usergroups who are allowed to access Who's Online, and the css_additional.css entry simply prevents identified usergroups from seeing the additional data the MOD provides.

          Do I have that right?
          The Linux Community has given me much. I do what I can to return the favor!

          Comment


            #21
            Every vB5 module has module-level permissions to restrict which usergroups to view that module. This is true even without this mod. I don't know how you set the module-level permissions for the Who's Online module. Let's say you set the module to be viewable by Administrators, Moderators and Super Moderators only. These users would be able to see the Who's Online module itself. Now if you installed this mod and let's say you wanted the new IP link with modal to be only available to Administrator, then the CSS code would be:
            Code:
            /* Hide Detailed IP Info link with Modal - START */
            #vb-page-body[data-usergroupid="5"] .resolveIpLink-new,
            #vb-page-body[data-usergroupid="7"] .resolveIpLink-new {
                display: none;
            }
            /* Hide Detailed IP Info link with Modal - END */
            The usergroup IDs 5 and 7 are Super Moderators and Moderators, respectively. Specifying their usergroupd IDs in the CSS will hide the new IP link to them and thus only Administrator will see it.
            Helpful? Donate. Thanks!
            Buy me a coffeePayPal QR Code
            Fast VPS Host for vBulletin:
            A2 Hosting & IONOS

            Comment


              #22
              Step 1.
              Edit Navigation Bar > Who's Online
              Click image for larger version  Name:	Screen Shot 2022-02-03 at 4.02.53 PM.png Views:	0 Size:	344.8 KB ID:	23611

              Step 2:
              Click image for larger version  Name:	Screen Shot 2022-02-03 at 3.52.57 PM.png Views:	0 Size:	388.2 KB ID:	23612

              Step 3.
              Select User Groups who have permission to see Who's Online
              Click image for larger version  Name:	Screen Shot 2022-02-03 at 3.54.18 PM.png Views:	0 Size:	391.9 KB ID:	23613

              Step 4.
              Click OK and Save

              The above makes the Who's Online 'tab' available only to those selected User Groups.

              The MOD makes additional IP info available to any user group who has permission to Who's Online, and the css_additional.css code I have prevents user groups (identified in the css_additional.css code) from seeing the additional IP info.

              I hope I have that right.
              The Linux Community has given me much. I do what I can to return the favor!

              Comment


                #23
                That looks right.

                If you want to see the detailed IP Info modal to just one or fewer usergroups than the module permissions, you could shorten the CSS by using this code instead:

                Code:
                /* Hide Detailed IP Info link with Modal - START */
                #vb-page-body:not([data-usergroupid="6"]) .resolveIpLink-new {
                     display: none;
                }
                /* Hide Detailed IP Info link with Modal - END */
                The code is saying if the usergroup ID is NOT 6, hide the new IP link. So specify the usergroup ID that you DO want to see the new IP link.

                To add another usergroup, then append :not([data-usergroupid="XXX"]) to the existing CSS rule and then change XXX to the desired usergroup ID. For example:
                Code:
                #vb-page-body:not([data-usergroupid="6"]):not([data-usergroupid="5"]):not([data-usergroupid="7"]) .resolveIpLink-new {
                     display: none;
                }
                The above CSS code means if usergroup ID is not 6 AND not 5 AND not 7, then hide the new IP link.
                Last edited by glennrocksvb; 02-03-2022, 03:14 PM.
                Helpful? Donate. Thanks!
                Buy me a coffeePayPal QR Code
                Fast VPS Host for vBulletin:
                A2 Hosting & IONOS

                Comment


                  #24
                  Oh yes! I like that bit code much better! Going to make that change right now.
                  The Linux Community has given me much. I do what I can to return the favor!

                  Comment


                    #25
                    Originally posted by glennrocksvb View Post
                    To add another usergroup, then add another CSS rule #vb-page-body:not([data-usergroupid="XXX"]) .resolveIpLink-new separated by comma and then change XXX to the desired usergroup ID.
                    I just realized this part is wrong. I'll post the updated instructions later.
                    Helpful? Donate. Thanks!
                    Buy me a coffeePayPal QR Code
                    Fast VPS Host for vBulletin:
                    A2 Hosting & IONOS

                    Comment


                    • glennrocksvb
                      glennrocksvb commented
                      Editing a comment
                      Updated post #23.

                    #26
                    Originally posted by glennrocksvb View Post
                    Go to the Who's Online page on your forum (/online) to confirm the change is working. See sample IP Address modal below:
                    what i did wrong

                    Comment


                    • glennrocksvb
                      glennrocksvb commented
                      Editing a comment
                      I don't know what exactly you did wrong. Maybe there's a missing end tag. Revert your changes and then try again.

                    #27
                    I dit it to another template and worked

                    Comment


                    • mofeu
                      mofeu commented
                      Editing a comment
                      thank you very much

                    • glennrocksvb
                      glennrocksvb commented
                      Editing a comment
                      Glad you got it working.

                    #28
                    Updated first post for mobile. Previously, it wasn't working for mobile.
                    Helpful? Donate. Thanks!
                    Buy me a coffeePayPal QR Code
                    Fast VPS Host for vBulletin:
                    A2 Hosting & IONOS

                    Comment


                      #29
                      Hi Glenn

                      There are 2 lines containing the line to be replaced, shall I replace both or ?

                      Thank you.

                      Comment


                        #30
                        There are 2 instances of the code to be replaced as mentioned in Steps 8 and 10.
                        Helpful? Donate. Thanks!
                        Buy me a coffeePayPal QR Code
                        Fast VPS Host for vBulletin:
                        A2 Hosting & IONOS

                        Comment

                        Users Viewing This Page

                        Collapse

                        There is 1 user viewing this forum topic.

                        • Guest Guest

                        Latest Posts

                        Collapse

                        Working...
                        X
                        Searching...Please wait.
                        An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                        Please push the back button and reload the previous window.'
                        An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                        Please push the back button and reload the previous window.'
                        An internal error has occurred and the module cannot be displayed.
                        There are no results that meet this criteria.
                        Search Result for "|||"