Announcement

Collapse
No announcement yet.

How can I use conditionals for those with permission

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I use conditionals for those with permission

    I want an image button to appear in the postbit only for moderators in their own forums and I'm having trouble getting the conditional right. I don't want it based on Usergroup ID because then all mods will see it in all forums.

    I've tried:

    Code:
     
    <if condition="can_moderate($foruminfo['forumid']">
    button info here
    </if>
    I get a parse error when trying to save the postbit template.

    What about "$showpermissions", is there such a conditional?

    Thanx.

    ETA: Doesn't matter I've used the 'showadminoptions' conditional and it appears to be working.
    Last edited by PhoenixBB; Mon 14th Jun '04, 5:11am. Reason: Figured it out

  • #2
    I am not familiar with the can_moderate() function, but I see a syntax error in your code. You are missing a parenthesis:

    Code:
     
    <if condition="can_moderate($foruminfo['forumid'])">
    button info here
    </if>

    Comment

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