Announcement

Collapse
No announcement yet.

Need help with a conditional statement

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

  • [Forum] Need help with a conditional statement

    I need some help with the vb4 version of this vb3 conditional statement.

    Code:
    <if condition="$post[postcount] == 1 AND $GLOBALS[threadinfo][replycount] >= 2">
    I would really appreciate if someone could help me with this.


    Thanks,
    SticKer
    Webmaster Forum - Webmaster Marketplace

  • #2
    Try this:
    PHP Code:
    <vb:if condition="$post[postcount] == 1 AND $GLOBALS[threadinfo][replycount] >= 2"
    and make sure that you close the condition with
    PHP Code:
    </vb:if> 
    No private support, only PM me when I ask for it. Support in the forums only.

    Comment


    • #3
      Thank you Hartmut. That worked like a charm.

      With the above code the ad block shows up only on the first page of the thread. Can you help me with what needs to be added to the above code so that it works on all the pages of the thread?
      Webmaster Forum - Webmaster Marketplace

      Comment


      • #4
        I'm not positive but maybe this is doing it already:
        PHP Code:
        <vb:if condition="$post[postcount] == 1"
        and make sure that you close the condition with
        PHP Code:
        </vb:if> 
        No private support, only PM me when I ask for it. Support in the forums only.

        Comment


        • #5
          I doubled checked again and it is showing only on the first page.

          Here's a thread if you would like to check:
          http://www.webicy.com/search-engines...arch-tips.html
          Webmaster Forum - Webmaster Marketplace

          Comment


          • #6
            This is a condition in a postbit template? And you want something to show in the first post only if there are at least 2 replies in the thread? You want to use $post['isfirstshown'] instead of $post['postcount']==1

            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


            • #7
              Thank you Lynne. That did the trick.

              I made the changes as you suggested and it is working exactly like I want it to.

              Thanks again.
              Webmaster Forum - Webmaster Marketplace

              Comment

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