XF 2.0 Right condition for selected nodes

XDinc

Well-known member
Dear friends,
I would like to ask a QS!

As you may see below I used , in_array ($post.Thread.node_id, {$xf.options.addon}.

Template Modification is on the post_macros

Find:
Code:
<xf:if is="$post.canLike()">
                                                <a href="{{ link('posts/like', $post) }}" class="actionBar-action actionBar-action--like" data-xf-click="like" data-like-list="< .js-post | .js-likeList"><xf:if is="$post.isLiked()">{{ phrase('unlike') }}<xf:else />{{ phrase('like') }}</xf:if></a>
                                            </xf:if>

Replace:

Code:
<xf:if is="in_array($post.Thread.node_id, {$xf.options.Nodes_GetLikesBack})">
<xf:if is="$post.canLike()">
    <a href="<xf:if is="$post.isLiked() && !$xf.visitor.hasPermission('forum', 'get_likes_back')">
                 {{ link('get-likes-back/warn/') }}
             <xf:else />                                                            
                 {{ link('posts/like', $post) }}
              </xf:if>"
       class="actionBar-action actionBar-action--like"
       data-xf-click="<xf:if is="$post.isLiked() && !$xf.visitor.hasPermission('forum', 'disable_get_likes_back')">overlay<xf:else />like</xf:if>"
       data-like-list="< .js-post | .js-likeList">
             <xf:if is="$post.isLiked()">{{ phrase('unlike') }}<xf:else />{{ phrase('like') }}</xf:if>
    </a>
</xf:if>
</xf:if>

Options

188612

When I selected multiple nodes just works "Main forum first"

Could you please let me learn for the right condition to selected multi nodes (disable get likes back)

@Chris D
 
Back
Top Bottom