2014-12-05, 07:00 PM
Pages: 1 2
2014-12-11, 03:34 PM
(2014-12-05, 07:00 PM)[email protected] Wrote: [ -> ]How we can add google adsense only to 1st post of thread ? through code or any plugin available ?dear all, still waiting for any help, suggestions
thanks
2014-12-12, 06:11 AM
Download Template Conditionals: http://mybbhacks.zingaburga.com/showthread.php?tid=464 and activate it.
Then add this code to postbit/postbit_classic templates:
Then add this code to postbit/postbit_classic templates:
<if $postcounter == 1 then>
...ad HTML here...
</if>
2014-12-12, 02:23 PM
thanks it worked.
how we can align right within the first post ?
how we can align right within the first post ?
2014-12-13, 03:48 PM
how we can align right within the first post ?
2014-12-13, 06:06 PM
You have to add the adsense div container right above {$post['message']} and also add some inline style into that adsense div.
eg:
eg:
..........<snip>
<div class="post_body scaleimages" id="pid_{$post['pid']}">
<if $postcounter == 1 then>
<div style="display: inline-block;float: right;padding-left: 10px;">
<!--...YOUR ADSENSE SCRIPT...-->
</div>
</if>
{$post['message']}
</div>
<br class="clear" />
<snip>...........
2014-12-18, 08:25 AM
After following your provided code, google ad is coming on right but
my all replies of posts are not showing ??
my all replies of posts are not showing ??
2014-12-18, 01:34 PM
It works for me but you could try it without <br class="clear" />.
[attachment=33328]
<div class="post_body scaleimages" id="pid_{$post['pid']}">
<if $postcounter == 1 then>
<div style="display: inline-block;float: right;padding-left: 10px;">
<!--...YOUR ADSENSE SCRIPT...-->
</div>
</if>
{$post['message']}
</div>
[attachment=33328]
2014-12-31, 01:13 AM
tried condtion above but problem is ad is behind the text. 

2014-12-31, 01:31 AM
The problem is a css styling of your add script.
Try a change in theme global.css from:
to:
Try a change in theme global.css from:
.separator {
margin: 5px;
padding: 0;
height: 0px;
font-size: 1px;
list-style-type: none;
}
to:
.separator {
margin: 5px;
padding: 0;
height: auto;
font-size: 1px;
list-style-type: none;
}
Pages: 1 2