1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

"X Online Now"

Discussion in 'Add-on Requests [Archive]' started by Andrej, Nov 21, 2011.

Thread Status:
Not open for further replies.
  1. Andrej

    Andrej Well-Known Member

    I am looking for a add-on that could put a box (almost identical to the "Staff Online Now" box) and it would only show users from usergroup ID (5 for example) , and the block placement would be right under the "Staff Online Now" block. It could be called "Sponsors Online Now" or anything else. :)

    Optional:
    - Option set in Admin Control Panel where one could specify the ID of the usergroup(s), or particular users to show, and placement options.

    Contact me if you are interested (free/paid)
     
    dutchbb likes this.
  2. dutchbb

    dutchbb Well-Known Member

  3. Andrej

    Andrej Well-Known Member

  4. dutchbb

    dutchbb Well-Known Member

    I didn't try it, but if you remove the admin and mod part, add your own user group conditional, and use the html in a new block, it should show any user group you want, no?
     
  5. Andrej

    Andrej Well-Known Member

  6. dutchbb

    dutchbb Well-Known Member

    Maybe I'm not understanding you correctly, but it seems to work fine for me:

    sponsors_block.png

    I added this code below the staff block:

    HTML:
    <!-- block: sidebar_online_sponsors -->
    <xen:if hascontent="true">
        <div class="section staffOnline avatarList">
            <div class="secondaryContent">
                <h3>Sponsors Online Now</h3>
                <ul>
                    <xen:contentcheck>
                        <xen:foreach loop="$onlineUsers.records" value="$user">
                            <xen:if is="{$user.user_group_id} == 6">
                                <li>
                                    <xen:avatar user="$user" size="s" img="true" />
                                    <xen:username user="$user" rich="true" />
                                    <div class="userTitle">{xen:helper userTitle, $user}</div>
                                </li>
                            </xen:if>
                        </xen:foreach>
                    </xen:contentcheck>
                </ul>
            </div>
        </div>
    </xen:if>
    <!-- end block: sidebar_online_sponsors -->
     
  7. Andrej

    Andrej Well-Known Member

    Did you assign the user as a moderator or anything? Doesn't work here...
     
  8. dutchbb

    dutchbb Well-Known Member

    No. I created a new user group 'Sponsors' with the ID 6. Then I put the user 'XenForo' in that user group. Then added the HTML above.
     
  9. Andrej

    Andrej Well-Known Member

    I can't get it working no matter what. Are you doing this on the 1.1 RS release? I'l try to do this on localhost..
     
  10. dutchbb

    dutchbb Well-Known Member

    1.1. RC1 yes.
     
  11. Andrej

    Andrej Well-Known Member

    Working on Localhost, but not on my live forum. I have the same setup on localhost as in the live forum...
     
  12. ragtek

    ragtek Guest

    the posted code will only work for PRIMARY user group check


    instead of
    <xen:if is="{$user.user_group_id} == 6"> you'll need the group check template helper
     
    Andrej and dutchbb like this.
  13. Andrej

    Andrej Well-Known Member

    At both users I have group id 5 as primary. It works on localhost, but not on my live site. I can't get what's wrong.

    It's understandable that if it works on localhost, why it won't work at my live site? Maybe you could take a look please...
     
  14. Andy.N

    Andy.N Well-Known Member

    What is group check template helper? Can you post an example? I have some member who is in secondary group which I like to check.
     
  15. Brogan

    Brogan XenForo Moderator Staff Member

    <xen:if is="{xen:helper ismemberof, $visitor, x}">
     
  16. Andrej

    Andrej Well-Known Member

    Okay thanks to dutchbb my issue was resolved.
     
  17. Andy.N

    Andy.N Well-Known Member

    What is the difference and when we use that and this
    <xen:if is="{xen:helper ismemberof, $user, x}">
     
  18. Brogan

    Brogan XenForo Moderator Staff Member

    It depends on the template.
     
  19. Andy.N

    Andy.N Well-Known Member

    Can you tell me which template to use what? Is there any document on it?
     
  20. Fuhrmann

    Fuhrmann Well-Known Member

Thread Status:
Not open for further replies.

Share This Page