Announcement

Collapse
No announcement yet.

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

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

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

    Comment


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

      Comment


      • #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


        • #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


          • #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


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

              Comment


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

                Dave

                Comment


                • #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


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

                    Comment


                    • #25
                      The end of which post on every page?

                      Comment


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

                        Comment


                        • #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 -->
                          
                          HERE
                          
                          <!-- 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


                          • #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


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

                              Comment


                              • #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="$post[postcount] % 10 == 0 OR $post[postcount] == 1">
                                
                                $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">
                                		BANNER CODE HERE
                                	</td>
                                </tr>
                                </table>
                                
                                </div>
                                $spacer_close
                                
                                </if>

                                Comment

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