PDA

View Full Version : Adsense placement after x posts


vexxy
01-29-2012, 10:39 AM
Hey guys,

I want to add an Adsense block after the second post of each thread and I'm wondering what's the condition to achieve this. I've did a search and couldn't find anything but mods which I don't want to install for this small edit.

Tnx alot in advance.

--------------- Added 1327910297 at 1327910297 ---------------

nobody can throw me a hint?

vexxy
01-30-2012, 03:33 PM
ok I found the conditional, here it is:

<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '2')">

the question remains, how can I show the ad after each second post, from each page. Currently, the block shows only after the second post..that's all.

tnx in advance guys

tnedator
01-30-2012, 06:17 PM
Someone else will probably tell you exactly, but I would think you need to do an odd/even check if you can. If postcount is an even number, show the ad. Unfortunately, I don't know enough about the functions available to use in vB to take it beyond the idea stage.

vexxy
01-31-2012, 07:07 AM
thanks for the reply, yep, waiting for the guys to give me a hint :)