XF 1.5 Hide ads in specific threads

Dakis

Well-known member
Ok I'm trying to use this conditional to hide adsense code in a specific thread:

<xen:if is="{$threadId} != 132767">

ad code here obviously

</xen:if>

Now, I have 4 places where I need to remove ads:

1. Template ad_header
2. Template ad_thread_view_below_messages
3. Digital point ads positioning, after post position
4. Widget framework html widget


For n.1, my conditional works fine.

For n.2, my conditional does not work. It hides the ads from all threads instead of just the one.

For n.3, my conditional does not work, it shows the ads in this thread like the conditional is never there.

For n.4, it also doesn't work, it shows the ads normally. (I've wrapped the html code in this conditional)

I have added this on top of my thread_view template, but maybe the threadId variable is not being defined in some of these places?

<xen:container var="$threadId">{$thread.thread_id}</xen:container>

Any ideas how I can make this happen?
 
Back
Top Bottom