1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 How to show thread deletion reason to members?

Discussion in 'XenForo Questions and Support' started by vord, Nov 26, 2015.

  1. vord

    vord Member

    As admin I can see a deletion message in thread view as the screenshot below. In VB days I set this message to be viewable by members and it helped them understand why their thread was deleted.

    In Xenforo I can only find a way of showing the deleted message together with the view button, but that defeats the point of deleting the thread. Is there a way of showing it without the view button?

    If it is not a standard option could anyone give me tips on how to mod this before I start fiddling with templates.

    Capture.JPG
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can send an alert when deleting the thread.

    Otherwise it's a permission - "View deleted threads / posts".
     
  3. vord

    vord Member

    Thanks Brogan. I'll see if I can work out the logic in the templates and do a work around. Ought to be possible by moving an 'if'.
     
  4. vord

    vord Member

    If anyone else wants to do this it isn't quite as simple as moving an if. For a rough approximation turning 'view deleted threads and posts' on under usergroup permissions and then making the following template changes to remove the view buttons:

    in message_deleted_placeholder around the messageMeta div add an if condition:
    Code:
    <xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">
                <div class="messageMeta">
                    <div class="privateControls">{xen:raw $messageControlsTemplate}</div>
                </div>
                </xen:if>
    in thread_list_item_deleted add the if condition:
    Code:
                    <xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">
                    <div class="controls faint">
                        <a href="{xen:link threads, $thread}" class="viewLink">{xen:phrase view}</a>
                        <xen:if is="{$thread.canEditThread}"><a href="javascript:" data-href="{xen:link 'threads/list-item-edit', $thread}" class="EditControl JsOnly">{xen:phrase edit}</a></xen:if>
                    </div>
                    </xen:if>
    There are probably more places to add the if condition.
     

Share This Page