PDA

View Full Version : Putting Banner after First Post



JustAskJulie
Thu 1st Jul '04, 2:05pm
How would you go about inserting a banner after the first post in a thread?

Steve Machol
Thu 1st Jul '04, 2:30pm
This may be possible with template conditionals but I'm not sure. Otherwise this would require modifying the code.

bigsoccer tech
Thu 1st Jul '04, 3:46pm
You can do it:

<if condition="$post[postid] == $GLOBALS['FIRSTPOSTID']">
your code here
</if>

I can't figure out how to do it after the fifth!

Chroder
Thu 1st Jul '04, 3:53pm
You can use the value $post[postcount]. The $post[postcount] holds the post number of the post in the thread (and is responsible for showing the #1, #2, #3 etc links that link to one post at a time.)


<if condition="$post[postcount] == 5">
<!-- ad code -->
</if>

P.Jackson
Thu 1st Jul '04, 4:35pm
has anyone got a demo of this? would be a great release at vb templates

JustAskJulie
Wed 7th Jul '04, 2:44pm
You can use the value $post[postcount]. The $post[postcount] holds the post number of the post in the thread (and is responsible for showing the #1, #2, #3 etc links that link to one post at a time.)


<if condition="$post[postcount] == 5">
<!-- ad code -->
</if>

Would this cause the banner to show up as tho it's within a post? Or would it just allow a space between the posts where the ad would show up?