PDA

View Full Version : A Neater Google Adsense After First Post



admin
06-05-2010, 05:33 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 from vbstyles.com 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:


<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:

.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: http://www.forumcentral1.com/spammin...tml#post253799 (http://www.forumcentral1.com/spamming-central/189289-neater-google-adsense-after-first-post.html#post253799)
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.

Screenshots
http://img.photo.zing.vn/file_uploads/gallery/1024x768/2010/05/06/05/51511273142026.jpg