Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
NeedCoffee Posted November 21, 2018 Posted November 21, 2018 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.
A Zayed Posted November 21, 2018 Posted November 21, 2018 In: forums -> front -> topics -> topic Use this: {{if count( $comments ) > 1 }} Show Ad. {{endif}}
NeedCoffee Posted November 21, 2018 Author Posted November 21, 2018 Thanks a lot @A Zayed - is this in any of the documentation or just something you know?
NeedCoffee Posted November 23, 2018 Author Posted November 23, 2018 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}}
A Zayed Posted November 27, 2018 Posted November 27, 2018 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?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.