+ Reply to Thread
Results 1 to 6 of 6

Thread: How To Show A Banner After The First Post In A Thread

  1. #1
    vBulletin Team Jake Bunce has a spectacular aura about Jake Bunce has a spectacular aura about Jake Bunce's Avatar
    Join Date
    Dec 2000
    Location
    Land of the In-N-Out Burger
    Age
    28
    Posts
    46,540

    How To Show A Banner After The First Post In A Thread

    Edit this template:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Postbit Templates -> postbit or postbit_legacy (depending on which layout you are using)

    Add this code to the very bottom of the template:

    Code:
    <if condition="$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>
    Replace the red code with your own banner / ad code.

    The end result will look like the attached picture.
    Attached Images

  2. #2
    vBulletin Team Jake Bunce has a spectacular aura about Jake Bunce has a spectacular aura about Jake Bunce's Avatar
    Join Date
    Dec 2000
    Location
    Land of the In-N-Out Burger
    Age
    28
    Posts
    46,540
    You can show the banner every X posts by using this code instead (changes are marked in blue):

    Code:
    <if condition="$post[postcount] % X == 0">
    
    $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>
    For example, if you want the banner to show every 3 posts, then you would change X to 3.

  3. #3
    vBulletin Team Jake Bunce has a spectacular aura about Jake Bunce has a spectacular aura about Jake Bunce's Avatar
    Join Date
    Dec 2000
    Location
    Land of the In-N-Out Burger
    Age
    28
    Posts
    46,540
    If you want the banner to show only after the last post on every page of a thread, then don't modify the postbit. Edit this template instead:

    Admin CP -> Styles & Templates -> Style Manager -> « » -> Show Thread Templates -> SHOWTHREAD

    Add the red code:

    Code:
    </table>
    <!-- / toolbar -->
    
    <!-- end content table -->
    $spacer_close
    <!-- / end content table -->
    
    <if condition="$show['threadedmode'] OR $show['hybridmode']">
    <!-- thread posts list -->
    $threadlist
    <!-- /thread posts list -->
    </if>
    
    <div id="posts">$postbits</div>
    
    $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
    
    <!-- start content table -->
    $spacer_open
    <!-- / start content table -->
    
    <!-- controls below postbits -->
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr valign="top">
    Depending on the postbit style you are using, you might need to make the change in blue to properly space out the banner from the last post:

    Code:
    </table>
    <!-- / toolbar -->
    
    <!-- end content table -->
    $spacer_close
    <!-- / end content table -->
    
    <if condition="$show['threadedmode'] OR $show['hybridmode']">
    <!-- thread posts list -->
    $threadlist
    <!-- /thread posts list -->
    </if>
    
    <div id="posts">$postbits</div>
    
    $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">
    		BANNER CODE HERE
    	</td>
    </tr>
    </table>
    
    </div>
    $spacer_close
    
    <!-- start content table -->
    $spacer_open
    <!-- / start content table -->
    
    <!-- controls below postbits -->
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr valign="top">

  4. #4
    vBulletin Team Jake Bunce has a spectacular aura about Jake Bunce has a spectacular aura about Jake Bunce's Avatar
    Join Date
    Dec 2000
    Location
    Land of the In-N-Out Burger
    Age
    28
    Posts
    46,540
    (in postbit)

    If you only want guests to see the banners, then add the red code to the condition:

    Code:
    <if condition="$post[postcount] == 1 AND !$bbuserinfo[userid]">
    
    $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>
    Last edited by Jake Bunce; Tue 10th May '05 at 1:42pm.

  5. #5
    vBulletin Team Jake Bunce has a spectacular aura about Jake Bunce has a spectacular aura about Jake Bunce's Avatar
    Join Date
    Dec 2000
    Location
    Land of the In-N-Out Burger
    Age
    28
    Posts
    46,540
    (in postbit)

    If you only want banners to show in specific forums, add the red code to the condition:

    Code:
    <if condition="$post[postcount] == 1 AND in_array($GLOBALS[forumid], array(X,Y,Z))">
    
    $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>
    Where X,Y,Z is a comma-separated list of forumids in which you want the banner to show.

  6. #6
    vBulletin Team Jake Bunce has a spectacular aura about Jake Bunce has a spectacular aura about Jake Bunce's Avatar
    Join Date
    Dec 2000
    Location
    Land of the In-N-Out Burger
    Age
    28
    Posts
    46,540
    (in postbit)

    To show the banner between the last post and second to last post, make the change in blue:

    Code:
    <if condition="$post[postcount] % $vboptions[maxposts] == $vboptions[maxposts] - 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>

+ Reply to Thread

Similar Threads

  1. How do I add a random banner after the first post of a thread?
    By hdtvoice in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 44
    Last Post: Sun 26th Mar '06, 9:39am
  2. re: Show Thread And Post Counts For Forums
    By trulylowcarb in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 3
    Last Post: Thu 9th Sep '04, 3:17am
  3. show 'new thread' button only to those with permission to post
    By RobFitz in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 3
    Last Post: Sat 6th Mar '04, 6:16pm
  4. Show last thread for all groups, but show post´s just for registered user?
    By PcFreak in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 0
    Last Post: Sat 20th Dec '03, 4:16pm
  5. Show post & thread count even when no permissions...
    By RobFerrari in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 6
    Last Post: Sun 2nd Nov '03, 3:52pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts