Advertising location template issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johnfl68
    Member
    • Mar 2005
    • 84
    • 3.6.x

    Advertising location template issue

    Hello:

    I have been using the following postbit code:

    Code:
    <if condition="$post[postcount] % $vboptions[maxposts] == 1">
    <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">Sponsored Links</td>
    </tr>
    <tr>
        <td class="alt1" align="center">
                   <script type="text/javascript" src="/js/728x90.js"></script>
        </td>
    </tr>
    </table>
    </div>
    </if>
    If I use as is in the ad_showthread_firstpost template it doesn't show up as it did before, the cell size no longer matches the rest of the page as it did.

    See the attached images (adold and adnew) (yes I know they are from different sites, only one is running the new beta, but gives you an idea of how the cells no longer align.

    Any suggestions to fix this would be appreciated!

    Thanks!

    John
    Attached Files
  • Zachery
    Former vBulletin Support
    • Jul 2002
    • 59097

    #2
    Its because its not in the $spacer area

    Use

    $spacer_open

    at the top of the plugin and

    $spacer_close at the bottom.

    Comment

    • johnfl68
      Member
      • Mar 2005
      • 84
      • 3.6.x

      #3
      Thanks!

      That almost fixes it - the sides are fine now, but the "Sponsored Links" cell is still right on top of the thread cell beneath it, there is no separation at all between them.

      Any ideas?

      Thanks again for the help!

      John

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        Image?

        Comment

        • Mez
          Senior Member
          • Mar 2004
          • 273
          • 3.7.x

          #5
          Code:
          <if condition="$post[postcount] % $vboptions[maxposts] == 1">
          <div style="padding: $stylevar[cellpadding]px 0px 0px 0px; [color=red]margin-botom: $stylevar[cellpadding]px;[/color]">
          <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
          <tr>
              <td class="thead" align="left">Sponsored Links</td>
          </tr>
          <tr>
              <td class="alt1" align="center">
                         <script type="text/javascript" src="/js/728x90.js"></script>
              </td>
          </tr>
          </table>
          </div>
          </if>

          Comment

          • Zachery
            Former vBulletin Support
            • Jul 2002
            • 59097

            #6
            Make it easy why don't you

            Comment

            • johnfl68
              Member
              • Mar 2005
              • 84
              • 3.6.x

              #7
              Sorry, the spacing that I was talking about along the bottom of the "Sponsored Links" cell didn't change from the earlier image (even though the sides changed to what they should be), so I didn't post another.

              I just tried the change from Martin (I assume there should be 2 t's in bottom).

              The spacing is what I would expect, however it seems to be taking on the page background color, and not the page color.

              See the attached image:

              Suggestions?

              Thanks!

              John
              Attached Files

              Comment

              • johnfl68
                Member
                • Mar 2005
                • 84
                • 3.6.x

                #8
                Also, does the ad_showthread_firstpost template take into account already the postcount conditional? Is it doing this twice?

                I assume the Advertising locations were meant to help from havening to add extra code, so I don't know what these are adding (or not adding) to the page, so if there are things that are redundant and can be removed, it would be nice to know.

                Thanks!

                John

                Comment

                • Mez
                  Senior Member
                  • Mar 2004
                  • 273
                  • 3.7.x

                  #9
                  oh, ok, I get it

                  Code:
                  <if condition="$post[postcount] % $vboptions[maxposts] == 1">
                  <div style="padding: $stylevar[cellpadding]px 0px [color=red]$stylevar[cellpadding]px[/color] 0px">
                  <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
                  <tr>
                      <td class="thead" align="left">Sponsored Links</td>
                  </tr>
                  <tr>
                      <td class="alt1" align="center">
                                 <script type="text/javascript" src="/js/728x90.js"></script>
                      </td>
                  </tr>
                  </table>
                  </div>
                  </if>
                  Though you shouldn't need the <if>

                  Comment

                  • Mez
                    Senior Member
                    • Mar 2004
                    • 273
                    • 3.7.x

                    #10
                    Originally posted by johnfl68
                    Also, does the ad_showthread_firstpost template take into account already the postcount conditional? Is it doing this twice?
                    ad_showthread_firstpost shows after the first post, so yes, the conditional isn't needed

                    Comment

                    • Mez
                      Senior Member
                      • Mar 2004
                      • 273
                      • 3.7.x

                      #11
                      Originally posted by Zachery
                      Make it easy why don't you
                      Why not

                      Comment

                      • johnfl68
                        Member
                        • Mar 2005
                        • 84
                        • 3.6.x

                        #12
                        Ok, this seems to be like it was:

                        Code:
                        $spacer_open
                        
                        <div style="padding: $stylevar[cellpadding]px 0px $stylevar[cellpadding]px 0px">
                        
                        <table class="tborder" cellpadding="$stylevar[cellpadding]" 
                        
                        cellspacing="$stylevar[cellspacing]" border="0" width="100%" 
                        
                        align="center">
                        <tr>
                            <td class="thead" align="left">Sponsored Links</td>
                        </tr>
                        <tr>
                            <td class="alt1" align="center">
                                
                                       <script type="text/javascript" src="/js/728x90.js"></script>
                        
                            </td>
                        </tr>
                        </table>
                        
                        </div>
                        
                        $spacer_close
                        And all is well - for now.

                        Thanks for all the help!

                        John

                        Note: the line that says:
                        <script type="text/javascript" src="/js/728x90.js"></script>
                        should be replaced with your own banner code
                        Last edited by johnfl68; Tue 1 Jan '08, 7:40pm. Reason: added note

                        Comment

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