how to hide Replies if Replies =0
<dl class="major"><dt>{xen:phrase replies}:</dt> <dd>{xen:if $thread.isRedirect, '–', {xen:number $thread.reply_count}}</dd></dl>
<xen:if is="{xen:number $thread.reply_count} != 0">
<dl class="major"><dt>{xen:phrase replies}:</dt> <dd>{xen:if $thread.isRedirect, '–', {xen:number $thread.reply_count}}</dd></dl>
</xen:if>
<xen:hook name="ad_above_top_breadcrumb" />
<xen:if is="{$forum.node_id} == 14">
<xen:if is="{$forum.node_id} == 37">
<xen:if is="{$forum.node_id} == 2">
<xen:if is="{$forum.node_id} == 102">
<xen:if is="{$forum.node_id} == 30">
<xen:if is="{$forum.node_id} == 97">
<xen:if is="{$forum.node_id} == 80">
<xen:if is="{$forum.node_id} == 97">
<xen:if is="{$forum.node_id} == 105">
<xen:if is="{$forum.node_id} == 35">
<xen:if is="{$forum.node_id} == 8">
<xen:if is="{$forum.node_id} == 65">
<center>
<style>
.asynch-top { width: 320px; height: 50px; }
@media(min-width: 500px) { .asynch-top { width: 468px; height: 60px; } }
@media(min-width: 800px) { .asynch-top { width: 728px; height: 90px; } }
</style>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- asynch_top -->
<ins class="adsbygoogle asynch-top"
etc.,etc.,etc.</ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</center></xen:if></xen:if></xen:if></xen:if></xen:if></xen:if></xen:if></xen:if></xen:if></xen:if></xen:if></xen:if>
I would if I knew what it was. Searching the section for "array" does not help either. Thanks.Use an array.
Instructions are in the resource.
So, the first line below disables ads from a particular node/forum section, which would be what I'm looking for. Now, how to have multiple nodes disabled is the question. I suspect it going to be by using AND! as he did with the user groups restriction in the second row. Will play with it.In the example above I have a few conditionals to stop adverts being displayed on a Page node (55) and to 5 user groups.
<xen:if is="{$quickNavSelected} != 'node-55'">
<xen:if is="!{xen:helper ismemberof, $visitor, 3} AND !{xen:helper ismemberof, $visitor, 4} AND !{xen:helper ismemberof, $visitor, 5} AND !{xen:helper ismemberof, $visitor, 6} AND !{xen:helper ismemberof, $visitor, 7}">
<div style="text-align: center">
<script type="text/javascript"><!--
google_ad_client = "your-adsense-id";
/* Banner Narrow (Above Upper Breadcrumb) */
google_ad_slot = "4545463";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</xen:if>
</xen:if>
Posted the above before seeing your response. Thanks for the time. Will play with it.Just replace ADSENSE with what you want to appear there when not either of those two nodes which you also change to suit.
<xen:if is="!in_array({$forum.node_id}, array(2, 8))">
<xen:if is="!{xen:helper ismemberof, $visitor, 3} AND !{xen:helper ismemberof, $visitor, 7} AND !
{xen:helper ismemberof, $visitor, 14} AND !{xen:helper ismemberof, $visitor, 15} AND !{xen:helper
ismemberof, $visitor, 20} AND !{xen:helper ismemberof, $visitor, 13} AND !{xen:helper ismemberof,
$visitor, 2}">
ETC
</xen:if></xen:if>
Appreciated! Regards!Simplified code for you @Sola
No.Okay, to be clear, it is this Resources section that you're referring me to, right?
When working with arrays, the ! is placed just before the argument.
For example, <xen:if is="in_array({$forum.node_id}, array(x, y, z))"> for true, <xen:if is="!in_array({$forum.node_id}, array(x, y, z))"> for false.
How can I show content to more than one member?
<xen:if is="in_array({$visitor.user_id}, array(x, y, z))">
This content will show to members x, y and z
</xen:if>
How can I show content after post x on every page, only in forums y and z?
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == x AND in_array({$thread.node_id}, array(y, z))">
This content will show after post x on every page, only in forums y and z
</xen:if>
How can I show content after post x on every page, except in forums y and z?
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == x AND !in_array({$thread.node_id}, array(y, z))">
This content will show after post x on every page, except in forums y and z
</xen:if>
How can I show content in more than one forum?
<xen:if is="in_array({$forum.node_id}, array(x, y, z))">
This content will show in forums x, y, and z
</xen:if>
How can I show content in more than one thread?
<xen:if is="in_array({$threadId}, array(x, y, z))">
This content will show in threads x, y, and z
</xen:if>
How can I show content in more than one post?
<xen:if is="in_array({$postId}, array(x, y, z))">
This content will show in posts x, y, and z
</xen:if>
Code:<xen:if is="{$contentTemplate} != 'thread_view'">
<xen:if is="{$contentTemplate} != 'login'">
<xen:if is="!in_array({$contentTemplate}, array('error', 'search_form', 'search_form_post', 'search_form_profile_post', 'search_results', 'register_form', 'login', 'error_with_login'))">
We use essential cookies to make this site work, and optional cookies to enhance your experience.