Announcement

Collapse
No announcement yet.

Help needed with inconsistantly working conditional

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

  • Help needed with inconsistantly working conditional

    I hope somebody can help me.

    If the person who edited a post isn't the poster then I want to show the "edited by..." note only to the administrators and super moderators. So I made this conditional for the bit in the postbit, but it's working erraticly:
    HTML Code:
    <if condition="$post[edit_username] == $post[username] OR ($post[edit_username] != $post[username] AND ($post[usergroupid] == 5 OR $post[usergroupid] == 6))">
    Please, what is the problem?

  • #2
    Use bbuserinfo to check the usergroupid of the logged in user. The $post[] array contains information for the author of the post, not the logged in user:

    <if condition="$post[edit_username] == $post[username] OR ($post[edit_username] != $post[username] AND ($bbuserinfo[usergroupid] == 5 OR $bbuserinfo[usergroupid] == 6))">

    Comment


    • #3
      Originally posted by Jake Bunce
      Use bbuserinfo to check the usergroupid of the logged in user. The $post[] array contains information for the author of the post, not the logged in user:
      Thank you!

      Comment

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