Conditional Sytax based on Attachments

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Neutral Singh
    Senior Member
    • Sep 2004
    • 232
    • 3.8.x

    Conditional Sytax based on Attachments

    What will be the syntax if i want something to be done based on: if there is an attachment or not in a thread. Thanx

    e.g.

    If there is an attachment
    do this

    else
    do this

  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    The condition already present in the postbit/postbit_legacy template is:

    HTML Code:
    <vb:if condition="$show['attachments']">all attachment code</vb:if>

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment

    • Neutral Singh
      Senior Member
      • Sep 2004
      • 232
      • 3.8.x

      #3
      Would this conditional work on 3.8 (i posted this in 3.8 forum!). Let me rephrase if there is no attachment it shows something else and if there is one attachment it shows something else. Thanks!

      Comment

      • Lynne
        Former vBulletin Support
        • Oct 2004
        • 26255

        #4
        Whoops, sorry, try it without the vb stuff:

        HTML Code:
        <if condition="$show['attachments']">all attachment code</if>

        Please don't PM or VM me for support - I only help out in the threads.
        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
        Want help modifying your vbulletin forum? Head on over to vbulletin.org
        If I post CSS and you don't know where it goes, throw it into the additional.css template.

        W3Schools &lt;- awesome site for html/css help

        Comment

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