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.

  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:
    <xen:if is="{$visitor.is_admin} OR {$visitor.is_moderator}">
                <div class="messageMeta">
                    <div class="privateControls">{xen:raw $messageControlsTemplate}</div>
    in thread_list_item_deleted add the if condition:
                    <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>
    There are probably more places to add the if condition.
    Neutral Singh likes this.
  5. sross

    sross Active Member

    I was hoping someone would have made an addon for this but don't see one. The main issue I have is that my members want to know why content was removed. You can't simply 'disappear' content from your community and expect them to be happy about it. Conspiracy theories start flying, etc. My members were happy with the way vbulletin handled this, leaving a deletion stub with explanation, keeping 1,000's of members in the dark and wondering what happened to the content makes zero sense. I know the author can be notified but if deleted for trolling they know why anyway. Also, it is of great benefit to delete a trolls post and all members can see why their post was removed, which adds some deterrence for bad behavior.
    Digital Doctor likes this.
  6. Digital Doctor

    Digital Doctor Well-Known Member

    You are bang on.
    Xenforo Ltd likes it like that but keeping users in the dark doesn't suit many communities.
    sross likes this.

Share This Page