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

XF 1.1 Thread Creator Template Conditional

Brent W

Well-known member
#4
Hmm this doesn't appear to work.

Code:
<xen:if is="{$thread.user_id} != 6859">
<xen:if is="!{xen:helper ismemberof, $visitor, 9}">
<!-- book_160x600 -->
<div id='div-gpt-ad-1362983438283-0' style='width:160px; height:600px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1362983438283-0'); });
</script>
</div>
</xen:if>
</xen:if>
That still shows advertisements for threads started by that member.
 

Brogan

XenForo moderator
Staff member
#8
Just checked with Mike and he suggested something like this.

<xen:container var="$isThreadOwner">{xen:if '{$thread.user_id} == {$visitor.user_id}', 1}</xen:container>

Then just <xen:if is="{$isThreadOwner}"> in the container.

He also said to name the variable $hideAd or something so a different condition could be applied elsewhere and it would make sense.