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.

Check if a User Can Moderate Forum

Discussion in 'Add-on Releases [Archive]' started by Ghan_04, Jan 28, 2012.

  1. Ghan_04

    Ghan_04 Active Member

    This is a quick mod that I created when we encountered this problem on our roleplaying site:

    We wanted the moderators who run an actual roleplay to have a banner in their postbit reading "Storyteller", but only on posts within that forum. The problem is that most of the template checks like "is moderator" only check the user viewing the thread at that time and not the user who owns a particular post. This helper mod alleviates this issue. How we used it on our board:

    This is in the message_user_info template
    <xen:if is="{xen:helper ismemberof, $user, 24}  AND !{xen:helper ismemberof, $user, 30, 31} AND {xen:helper canmoderate, $forum, $user}">
    <li class="ribbonStaff">
    <div class="left"></div>
    <div class="right"></div>
    This is the first Xenforo mod I've tried to release publicly, so let me know if something doesn't work. I've tested it on our board, but everyone has different stuff. :)

    Attached Files:

    Liam23 and RobinHood like this.
  2. The Dark Wizard

    The Dark Wizard Well-Known Member

    Worked like a charm. Thanks for making this for us. Any one else who encounters this problem can use this.

Share This Page