XF 2.0 "Awaiting approval before being displayed publicly."

Pepe2012

Well-known member
Licensed customer
I want to hide from a user the fact his posts require moderation. I deleted the phrase "Awaiting approval before being displayed publicly."

How do I remove the little blue shield icon that is to the left of the text above?
 
Yes. Still worth doing. By the time they realize it, if at all, the posts will have been approved or deleted, and I won't have to reply to daily questions asking why their posts are showing up.
 
Solution:
I used this as reference https://xenforo.com/community/resou...val-and-is-invisible-to-normal-visitors.9223/

This will disable the notice for everyone other than mods/admins.

I went to search templates and under refine search I put before_being_displayed_publicly into text contains. The result was thread_view.

I searched it for before_being_displayed_publicly (line ~435) and wrapped dd class="blockStatus-message blockStatus-message--moderated with this:
Code:
    <xf:if is="{{$xf.visitor.isMemberOf([ 3, 4])}}">

    </xf:if>

Result:
Code:
                    <xf:elseif is="$thread.discussion_state == 'moderated'" />
                    <xf:if is="{{$xf.visitor.isMemberOf([ 3, 4])}}">
                        <dd class="blockStatus-message blockStatus-message--moderated">
                            {{ phrase('awaiting_approval_before_being_displayed_publicly') }}
                        </dd>
                    </xf:if>
                    </xf:if>

Code:
                    <xf:elseif is="$thread.discussion_state == 'moderated'" />
                        <dd class="blockStatus-message blockStatus-message--moderated">
                            {{ phrase('awaiting_approval_before_being_displayed_publicly') }}
                        </dd>
                    </xf:if>

You may need/want to do the same for the "awaiting approval" badge on the right hand side of the thread in the forum view. Which can be done by editing thread_list_macros (line ~45):
Code:
                            <xf:if is="{{$xf.visitor.isMemberOf([ 3, 4])}}">
                            <xf:set var="$moderatedStatus">
                                <i class="structItem-status structItem-status--moderated" aria-hidden="true" title="{{ phrase('awaiting_approval')|for_attr }}"></i>
                                <span class="u-srOnly">{{ phrase('awaiting_approval') }}</span>
                            </xf:set>
                            </xf:if>

Code:
                            <xf:set var="$moderatedStatus">
                                <i class="structItem-status structItem-status--moderated" aria-hidden="true" title="{{ phrase('awaiting_approval')|for_attr }}"></i>
                                <span class="u-srOnly">{{ phrase('awaiting_approval') }}</span>
                            </xf:set>

post_article_macros has one too, around line 28.
 
Last edited:
Back
Top Bottom