PabloC
Member
Hi,
I have another forum, a phpBB, and i have inside the first, third and last post of each thread, a Google ad. I need help to do the same in Xenforo.
Can you gimme a hand?
This is the code I have on phpBB (viewtopic_body.html)
********************************************
<div style="float:right;"><!-- /1007495/TP-foro-post1 -->
<div id='div-gpt-ad-xxxxxxxxxxxxxxx-1' style='height:250px; width:300px;'>
google ad
</div></div>
<!-- ENDIF -->
<!-- IF postrow.POST_COUNTER == 2 && !postrow.LAST_POST-->
<div style="float:right;">
<!-- /1007495/TP-foro-post3 -->
<div id='div-gpt-ad-xxxxxxxxxxxxxxx-2' style='height:250px; width:300px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1464998982412-2'); });
</script>
</div></div>
<!-- ENDIF -->
<!-- IF postrow.LAST_POST && postrow.POST_COUNTER != 0 -->
<div style="float:right;"><!-- /1007495/TP-foro-postultimo -->
<div id='div-gpt-ad-xxxxxxxxxxxxxxx-3'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1464998982412-3'); });
</script>
</div></div>
********************************************
I need help with the conditions in red:
If there's one post, only show ad 1
If there's 3 posts, only show ad 1 and 3
If more, show 1, 3 and last.
Thanks!
I have another forum, a phpBB, and i have inside the first, third and last post of each thread, a Google ad. I need help to do the same in Xenforo.
Can you gimme a hand?
This is the code I have on phpBB (viewtopic_body.html)
********************************************
<div style="float:right;"><!-- /1007495/TP-foro-post1 -->
<div id='div-gpt-ad-xxxxxxxxxxxxxxx-1' style='height:250px; width:300px;'>
google ad
</div></div>
<!-- ENDIF -->
<!-- IF postrow.POST_COUNTER == 2 && !postrow.LAST_POST-->
<div style="float:right;">
<!-- /1007495/TP-foro-post3 -->
<div id='div-gpt-ad-xxxxxxxxxxxxxxx-2' style='height:250px; width:300px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1464998982412-2'); });
</script>
</div></div>
<!-- ENDIF -->
<!-- IF postrow.LAST_POST && postrow.POST_COUNTER != 0 -->
<div style="float:right;"><!-- /1007495/TP-foro-postultimo -->
<div id='div-gpt-ad-xxxxxxxxxxxxxxx-3'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1464998982412-3'); });
</script>
</div></div>
********************************************
I need help with the conditions in red:
If there's one post, only show ad 1
If there's 3 posts, only show ad 1 and 3
If more, show 1, 3 and last.
Thanks!