أنت تستخدم أحد المتصفحات القديمة. قد لا يتم عرض هذا الموقع أو المواقع الأخرى بشكل صحيح.
يجب عليك ترقية متصفحك أو استخدام أحد المتصفحات البديلة.
يجب عليك ترقية متصفحك أو استخدام أحد المتصفحات البديلة.
درس XF-2.x مجموعة اوامر بإستخدام دالة IF
- بادئ الموضوع Ibn AliraQ
- تاريخ البدء
- الردود 6
- المشاهدات 2K
PHP:
<xf:if is="{{ $xf.visitor.isMemberOf(x) }}">This content will show to members of user group x</xf:if>
PHP:
<xf:css src="xfv_marker_test.less" />
<xf:if is="{{ $xf.visitor.isMemberOf(3) }}">
<span class="message-avatar-online" data-xf-init="tooltip" title="{{ phrase('online_now') }}"></span>
</f:if>
PHP:
<xf:if is="$xf.visitor.is_admin">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.Option.is_discouraged}">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.Option.is_discouraged}">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.gravatar}">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.is_staff}">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.isAwaitingEmailConfirmation()}">
Show content...
</xf:if>
PHP:
<xf:if is="{$forum.node_id} != x">
Hide content. . .
</xf:if>
PHP:
<xf:if is="in_array(!{$forum.node_id}, [x,y,z])">
Hide content...
</xf:if>
PHP:
<xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 1">
Show content..
</xf:if>
PHP:
<xf:if is="{$post.position} % {$xf.options.messagesPerPage} == 0">
Show content..
</xf:if>
PHP:
<xf:if is="$xf.post.user_id == $xf.thread.user_id">
This content will show if the post author is the thread author
</xf:if>
PHP:
<xf:if is="$post.user_id == $xf.thread.user_id"> This content will show if the post author is the thread author </xf:if>
PHP:
<xf:if is="$post.user_id == $thread.user_id"> This content will show if the post author is the thread author </xf:if>
PHP:
<xf:if is="{$xf.visitor.location}">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.website}">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.signature}">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.user_state} == 'valid'">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.user_state} == 'email_confirm_edit'">
Show content...
</xf:if>
PHP:
<xf:if is="{$xf.visitor.user_state} == 'email_bounce'">
Show content...
</xf:if>
PHP:
<xf:if is="$post.position % $xf.options.messagesPerPage == $xf.options.messagesPerPage - 1 OR $post.position == $thread.reply_count AND $thread.reply_count % $xf.options.messagesPerPage > 1">
Ad code here <xf:ad position="post_above_content" arg-post="{$post}" />
</xf:if>
PHP:
<xf:if is="$template != 'forum_list'">
Show content...
</xf:if>
PHP:
<xf:if is="$template == 'forum_list'">
Show content...
</xf:if>
PHP:
<xf:if is="{{ $xf.visitor.hasPermission('Dadparvar_PricingTables', 'Can_See_PricingTable_One') }}">
User will see this text if s/he has "Can_See_PricingTable_One" permission of "Dadparvar_PricingTables" group.
</xf:if>
PHP:
<xf:if is="$post.position % $xf.options.messagesPerPage == $xf.options.messagesPerPage - 1 OR $post.position == $thread.reply_count AND $thread.reply_count % $xf.options.messagesPerPage > 1">
Ad code here <xf:ad position="post_above_content" arg-post="{$post}" />
</xf:if>
PHP:
<xf:if is="!in_array({$forum.node_id}, [1,2,3])">
Hide content..
</xf:if>
PHP:
<xf:if is="$post.position % $xf.options.messagesPerPage == $xf.options.messagesPerPage - 1 OR $post.position == $thread.reply_count AND $thread.reply_count % $xf.options.messagesPerPage > 1">
Ad code here <xf:ad position="post_above_content" arg-post="{$post}" />
</xf:if>
PHP:
<xf:if is="$template == 'thread_view'">
Show content..
</xf:if>
<xf:if is="$template =='forum_view'">
Show content..
</xf:if>
