XF 1.2 "Thread Status: Not open for further replies." - Show this for members only

sinful

Member
How do I go about adding a conditional such that for threads which are closed, the "Thread Status: Not open for further replies." notice at the top and bottom of the thread is only shown to registered members? And make it such that visitors do not see this notice.

Thanks.
 
Okay. Just to confirm, under thread_view template, the code to wrap the conditionals in is:

Code:
<xen:set var="$threadStatusHtml">
    <xen:if hascontent="true">
        <dl class="threadAlerts secondaryContent">
            <dt>{xen:phrase thread_status}:</dt>
            <xen:contentcheck>
                <xen:if is="{$thread.discussion_state} == 'deleted'">
                    <dd class="deletedAlert">
                        <span class="icon Tooltip" title="{xen:phrase deleted}" data-tipclass="iconTip"></span>
                            {xen:phrase removed_from_public_view}</dd>
                <xen:elseif is="{$thread.discussion_state} == 'moderated'" />
                    <dd class="moderatedAlert">
                        <span class="icon Tooltip" title="{xen:phrase awaiting_moderation}" data-tipclass="iconTip"></span>
                            {xen:phrase awaiting_moderation_before_being_displayed_publicly}</dd>
                </xen:if>
  
                <xen:if is="!{$thread.discussion_open}">
                    <dd class="lockedAlert">
                        <span class="icon Tooltip" title="{xen:phrase locked}" data-tipclass="iconTip"></span>
                            {xen:phrase not_open_for_further_replies}</dd>
                </xen:if>
            </xen:contentcheck>
        </dl>
    </xen:if>
</xen:set>
{xen:raw $threadStatusHtml}

? Thanks!
 
Top Bottom