PDA

View Full Version : A Neater Google Adsense After First Post



PandavB
11-02-14, 02:40 PM
Ok, so i haven't found any google adsence products for vb 4 yet that sit neatly under your first post only, on every page. Credits to Miko and my self for a few tiny edits.

How To Install
Step.1:
GoTo Postbit Templates>>open postbit_legacy and add at the very bottom:

Code:

<vb:if condition="$post['isfirstshown']">
<li class="firstpost_advert_container"><div class="firstpost_advert">
REPLACE THIS WITH YOUR ADSENSE CODE HERE
</div>
</li>
</vb:if>

Step.2:
GoTo CSS Templates>>open additional.css and add this code:

Code:

.firstpost_advert_container {
clear: both;
display: block;
float: left;
margin-bottom: 12px;
position: relative;
width: 100%;
border: 1px solid #E5E6F4;
}

.firstpost_advert {
with: 100%;
background: #F1F1FA;
border: 1px solid #fff;
min-height: 90px;
margin: 0;
padding: 7px;
text-align: center;
vertical-align: middle;
}
Feel free to customize to your needs, i had to mess around to suit my custom style. I changed the min-height to 90px for a neater look for 728x90 ads and changed margin-bottom: to 18px. But how the code is above is perfect for Vbulletin 4 Default.
DEMO: Teen Forums
Please Note: im not a coder, i just wanted to share this with others, its VERY easy to add to your styles and looks neat. Good Luck.
This coding is also different than Mod Version: 1.00, by Allan. You shouldn't have any problems with this and it will do you till a product version comes out.