M Matthew Hawley Well-known member Aug 9, 2013 #21 How do I show content to user groups with more than x posts but exclude admins/mods?
R rdn Well-known member Aug 9, 2013 #22 Matthew Hawley said: How do I show content to user groups with more than x posts but exclude admins/mods? Click to expand... Try: Code: <xen:if is="!{$visitor.is_admin} AND !{$visitor.is_moderator} AND {$visitor.message_count} < 5"> Content </xen:if> 5 is the # of post. Last edited: Aug 9, 2013
Matthew Hawley said: How do I show content to user groups with more than x posts but exclude admins/mods? Click to expand... Try: Code: <xen:if is="!{$visitor.is_admin} AND !{$visitor.is_moderator} AND {$visitor.message_count} < 5"> Content </xen:if> 5 is the # of post.
M Matthew Hawley Well-known member Aug 9, 2013 #23 RoldanLT said: Try: Code: <xen:if is="!{$visitor.is_admin} AND !{$visitor.is_moderator} AND {$visitor.message_count} =< 5"> Content </xen:if> 5 is the # of post. Click to expand... It says its an invalid condition expression.
RoldanLT said: Try: Code: <xen:if is="!{$visitor.is_admin} AND !{$visitor.is_moderator} AND {$visitor.message_count} =< 5"> Content </xen:if> 5 is the # of post. Click to expand... It says its an invalid condition expression.
R rdn Well-known member Aug 9, 2013 #24 RoldanLT said: Try: Code: <xen:if is="!{$visitor.is_admin} AND !{$visitor.is_moderator} AND {$visitor.message_count} < 5"> Content </xen:if> 5 is the # of post. Click to expand...
RoldanLT said: Try: Code: <xen:if is="!{$visitor.is_admin} AND !{$visitor.is_moderator} AND {$visitor.message_count} < 5"> Content </xen:if> 5 is the # of post. Click to expand...
R rdn Well-known member Aug 9, 2013 #26 Try it Understand the condition. It will NOT show on admins and mods, and also user's above 5 post.
R rdn Well-known member Aug 9, 2013 #28 Code: <xen:if is="{$visitor.is_admin} AND {$visitor.is_moderator} AND {$visitor.message_count} < 5"> Content </xen:if>
Code: <xen:if is="{$visitor.is_admin} AND {$visitor.is_moderator} AND {$visitor.message_count} < 5"> Content </xen:if>
R rdn Well-known member Aug 10, 2013 #30 King Kovifor said: @RolandLT: For future reference, it is <= and not =<. Click to expand... Sorry about that, Thanks @King Kovifor
King Kovifor said: @RolandLT: For future reference, it is <= and not =<. Click to expand... Sorry about that, Thanks @King Kovifor
B Bram Well-known member Aug 14, 2013 #31 Brogan said: How many sticky threads do you have? Most forums usually only have a few so the ad_thread_list_below_stickies will work for that. Click to expand... I am using that ad slot mostly but it looks very ugly one 2nd, 3rd etc pages when there are no sticky topics to display. Is there a way to only show content under a sticky just on the first page of a forum?
Brogan said: How many sticky threads do you have? Most forums usually only have a few so the ad_thread_list_below_stickies will work for that. Click to expand... I am using that ad slot mostly but it looks very ugly one 2nd, 3rd etc pages when there are no sticky topics to display. Is there a way to only show content under a sticky just on the first page of a forum?
Paul B XenForo moderator Staff member Aug 14, 2013 #32 Sticky threads only show on the first page. I'm confused as to what it is you're trying to do.
Paul B XenForo moderator Staff member Aug 29, 2013 #33 Brogan updated Conditional Statements with a new update entry: General update Expanded the introductory section explaining how to use xen:else and xen:elseif. Also added some new conditional statements - not going to list them, you'll just have to read it Click to expand... Read the rest of this update entry...
Brogan updated Conditional Statements with a new update entry: General update Expanded the introductory section explaining how to use xen:else and xen:elseif. Also added some new conditional statements - not going to list them, you'll just have to read it Click to expand... Read the rest of this update entry...
lwlol Member Aug 31, 2013 #34 Is there a way to target the entire resource manager without having to do a bunch of ORs? So this is how the code looks like now: <xen:if is="{$contentTemplate} == 'resource_index' OR 'resource_description'(etc...)">
Is there a way to target the entire resource manager without having to do a bunch of ORs? So this is how the code looks like now: <xen:if is="{$contentTemplate} == 'resource_index' OR 'resource_description'(etc...)">
Paul B XenForo moderator Staff member Sep 5, 2013 #37 I don't understand. If there are no replies then there is nothing to hide.
bart Active member Sep 23, 2013 #39 I was thinking of doing this to check if someone is a member of usergroup 8, but it doesn't work because $user.secondary_group_ids is not an array: Code: <xen:if is="in_array(8, {$user.secondary_group_ids},)"> YES! <xen:else/> NO! </xen:if> Is there any way I can do this? it's for the member_view-template.
I was thinking of doing this to check if someone is a member of usergroup 8, but it doesn't work because $user.secondary_group_ids is not an array: Code: <xen:if is="in_array(8, {$user.secondary_group_ids},)"> YES! <xen:else/> NO! </xen:if> Is there any way I can do this? it's for the member_view-template.
Paul B XenForo moderator Staff member Sep 23, 2013 #40 Code: <xen:if is="{xen:helper ismemberof, $visitor, 8}">