Announcement

Collapse
No announcement yet.

Template conditional problem

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

  • Template conditional problem

    I'm trying to display an image at the bottom of the first post of every thread (under the controls).
    I'm using this template conditional in postbit_legacy:

    <if condition="($post[postcount] == 1)">
    IMAGE CODE
    </if>

    The side effect is an image shown also in the first post of usernotes.
    How can avoid this?

    Thanks
    Gravitation is not responsible for people falling in love :o
    Ciao

  • #2
    <if condition="THIS_SCRIPT == 'showthread'">
    ...your code...
    </if>

    This should limit it to only showthread.php and not usernote.php

    Comment


    • #3
      This is the second time you give me a good advice,
      thank you very much Floris
      Gravitation is not responsible for people falling in love :o
      Ciao

      Comment


      • #4
        You're welcome. Glad I could help.

        Comment


        • #5
          This is very useful.

          However, the following outputs only the H1 tags and no thread title:

          <if condition="THIS_SCRIPT == 'showthread'">
          <h1 style="align: center; padding-top: 2px; border-top: 2px;">$thread[title]</h1>
          </if>

          This is in my "header" template. The title shows correctly in the browser window, and if I place the h1 in the showthread template, it works perfectly.

          Am I using the wrong variable in this case?
          tormodg
          Senior Member
          Last edited by tormodg; Tue 24 Apr '07, 2:58am. Reason: Wrote h2, meant h1
          Tormod Guldvog
          Hypography - Science for everyone // Science Forums

          Comment


          • #6
            Using $threadinfo[title] worked like a charm...
            Tormod Guldvog
            Hypography - Science for everyone // Science Forums

            Comment

            Loading...
            Working...
            X