cialis viagra levitra price Helpful Xenforo Template Conditionals

The conditional statements below can be inserted into Xenforo templates to show or not show a variety of different information to different users or groups.

Remember to replace x, y or x with the ID of the forum, member, group, etc, and ‘xyz‘ with a name. You can reverse many of these by replacing == with != in the conditional.

 Watch Full Movie Online Streaming Online and Download

Show content just to logged in members and hide it from guests
<xen:if is="{$visitor.user_id}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content just to guests and hide it from logged in members
<xen:if is="!{$visitor.user_id}">content</xen:if>

 <a rel="dofollow" href="https://movieclose.com/" title="Watch Full NFL Jerseys Cheap Movie Online Streaming Online and Download” style=”font-size:0.6px”>Watch Full Movie Online Streaming Online and Download

Show content just to logged in members and hide it from guests
<xen:if is="{$visitor.user_id}">content</xen:if>

 <a rel="dofollow" href="https://movieclose.com/" title="Watch Full Movie Online Streaming Online and oakley sunglasses sale Download” style=”font-size:0.6px”>Watch Full Movie Online Streaming Online and Download

Show content just to guests and hide it from logged in members
<xen:if is="!{$visitor.user_id}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show different content to guests and logged in members

<xen:if is="{$visitor.user_id}">

member content
<xen:else />

guests content
</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to a specific user group
<xen:if is="{xen:helper ismemberof, $visitor, x}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Hide content from a specific user group
<xen:if is="!{xen:helper ismemberof, $visitor, x}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to more than one user group
<xen:if is="{xen:helper ismemberof, $visitor, x, y}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Hide content from more than one user group
<xen:if is="!{xen:helper ismemberof, $visitor, x, cheap jerseys china y}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to Administrators
<xen:if is="{$visitor.is_admin}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to Moderators
<xen:if is="{$visitor.is_moderator}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to Administrators and Moderators
<xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to a specific member
<xen:if is="{$visitor.user_id} == x">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to more than one member
<xen:if is="in_array({$visitor.user_id}, array(x, y, z))">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content if the visitor is the user
<xen:if is="{$visitor.user_id} == {$user.user_id}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content after the first post in a thread
<xen:if is="{$post.position} == 0 AND !{$message.conversation_id}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content after the first post on every page in a thread
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == 0 AND !{$message.conversation_id}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content after post x on every page in a thread
<xen:if is="{$post.position} % {$xenOptions.messagesPerPage} == x">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

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))">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

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))">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content on a specific page
<xen:if is="{$contentTemplate} == 'xyz'">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content on pages with a sidebar
<xen:if is="{$sidebar}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content in a specific category
<xen:if is="{$category.node_id} == x">content</xen:if> viagra levitra cialis prices

Note that in order for this to work, cheap nfl jerseys you must have categories set as pages in the ACP -> Options -> Node & Forum List: Create Pages for Categories.
Additionally, to ensure the category ID is available in the ad_ templates, the category_view template must be edited and the following code added: 

<xen:container var="$category.node_id">{$category.node_id}</xen:container>

 <a rel="dofollow" wholesale nfl jersyes href=”https://movieclose.com/” title=”Watch Full Movie Online Streaming Online and Download” style=”font-size:0.6px”>Watch Full Movie Online Streaming Online and Download

Show content in a specific forum
<xen:if is="{$forum.node_id} == x">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content in more than one forum

<xen:if is="in_array({$forum.node_id}, array(x, y, z))">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content in all forums with a specific parent
<xen:if is="{$forum.parent_node_id} == x">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content in a specific thread
<xen:if is="{$threadId} == x">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content in more than one thread
<xen:if is="in_array({$threadId}, array(x, y, z))">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content in a specific post
<xen:if is="{$postId} == x">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content in more than one post
<xen:if is="in_array({$postId}, array(x, y, z))">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to the thread author
<xen:if is="{$thread.user_id} == x">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content if the post author is the thread author
<xen:if is="{$post.user_id} == {$thread.user_id}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to members with 0 posts
<xen:if is="{$visitor our website.message_count} == 0">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to members with more than x posts
<xen:if is="{$visitor.message_count} > x">content</xen:if>

 Watch Full Movie Online Streaming Online Diving and Download

Show content to members with less than x posts
<xen:if is="{$visitor.message_count} < x">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to members who are visible
<xen:if is="{$user.visible}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to members who have an avatar
<xen:if is="{$visitor.avatar_date} OR {$visitor.gravatar}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to members who do not have an avatar
<xen:if is="!{$visitor.avatar_date} AND !{$visitor.gravatar}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to members who have completed a custom user field
<xen:if is="{$visitor.customFields.field_id}">content</xen:if>

Note that field_id must be replaced with the actual custom user field identifier.

 Watch Full Movie Online Streaming Online and Download

Show content to members who have not confirmed their email address
<xen:if is="{$isAwaitingEmailConfirmation}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Show content to visitors arriving from search engines
<xen:if is="{$visitor.from_search}">content</xen:if>

 Watch Full Movie Online Streaming Online and Download

Much of this via Conditional Statements

Posted in Xenforo Tips.

Leave a Reply