How do I add a random banner after the first post of a thread?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AlexanderT
    Senior Member
    • Mar 2003
    • 992

    #16
    Originally posted by daemon
    I added the red code. That should work .
    That worked... wonderful! You have my blessings

    Comment

    • dethfire
      Senior Member
      • Mar 2003
      • 475
      • 3.8.x

      #17
      where does this code get added? I put it at the end of postbit_legacy and nothing renders
      http://www.physicsforums.com

      Comment

      • Daddy20
        Member
        • Jan 2005
        • 67
        • 3.6.x

        #18
        Do these codes still work on vB 3.0.6?
        what file to place them in?

        If anyone is using them how do they work?

        Comment

        • Jake Bunce
          Senior Member
          • Dec 2000
          • 46598
          • 3.6.x

          #19
          Yes, the codes posted in this thread will work in 3.0.6.

          The code should be placed in one of the postbit templates.

          Comment

          • hdtvoice
            Member
            • Jun 2003
            • 60

            #20
            you can see it in action on my site - www.hdtvoice.com

            Now i need to figure out how to add the random code (so i can use more than one amazon link) instead of the same code.

            Comment

            • Jake Bunce
              Senior Member
              • Dec 2000
              • 46598
              • 3.6.x

              #21
              You need a banner rotation script of some sort. For help with this I recommend you post on www.vbulletin.org.

              Comment

              • dsmania
                New Member
                • Jan 2005
                • 18

                #22
                Great info...thanks! Any way we can display different sponsors for different forum categories?

                Dave

                Comment

                • Jake Bunce
                  Senior Member
                  • Dec 2000
                  • 46598
                  • 3.6.x

                  #23
                  In the postbit? You can use code like this:

                  Code:
                  <if condition="in_array($GLOBALS[forumid], array(X,Y,Z))">
                  
                  </if>
                  Where X,Y,Z is a comma-separated list of forumids.

                  Comment

                  • lighterrr
                    Member
                    • Oct 2004
                    • 38

                    #24
                    Is it possible to make the ads show at the end of the post, at every page?

                    Comment

                    • Jake Bunce
                      Senior Member
                      • Dec 2000
                      • 46598
                      • 3.6.x

                      #25
                      The end of which post on every page?

                      Comment

                      • lighterrr
                        Member
                        • Oct 2004
                        • 38

                        #26
                        The post that is above the POST REPLY button.

                        Comment

                        • Jake Bunce
                          Senior Member
                          • Dec 2000
                          • 46598
                          • 3.6.x

                          #27
                          In that case, remove the code from the postbit, edit the SHOWTHREAD template, and add your code where indicated:

                          Code:
                          <div id="posts">$postbits</div>
                          
                          <!-- start content table -->
                          $spacer_open
                          <!-- / start content table -->
                          
                          [color=red]HERE[/color]
                          
                          <!-- controls below postbits -->
                          <table cellpadding="0" cellspacing="0" border="0" width="100%">
                          <tr valign="top">
                          	<if condition="$show['largereplybutton']">
                          		<td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$LASTPOSTID"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
                          	<else />
                          		<td class="smallfont">&nbsp;</td>
                          	</if>	
                          	<if condition="$show['pagenav']"><td align="$stylevar[right]">$pagenav</td></if>
                          </tr>
                          </table>
                          <!-- / controls below postbits -->
                          
                          <br />
                          That will always show after the last post on a thread page.

                          Comment

                          • kevinrstruck
                            Member
                            • Dec 2002
                            • 81

                            #28
                            For some reason my Google Adsense will not show up in the space.

                            See: http://thephotostation.net/forums/sh...0&page=1&pp=15

                            The box is there, but nothing in the box.

                            Do I need to do something special with adsense?

                            *****Update: Never mind all of the sudden it works...weird.**********

                            Comment

                            • djwins
                              New Member
                              • Jan 2004
                              • 21

                              #29
                              Anyway to make the ads show every after the first post and every 10 posts (in showthread)?

                              Comment

                              • Jake Bunce
                                Senior Member
                                • Dec 2000
                                • 46598
                                • 3.6.x

                                #30
                                Use code like in the second post in this thread, but add the green code to capture to first post as well:

                                Code:
                                <if condition="[color=blue]$post[postcount] % 10 == 0[/color] [color=green]OR $post[postcount] == 1[/color]">
                                
                                $spacer_open
                                <div style="padding:0px 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">
                                		[color=red]BANNER CODE HERE[/color]
                                	</td>
                                </tr>
                                </table>
                                
                                </div>
                                $spacer_close
                                
                                </if>

                                Comment

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