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

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Jake Bunce
    replied
    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>

    Leave a comment:


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

    Leave a comment:


  • kevinrstruck
    replied
    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.**********

    Leave a comment:


  • Jake Bunce
    replied
    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.

    Leave a comment:


  • lighterrr
    replied
    The post that is above the POST REPLY button.

    Leave a comment:


  • Jake Bunce
    replied
    The end of which post on every page?

    Leave a comment:


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

    Leave a comment:


  • Jake Bunce
    replied
    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.

    Leave a comment:


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

    Dave

    Leave a comment:


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

    Leave a comment:


  • hdtvoice
    replied
    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.

    Leave a comment:


  • Jake Bunce
    replied
    Yes, the codes posted in this thread will work in 3.0.6.

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

    Leave a comment:


  • Daddy20
    replied
    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?

    Leave a comment:


  • dethfire
    replied
    where does this code get added? I put it at the end of postbit_legacy and nothing renders

    Leave a comment:


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

    Leave a comment:

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