Fixed Missing guest posts usernames in Approval queue

ivp

Active member
Affected version
2.2.10
When using guest posting, sometimes users put inappropriate/offensive usernames, but such information is nowhere to be seen in Approval queue.
 
Temporary workaround is to modify approval_item_post template in the following way.

Replace:
Code:
<xf:macro template="approval_queue_macros" name="item_message_type"
    arg-content="{$content}"
    arg-user="{$content.User}"
    arg-messageHtml="{{ bb_code($content.message, 'post', $content) }}"
    arg-typePhraseHtml="{{ phrase('post_noun') }}"
    arg-spamDetails="{$spamDetails}"
    arg-unapprovedItem="{$unapprovedItem}"
    arg-handler="{$handler}"
    arg-headerPhraseHtml="{{ phrase('posted_in_thread_x_in_forum_y', {
        'postLink': link('posts', $content),
        'threadTitle': $content.Thread.title,
        'forumLink': link('forums', $content.Thread.Forum),
        'forumTitle': $content.Thread.Forum.title
    }) }}" />
with:
Code:
<xf:if is="{$content.User}">
    <xf:set var="$approval_user" value="{$content.User}" />
<xf:else />
    <xf:set var="$approval_user.user_id" value="{$content.user_id}" />
    <xf:set var="$approval_user.username" value="{$content.username}" />
</xf:if>

<xf:macro template="approval_queue_macros" name="item_message_type"
    arg-content="{$content}"
    arg-user="{$approval_user}"
    arg-messageHtml="{{ bb_code($content.message, 'post', $content) }}"
    arg-typePhraseHtml="{{ phrase('post_noun') }}"
    arg-spamDetails="{$spamDetails}"
    arg-unapprovedItem="{$unapprovedItem}"
    arg-handler="{$handler}"
    arg-headerPhraseHtml="{{ phrase('posted_in_thread_x_in_forum_y', {
        'postLink': link('posts', $content),
        'threadTitle': $content.Thread.title,
        'forumLink': link('forums', $content.Thread.Forum),
        'forumTitle': $content.Thread.Forum.title
    }) }}" />
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.12).

Change log:
If guest content is awaiting approval, show the username the content was submitted under
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom