Need Help With A Conditional

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • soletrader
    Senior Member
    • Jul 2006
    • 559

    Need Help With A Conditional

    I would to receive some coding help on a conditional.

    I am trying to add this coding into my postbit template:

    Code:
    [FONT=Courier New]<if condition="$post['userid']"><div>iTrader: (<b><a href="itrader.php?$session[sessionurl]u=$post[userid]">$post[itrader_total]</a></b>)</div></if>[/FONT]
    I want to add a conditional for this to only show in select forums.

    Is there a way to alter the coding to do this? Thank you in advance.
  • soletrader
    Senior Member
    • Jul 2006
    • 559

    #2
    Any help?

    Comment

    • peterska2
      Senior Member
      • Oct 2003
      • 8869
      • 3.7.x

      #3
      Replace the part befoe the <div> with

      Code:
      <if condition="$post[userid] && in_array($forum[forumid], array(x,y,z))">
      If thats not right try
      Code:
      $thread[forumid]
      Replace x,y,z with a comma seperated list of the forums youwant it to show in.

      Comment

      • soletrader
        Senior Member
        • Jul 2006
        • 559

        #4
        Thank you peter. It worked perfectly.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎