• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Conditional Statements for XenForo 2

Conditional Statements for XenForo 2

eTiKeT™

Active member
#25
#26
Thanks for this resource!
I want modify XFMGallery Slider Media widget to show media uploaded only from users i following ( in my site i call Friends)
What is the statement?
Thanks
Antonio
 

ge66

Active member
#27
There was an old XF1.5-question about an Ad in the last post on a page only if there are more than 2 posts on that page. @Brogan answered it and this should work in XF2.0

Code:
<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>
 
#29
Just so you know this should be changed.

"17. How can I show content only at home?"

Change:

Code:
<xf:if is="$template != 'forum_list'">
Show content...
</xf:if>
To:

Code:
<xf:if is="$template == 'forum_list'">
Show content...
</xf:if>
I believe you put that there so that users could put something on the forum_list only. The first code does not work for only putting something on the forum_list. The second code does and I have tested it.

Let me know what you think. Thanks
 
#31
<xf:if is="{$forum.node_id} != x"> does not work under container content above option for me.

also is it possible to show content between the two post blocks instead of inside the post?
 
Last edited: