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

Hide content within specific thread

Michael

Active member
#1
Hi everyone,

I need to hide ads which I have in several templates from 1 thread due to the thread content violating Adsense TOS.

I know theres this but thats to show within specific threads:

<xen:if is="{$threadId} == x">
This content will show in thread x
</xen:if>

How can I make that into do not show?

Thank you :)
 

Michael

Active member
#3
Theyre in ad_message_below, ad_message_body and logo_block, the code doesnt seem to work, do you know the exact code I will need?

Thanks Jake :)
 

Jake Bunce

XenForo moderator
Staff member
#4
The above code will work in ad_message_below and ad_message_body, but not in logo_block.

For logo_block you need to use xen:container. Edit this template:

Admin CP -> Appearance -> Templates -> thread_view

Add this line to the top:

Code:
<xen:container var="$threadId">{$thread.thread_id}</xen:container>
Now you can use this in logo_block:

Code:
<xen:if is="{$threadId} != 1">
	THIS WILL NOT SHOW IN THREAD_ID 1
</xen:if>
 

Michael

Active member
#6
Just so you know this didnt seem to work, I thought it had as it seemed to hide the Adsense ads but it hadnt as Adsense must have just blocked the ads for that page.

Do you know how I can show some code within create thread only within X forum :D