Help needed with inconsistantly working conditional

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Martin CX
    Senior Member
    • Nov 2001
    • 151
    • 3.5.x

    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?
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #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

    • Martin CX
      Senior Member
      • Nov 2001
      • 151
      • 3.5.x

      #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...