• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Disabling adsense on thin pages

#1
I want to show adsense in thread view, but only on pages that:

1. are image free
2. are video free (including embedded youtube videos)
3. have substantial content i.e more than 2 posts.

What would be the best way to achieve that?
 

Mike

XenForo developer
Staff member
#2
The last part you could check by "{$thread.reply_count} > 1" (or "count({$posts}) > 1") in a template condition. (Note that you may need to be careful where the adsense code is going as these may not be available in all templates.)

The first two requirements would require custom development.