1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
    Dismiss Notice
  3. 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.

Staff Online - Show More Than "Admins" and "Mods"

Discussion in 'Template Modifications [Archive]' started by Facepalmx2, Oct 10, 2010.

  1. Facepalmx2

    Facepalmx2 Active Member

    Instead of having just "Administrative" and "Moderating" as the two groups on the forum home, how about adding another usergroup?

    It's rather easy. It requires one template edit, and finding the user_group_id of another group. :)
    or if we push hard enough, we should be able to get it... :p

    Find the usergroup id.
    Go to your Admin CP > Users Tab > List User groups.
    Select the group you want, as if you were going to edit the usergroup.
    Now, in the url, you'll see something like this:
    You need to be looking at: /administrative.3/
    3 is your usergroup id for that group.

    Once you've figured that out, you can move onto step two.

    Second (and finally):
    Go to your Templates Editor (under the Appearance tab) and find "sidebar_online_users"
    <xen:if is="{$user.is_moderator} OR {$user.is_admin}">

    After the last } add:
    OR {$user.user_group_id} == YOUR_USERGROUP_ID_HERE
    so, I would put 5 in my template, because the usergroup id of my "trusted members/moderators" is 5. Yours will most likely differ.

    Once you are done, you should have the output as such:

    Enjoy :)
  2. dutchbb

    dutchbb Well-Known Member

    SSROCK101 likes this.
  3. ArnyVee

    ArnyVee Well-Known Member

    Very cool, thanks for sharing. :)
    SSROCK101 likes this.
  4. CyberAP

    CyberAP Well-Known Member

    That thing should really be in beta 2.
    SSROCK101 likes this.
  5. Facepalmx2

    Facepalmx2 Active Member

    I'd love to see an option "show in staff list" :)
  6. dutchbb

    dutchbb Well-Known Member

    Not sure about the need for a default option, since most staff will be moderator or admin and show up anyway.
    SSROCK101 likes this.
  7. Brogan

    Brogan XenForo Moderator Staff Member

    SSROCK101 likes this.
  8. pjfry

    pjfry Active Member


    this is really nice work.

    I've got one question:

    Does this term:
    OR {$user.user_group_id} == YOUR_USERGROUP_ID_HERE
    work for both primary and secondary group? I tried this and for me I think this work only for primary group-members. Thank for help!

    SSROCK101 likes this.
  9. dmnkhhn

    dmnkhhn Active Member

    Primary usergroup only.

    SSROCK101 likes this.
  10. pjfry

    pjfry Active Member

    SSROCK101 likes this.
  11. Jo.

    Jo. Well-Known Member

    hmm, I can't get this to work. I'm trying to add my mods to the staff online box, who are 'secret mods' ie. not 'made a moderator' but given moderating as primary usergroup. The number for the moderating usergroup is 4.

    So this is what I've put into the template:

    <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {$user.4}">

    what am I doing wrong?
  12. Brogan

    Brogan XenForo Moderator Staff Member

    It needs to be like this Jo:

    <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {$user.user_group_id} == 4">
    Jo. likes this.
  13. Jo.

    Jo. Well-Known Member

    ahh, thanks Brogan! much appreciated! :)
  14. Kane Hart

    Kane Hart Active Member

    Thanks for this worked perfectly!
  15. gmaister22

    gmaister22 Active Member

    greaaaaaaaat one bro!
  16. Sylar

    Sylar Well-Known Member

    Super duper! Thanks!
  17. CRDeveloper

    CRDeveloper Member

  18. Thom Tyler

    Thom Tyler Active Member

    Cheers, implemented it on my site.
  19. ChemicalKicks

    ChemicalKicks Well-Known Member

    This is fantastic, I actually used this the other way around. I didn't want to show as staff so removed this " OR {$user.is_admin}" and all is fine now. :)
  20. sconcau84

    sconcau84 Member

    Ciao Brogan, non riesco a far funzionare la MOD con la versione RC5.
    Se elimino MOD o Admin funziona, ma se aggiungo un ID non succede niente.....
    E' cambiato qualcosa?

    Google Translate
    HelloBrogan, I can notrun themodwith theRC5version.
    If I deleteMOD orAdminworks, butif I addan IDnothing happens.....
    And'anything changed?
    <xen:if is="{$user.is_moderator} OR {$user.is_admin} OR {$user.user_group_id} == 17">

Share This Page