How can I combine
Code:<xf:if is="$template == 'thread_view'"> Show content.. </xf:if> <xf:if is="$template =='forum_view'"> Show content.. </xf:if>
into one condition?
I need to show banner ads on only the thread_view and forum_view pages.
<xf:if is="$template == 'thread_view' OR $template == 'forum_view'">
Show content for both?..
</xf:if>
maybe something like this?...not tried it.
PHP:<xf:if is="$template == 'thread_view' OR $template == 'forum_view'"> Show content for both?.. </xf:if>
Anyone can help with the above?How do I show User Upgrade (id=3) only to members who already purchased user upgrade (id=2) or belong to usergroup ID =10?
I'm trying to show who is the Thread starter.
I've attempted with this conditional but seems that doesn't work:
{$post.user_id} == {$thread.User}
and
{$post.user_id} == {$thread.user_id}
Any help would be really appreciated.
In XF1 I used this: {$post.user_id} == {$thread.user_id} and worked very well.
This works in message_macros templateHas anybody got a solution for this?
<xf:if is="$user.user_id == $__globals.thread.user_id">Thread starter</xf:if>
<xf:if is="{{$xf.user.isMemberOf(x)}}">
Show content...
</xf:if>
<xf:if is="in_array({$user}.isMemberOf [X,Y,Z])">
Show content..
</xf:if>
I was using this code in XenForo 1 to hide the Post based on the prefix:
<xen:if is="{xen:helper threadPrefix, $thread, plain, ""} != '+HD' AND {xen:helper ismemberof, $visitor, 1, 2} OR {xen:helper ismemberof, $visitor, 3, 4, 6, 7, 8}">
Content
<xen:else />
<p class="importantMessage">{xenhrase hd_user}</p>
</xen:if>
The red code is the code used in xF1 to hide the content between this two. And the blue code is the hide content.
How can I adapt it to XenForo 2?
Thanks.
<xf:if is="prefix_title('thread', $thread.prefix_id) == '+HD' AND $xf.visitor.isMemberOf([1,2]) OR $xf.visitor.isMemberOf([3,4,6,7,8])">
Content
<xf:else />
<p class="importantMessage">{{ phrase('hd_user') }}</p>
</xf:if>
Code:<xf:if is="prefix_title('thread', $thread.prefix_id) == '+HD' AND $xf.visitor.isMemberOf([1,2]) OR $xf.visitor.isMemberOf([3,4,6,7,8])"> Content <xf:else /> <p class="importantMessage">{{ phrase('hd_user') }}</p> </xf:if>
We use essential cookies to make this site work, and optional cookies to enhance your experience.