• Welcome to XF2 Addons. You can buy my Premium membership for $35 per year, and this gives you access to download any or ALL of the 300 add-ons that I have developed for Xenforo 2.x. In addition, Premium members will get technical support. Once the Premium membership has expired you can continue to use the installed addons on your forum as long as you like.

Best Answered 1.6


AdminZwo

New Member
Hello Andy,

thanks for the great addon!
In our forum, however, a user should not be able to mark the first posting or his own postings as "Best Answered".

I achieved the first by inserting the following conditional into your template "andy_bestanswered_select"
Code:
<xf:if is="!$post.position % $xf.options.messagesPerPage == 0">
<xf:title>{{ phrase('bestanswered_post_number') }}{{ {$post.position} + 1 }}</xf:title>
<xf:form action="{{ link('posts/bestanswered-select-save', $post) }}" class="block" ajax="true">
    <div class="block-container">
        <div class="block-body">
            <xf:inforow rowtype="confirm">
                {{ phrase('bestanswered_select_this_post_as_best_answered') }}
            </xf:inforow>
        </div>
        <xf:submitrow submit="{{ phrase('bestanswered_submit') }}" rowtype="simple" />
    </div>
</xf:form>
    <xf:else />
         <xf:title>{{ phrase('bestanswered_post_number') }}{{ {$post.position} + 1 }} or evaluating yourself is not desirable ...  ;)</xf:title>
</xf:if>

Would it be possible to adapt the addon so that a user cannot mark his own postings as "best answered" and then also hide the button for them in such postings?
 
Similar threads
Thread starter Title Forum Replies Date
X Best answered 1.1 General 2

Similar threads

Top