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

XF 1.3 Shortening Deletion Reason

Discussion in 'Styling and Customization Questions' started by Amaury, Aug 23, 2014.

  1. Amaury

    Amaury Well-Known Member

    I am trying to simplify the deletion reason, so instead of this:

    It shows like this:

    I modified the this_message_by_x_has_been_removed_from_view phrase and changed it to this:

    However, it just appears as this even though I deleted the message, not Test Account:

  2. Chris D

    Chris D XenForo Developer Staff Member

    Removing a single word "simplifies" it?

    You have used {name} twice which is always going to translate to the same thing. A variable isn't just going to magically change between uses.

    What you are doing more than likely isn't possible. The first "phrase" is actually several different phrases.

    This is the typical usage which produces the full phrase including who deleted it, when and what the reason is:

                {xen:phrase this_message_by_x_has_been_removed_from_view, 'name={xen:helper username, $message}'}
                <xen:if is="{$message.delete_username}">
                    {xen:phrase deleted_by_x, 'name={xen:helper username, $message.deleteInfo}'}, <xen:datetime time="{$message.delete_date}" /><xen:if is="{$message.delete_reason}">, {xen:phrase reason}: {$message.delete_reason}</xen:if>.
    This covers cases where there is no username for some reason or no reason is provided.
    Amaury likes this.

Share This Page