Sunday, September 1, 2013

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

How To Easily Show A Banner After The First Post In A Thread. To display a banner after the first post is actually very easy to do in a vbulletin based websites, therefore today I will give seidkit overview and tutorial on how to display a banner in the first post. For that please you can follow the way - my way below correctly and appropriately.

Here are the instructions:
  • Admin CP
  • Styles & Templates
  • Style Manager
  • « » 
  • Postbit Templates
  • postbit or postbit_legacy (depending on which layout you are using)

Add thecode to the very bottom of the template:
<vb:if condition="$post[postcount] == 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">
  BANNER CODE HERE
 </td>
</tr>
</table>

</div>
</vb:if>


Replace the BANNER CODE HERE with your own banner / ad code.


Here are several other conditions you can use in the above code to show the banner in different places. Simply replace the first "vb:if" statement.
...after the first post on every page (instead of just the first page):
<vb:if condition="$post[postcount] % $vboptions[maxposts] == 1">


...after the first post, but only for guests:
<vb:if condition="$post[postcount] == 1 AND !$bbuserinfo[userid]">


...after the first post, but only if the thread has at least 2 replies (so you never see a banner and only 1 post):
<vb:if condition="$post[postcount] == 1 AND $GLOBALS[threadinfo][replycount] >= 2">


...after the first post, but only in specific forums (where X,Y,Z is a comma list of forumids):
<vb:if condition="$post[postcount] == 1 AND in_array($GLOBALS[forumid], array(X,Y,Z))">


...after every X posts (replace X with a number):
<vb:if condition="$post[postcount] % X == 0">


...after the last post on every page:
<vb:if condition="$post['islastshown']">


You can use pieces of these conditions to do different combinations. For example, this condition will show the banner after the first post on every page (instead of just the first page), but only for guests, and only in certain forums (where X,Y,Z is a comma list of forumids):
<vb:if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !$bbuserinfo[userid] AND in_array($GLOBALS[forumid], array(X,Y,Z))">

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


It is How To Easily Show A Banner After The First Post In A Thread, may be useful and good luck!


thumbnail Title: How To Easily Show A Banner After The First Post In A Thread
Posted by:Stuard Van
Published :2013-09-01T10:00:00-07:00
Rating: 5
Reviewer: 5 Reviews
How To Easily Show A Banner After The First Post In A Thread
Share :
Related articles:

0 comments :

Post a Comment