PDA

View Full Version : need some help with ads in postbit [3.7]


aj8690
02-01-2008, 11:21 PM
Hello. :)

I'm having a bit of trouble placing an advertisement in the first post of every thread properly. I'm trying to place a 300x250 square inside the first post of each thread, aligned to the right.

Here is what I have done to my postbit:

This is the ORIGINAL:
<!-- message -->
<div id="post_message_$post[postid]" class="post_message">$post[message]</div>
<!-- / message -->

I changed it to this:


<!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<table class="tborder" cellpadding="0" cellspacing="1" border="0" width="302" align="right">
<tr>
<td class="alt1"><center><script src="http://tag.contextweb.com/TagPublish/getjs.aspx?action=VIEWAD&cwrun=200&cwadformat=300X250&cwpid=504309&cwwidth=300&cwheight=250&cwpnet=1&cwtagid=18849"></script></center></td>
</tr>
</table>
</if>
<div id="post_message_$post[postid]" class="post_message">$post[message]</div>
<!-- / message -->


On lengthy posts it looks good, but in short posts it messes up the sig and the quote, edit, etc. buttons. (see attachment).

Is there a way to make it so that it will "push" the quote, edit, etc. area down instead of making it go to the left of it?

I found a site where they basically did the same thing (but with adsense) and it doesn't mess up the buttons there, so I know it's possible (http://www.modmymoto.com/forums/showthread.php?t=66756).

Any suggestions are appreciated. Thanks!

SEOvB
02-02-2008, 03:13 PM
<!-- message -->

<div id="post_message_$post[postid]" class="post_message">
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<div style="float: right; margin: 3px; padding 3px;">PLACE AD CODE HERE
</div>
</if>
$post[message]</div>
<!-- / message -->


After
$template_hook[postbit_signature_start]

add

<div style="clear: both; height: 5%; border-width: 1px 0 0 0; border-style: solid; border-color: black; vertical-align: middle; padding: 5; margin: 5;"><br />

Then after
<!-- / controls -->


Add

</div>


Demo (http://maddengods.org/f5/worst-playbook-207.html) I've changed my CSS slightly from whats posted above, but this is the effect that it will give.

aj8690
02-02-2008, 03:33 PM
Thank you. That's strange, though...because it looks like the website I posted has made it so the buttons do get pushed down somehow...oh well.

Thank you.

Edit: THANK YOU! Your edited post worked like a charm! The only thing I changed is

<div style="clear: both; height: 5%; border-width: 1px 0 0 0; border-style: solid; border-color: black; vertical-align: middle; padding: 5; margin: 5;"><br />

To this:

<div style="clear: both; height: 5%; border-width: 0px 0 0 0; border-style: solid; border-color: black; vertical-align: middle; padding: 5; margin: 5;"><br />

Otherwise, there's a line in the middle of the post. Thanks! Works great! :D