Absence after first post using 3 conditionals

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MRGTB
    Senior Member
    • May 2005
    • 5454

    Absence after first post using 3 conditionals

    I'm thinking this will work OK, but I just want to double check.

    I'm using 3 conditonals for these reasons below.

    1: To show the adsence after the first post on every page.
    2: To only show the adsence to 3 usergroups (1,3,4).
    3: Hide the adsence from being displayed after the first post on certain private staff forum boards.

    Code:
    <!-- adsence block start -->
    [COLOR=red]<if condition="$post[postcount] % $vboptions[maxposts] == 1"> [/COLOR]
    [COLOR=red]<if condition="is_member_of($bbuserinfo, 1, 3, 4)">[/COLOR]
    [COLOR=red]<if condition="!in_array($forumid, array(16,17,18,19))">[/COLOR]
    <div style="padding: $stylevar[cellpadding]px 0px 0px 0px">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
    <td class="thead" align="left"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" />&nbsp;Site Sponsor</td>
    </tr>
    <tr>
    <td class="alt1" align="center">
    <!-- code start -->
    ADSENCE CODE HERE
    <!-- / code end -->
    </td>
    </tr>
    </table>
    </div>
    [COLOR=red]</if>[/COLOR]
    [COLOR=red]</if>[/COLOR]
    [COLOR=red]</if>[/COLOR]
    <!-- / adsence block end -->
    Does that look OK and will it work right!
  • Colin F
    Senior Member
    • May 2004
    • 17689

    #2
    That looks correct to me
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment

    • MRGTB
      Senior Member
      • May 2005
      • 5454

      #3
      Thanks for double checking it

      Comment

      • rocky123
        New Member
        • Apr 2006
        • 22

        #4
        Hello, could you please let me know where does this code goes?

        Comment

        • Wayne Luke
          vBulletin Technical Support Lead
          • Aug 2000
          • 74123

          #5
          That particular code most likely goes in the postbit and/or postbit legacy template(s) at the bottom of the existing code.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment

          • rocky123
            New Member
            • Apr 2006
            • 22

            #6
            Originally posted by Wayne Luke
            That particular code most likely goes in the postbit and/or postbit legacy template(s) at the bottom of the existing code.

            thank you

            Comment

            • rocky123
              New Member
              • Apr 2006
              • 22

              #7
              But there is a problem to have that first if statement. If you say
              Code:
              [COLOR=red]<if condition="$post[postcount] % $vboptions[maxposts] == 1">[/COLOR]
              then after every first reply you post, it goes to that perticular advertisement that you have provided whihc shows right after the first post.

              Does anyone has a solution for this one?

              Comment

              • Jose Amaral Rego
                Senior Member
                • Feb 2005
                • 11058
                • 1.1.x

                #8
                You might want to add this if you did not already. It is not to display in certain templates of your forum. This is just two places, but more area like register template or who's online are others.
                Code:
                <if condition="THIS_SCRIPT != 'register' OR THIS_SCRIPT != 'usercp'"></if>
                Last edited by Jose Amaral Rego; Sat 26 May '07, 7:37pm.

                Comment

                • MRGTB
                  Senior Member
                  • May 2005
                  • 5454

                  #9
                  Originally posted by rocky123
                  But there is a problem to have that first if statement. If you say
                  Code:
                  [COLOR=red]<if condition="$post[postcount] % $vboptions[maxposts] == 1">[/COLOR]
                  then after every first reply you post, it goes to that perticular advertisement that you have provided whihc shows right after the first post.

                  Does anyone has a solution for this one?
                  That's what its supposed to do. Show a banner add after every first post in a thread on each new page it make contain.

                  However, I found there was another problem though with this. If you have some private hidden forum boards. It still shows the banner adds after the first post in them forums also. Does anybody know how you can stop the banners from being displayed after the first post in threads in specific forums that are hidden staff forums
                  Last edited by MRGTB; Sat 14 Apr '07, 10:46am.

                  Comment

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