Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 21, 20186 yr In our 'topic' template, we've added a custom ad location like this: {advertisement="footerad"} This shows an add below the quick reply box. We're new to IPB and I've done some searching, but everything I've found so far is too complex for what we need. All we want to do is wrap that tag in a conditional, so that it only appears if the topic has at least X replies. This stops us showing too many ads on topics with not many replies. We also have one ad after first post, so we don't really want to show the footer ad when there is only one post for example. But really we would like to specify the amount of posts in the conditional statement so we can tweak this. Thanks in advance guys and apologies if I've overlooked a thread where this (conditional based on replies to a topic) is explained.
November 21, 20186 yr In: forums -> front -> topics -> topic Use this: {{if count( $comments ) > 1 }} Show Ad. {{endif}}
November 21, 20186 yr Author Thanks a lot @A Zayed - is this in any of the documentation or just something you know?
November 23, 20186 yr Author Ah that's a shame - would be nice to have some documentation for this kind of stuff. @A Zayed can I be cheeky then and ask if there's a similar one we can use on forum page (showing the list of topics)? It's not this is simple is it? {{if count( $topics ) > 1 }} Show Ad. {{endif}}
November 27, 20186 yr On 11/23/2018 at 4:15 AM, NeedCoffee said: Ah that's a shame - would be nice to have some documentation for this kind of stuff. @A Zayed can I be cheeky then and ask if there's a similar one we can use on forum page (showing the list of topics)? It's not this is simple is it? {{if count( $topics ) > 1 }} Show Ad. {{endif}} Where do you want to show the ad. exactly? in which template?
Archived
This topic is now archived and is closed to further replies.