PDA

View Full Version : How do you add adverts under the first post of any thread? (see example)


mcyates
10-29-2004, 10:05 AM
How do you add adverts under the first post of any thread? (see example)

If you look at the forum below, under the first advert there is a good advert. How doe he do it?

http://forums.digitalpoint.com/showthread.php?t=4496

AN-net
10-29-2004, 10:10 AM
there was a post already about this, please use the forum search feature:)

mcyates
10-29-2004, 10:28 AM
I did use the search. I always do before i post, but i couldn't find anything.

Beermonster
10-29-2004, 01:40 PM
there was a post already about this, please use the forum search feature:)

Where's the helping community spirit ;)

Here you go, in your postbit or postbit_legacy at the bottom find


<!-- / post #$post[postid] -->


Add after it



<if condition="$post[postid] == $GLOBALS['FIRSTPOSTID']">

PUT YOUR CODE HERE


</if>

digitalpoint
10-30-2004, 02:44 PM
I'm the one that did it in the example shown... I didn't use the $GLOBALS array, instead I did it like so:

<if condition="$post[postcount] % 10 == 1">
That lets you put it after whatever post you want, for example it could be == 4 if you want it to be after the 4th post. You could get a little trickier and take into account if users choose to display something other than 10 posts per page, but it was a 30 second job, and I was feeling lazy. :)

mcyates
10-30-2004, 03:23 PM
I'm the one that did it in the example shown... I didn't use the $GLOBALS array, instead I did it like so:

<if condition="$post[postcount] % 10 == 1">
That lets you put it after whatever post you want, for example it could be == 4 if you want it to be after the 4th post. You could get a little trickier and take into account if users choose to display something other than 10 posts per page, but it was a 30 second job, and I was feeling lazy. :)

Thanks guys

Which script did you use to get the posts to be separated from each other? Thanks in advance but i'm obviously crap at searching things.