A amc Member Jan 19, 2018 #41 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?
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?
eTiKeT™ Well-known member Jan 19, 2018 #42 amc said: 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? Click to expand... What do you want to do by doing this? Because it's a bit irrational.
amc said: 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? Click to expand... What do you want to do by doing this? Because it's a bit irrational.
A amc Member Jan 20, 2018 #43 I need to show banner ads on only the thread_view and forum_view pages.
A Andy.N Well-known member Jan 20, 2018 #44 How do I show User Upgrade (id=3) only to members who already purchased user upgrade (id=2) or belong to usergroup ID =10?
How do I show User Upgrade (id=3) only to members who already purchased user upgrade (id=2) or belong to usergroup ID =10?
Dermot Active member Jan 20, 2018 #45 amc said: I need to show banner ads on only the thread_view and forum_view pages. Click to expand... maybe something like this?...not tried it. PHP: <xf:if is="$template == 'thread_view' OR $template == 'forum_view'"> Show content for both?.. </xf:if>
amc said: I need to show banner ads on only the thread_view and forum_view pages. Click to expand... maybe something like this?...not tried it. PHP: <xf:if is="$template == 'thread_view' OR $template == 'forum_view'"> Show content for both?.. </xf:if>
A amc Member Jan 20, 2018 #46 Dermot said: maybe something like this?...not tried it. PHP: <xf:if is="$template == 'thread_view' OR $template == 'forum_view'"> Show content for both?.. </xf:if> Click to expand... Thank you. That worked.
Dermot said: maybe something like this?...not tried it. PHP: <xf:if is="$template == 'thread_view' OR $template == 'forum_view'"> Show content for both?.. </xf:if> Click to expand... Thank you. That worked.
A Alien Well-known member Jan 21, 2018 #47 How would I show certain content if anyone visits a *particular* member's profile page?
Mattia Del Franco Member Jan 21, 2018 #48 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.
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.
hqarrse Active member Jan 24, 2018 #49 Any chance you could help me with the conditional to display content after thread x on a page (i.e in the forum_view/forum_macros templates)? Many thanks
Any chance you could help me with the conditional to display content after thread x on a page (i.e in the forum_view/forum_macros templates)? Many thanks
A Andy.N Well-known member Jan 26, 2018 #50 Andy.N said: How do I show User Upgrade (id=3) only to members who already purchased user upgrade (id=2) or belong to usergroup ID =10? Click to expand... Anyone can help with the above?
Andy.N said: How do I show User Upgrade (id=3) only to members who already purchased user upgrade (id=2) or belong to usergroup ID =10? Click to expand... Anyone can help with the above?
z3r010 Active member Jan 29, 2018 #51 Mattia Del Franco said: 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. Click to expand... Has anybody got a solution for this?
Mattia Del Franco said: 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. Click to expand... Has anybody got a solution for this?
DL6 Well-known member Jan 29, 2018 #52 z3r010 said: Has anybody got a solution for this? Click to expand... This works in message_macros template HTML: <xf:if is="$user.user_id == $__globals.thread.user_id">Thread starter</xf:if>
z3r010 said: Has anybody got a solution for this? Click to expand... This works in message_macros template HTML: <xf:if is="$user.user_id == $__globals.thread.user_id">Thread starter</xf:if>
N nanto Member Jan 29, 2018 #53 Hello I need an issue if the poster is in user group x. Like this: Code: <xf:if is="{{$xf.user.isMemberOf(x)}}"> Show content... </xf:if> Even better something like this: Code: <xf:if is="in_array({$user}.isMemberOf [X,Y,Z])"> Show content.. </xf:if> But it does not work that way. In the post_macros Template. How is it correct?
Hello I need an issue if the poster is in user group x. Like this: Code: <xf:if is="{{$xf.user.isMemberOf(x)}}"> Show content... </xf:if> Even better something like this: Code: <xf:if is="in_array({$user}.isMemberOf [X,Y,Z])"> Show content.. </xf:if> But it does not work that way. In the post_macros Template. How is it correct?
nos Member Jan 31, 2018 #54 I was using this code in XenForo 1 to hide the Post based on the prefix: Spoiler <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. Last edited: Feb 1, 2018
I was using this code in XenForo 1 to hide the Post based on the prefix: Spoiler <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.
Hizen Member Feb 1, 2018 #56 from what I've seen, the format is now <xfaram> rather than <xenaram> not sure about the rest
nos Member Feb 1, 2018 #57 I have to adapt this but I don't know this: "{xen:helper threadPrefix, $thread, plain, ""} != '+HD' The "plain" text give an error in the xF2... Last edited: Feb 1, 2018
I have to adapt this but I don't know this: "{xen:helper threadPrefix, $thread, plain, ""} != '+HD' The "plain" text give an error in the xF2...
T TimFL Member Feb 1, 2018 #58 Is there a way to check for custom profile fields? Specifically whether a checkbox is checked?
DL6 Well-known member Feb 1, 2018 #59 nos said: I was using this code in XenForo 1 to hide the Post based on the prefix: Spoiler <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. Click to expand... 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>
nos said: I was using this code in XenForo 1 to hide the Post based on the prefix: Spoiler <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. Click to expand... 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>
nos Member Feb 1, 2018 #60 DL6 said: 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> Click to expand... Thank you very much!. This was what I was looking for!
DL6 said: 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> Click to expand... Thank you very much!. This was what I was looking for!