tribedude Active member Oct 26, 2016 #1 In addition to the stock ad location templates, is there a way to put an ad every Xth post in a thread?
In addition to the stock ad location templates, is there a way to put an ad every Xth post in a thread?
Arty Well-known member Oct 26, 2016 #2 You can use template modifications for that. In template thread_view replace Code: <xen:foreach loop="$posts" value="$post"> with something like Code: <xen:foreach loop="$posts" value="$post" i="$i"> <xen:if is="{$i} == 1"> code for ad after second post </xen:if> Upvote 0 Downvote
You can use template modifications for that. In template thread_view replace Code: <xen:foreach loop="$posts" value="$post"> with something like Code: <xen:foreach loop="$posts" value="$post" i="$i"> <xen:if is="{$i} == 1"> code for ad after second post </xen:if>
P Paul B XenForo moderator Staff member Oct 26, 2016 #3 You don't need to edit the thread_view template - it can be done with a conditional statement in the ad template. See the examples here (from 10 onwards): https://xenforo.com/community/resources/responsive-adsense.2084/update?update=18207 Upvote 0 Downvote
You don't need to edit the thread_view template - it can be done with a conditional statement in the ad template. See the examples here (from 10 onwards): https://xenforo.com/community/resources/responsive-adsense.2084/update?update=18207
R RobParker Well-known member Oct 26, 2016 #5 Be somewhat careful that you don't end up violating policies, etc. We found that digital points addon which puts an ad after the last read post ended up converting much better than putting ads in various fixed positions. Upvote 0 Downvote
Be somewhat careful that you don't end up violating policies, etc. We found that digital points addon which puts an ad after the last read post ended up converting much better than putting ads in various fixed positions.