XF 2.2 How can I disable private messaging?

Hello :)

At this time I do not want users to have the private messaging tool and I do not want that button to appear.

The reason is to prevent spam and inappropriate messages.

Is this possible?
 
The hell...¿🤔?, apparently we can no longer attach images?–or at least it's not allowing me to do so right now to show a screenshot of the nav/visitor bar PM icon which I am currently trying figure out how to completely get rid of.

Instead when going into 'Attach files' it's forcing me to have to go digging through folders–find & select the image–then preview that image before hitting 'Save'–at which point literally nothing happens.

Anyways, I'm sure someone's already working on sorting out whatever's causing that weirdness.

Regardless, does anyone know how to remove the PM icon?

I do not mean simply disabling permission settings for PMs, but rather entirely removing the PM icon altogether—for all members.
Ideally, if anyone knows how, it'd be even better if we could also disable the whole PMs system too(?)

Cheers
 
Regardless, does anyone know how to remove the PM icon?

In the template PAGE_CONTAINER look for this and remove it:

Code:
                           <a href="{{ link('conversations') }}"
                                class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--conversations js-badge--conversations badgeContainer{{ $xf.visitor.conversations_unread ? ' badgeContainer--highlighted' : '' }}"
                                data-badge="{$xf.visitor.conversations_unread|number}"
                                data-xf-click="menu"
                                data-xf-key="{{ phrase('shortcut.conversations_menu')|for_attr }}"
                                data-menu-pos-ref="< .p-navgroup"
                                title="{{ phrase('conversations')|for_attr }}"
                                aria-label="{{ phrase('conversations')|for_attr }}"
                                aria-expanded="false"
                                aria-haspopup="true">
                                <i aria-hidden="true"></i>
                                <span class="p-navgroup-linkText">{{ phrase('nav_inbox') }}</span>
                            </a>
                            <div class="menu menu--structural menu--medium" data-menu="menu" aria-hidden="true"
                                data-href="{{ link('conversations/popup') }}"
                                data-nocache="true"
                                data-load-target=".js-convMenuBody">
                                <div class="menu-content">
                                    <h3 class="menu-header">{{ phrase('conversations') }}</h3>
                                    <div class="js-convMenuBody">
                                        <div class="menu-row">{{ phrase('loading...') }}</div>
                                    </div>
                                    <div class="menu-footer menu-footer--split">
                                        <div class="menu-footer-main">
                                            <ul class="listInline listInline--bullet">
                                                <li><a href="{{ link('conversations') }}">{{ phrase('show_all') }}</a></li>
                                                <xf:if is="$xf.visitor.canStartConversation()">
                                                    <li><a href="{{ link('conversations/add') }}">{{ phrase('start_new_conversation') }}</a></li>
                                                </xf:if>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>
 
Last edited:
The above will not stop the conversations showing to anyone who knows the link or may have bookmarked https://foumsite.com/conversations/

You would need to fix that, maybe put this into your .htaccess should do it:

Code:
Redirect 410 /conversations/
 
Last edited:
In the template PAGE_CONTAINER look for this and remove it:

Code:
                           <a href="{{ link('conversations') }}"
                                class="p-navgroup-link p-navgroup-link--iconic p-navgroup-link--conversations js-badge--conversations badgeContainer{{ $xf.visitor.conversations_unread ? ' badgeContainer--highlighted' : '' }}"
                                data-badge="{$xf.visitor.conversations_unread|number}"
                                data-xf-click="menu"
                                data-xf-key="{{ phrase('shortcut.conversations_menu')|for_attr }}"
                                data-menu-pos-ref="< .p-navgroup"
                                title="{{ phrase('conversations')|for_attr }}"
                                aria-label="{{ phrase('conversations')|for_attr }}"
                                aria-expanded="false"
                                aria-haspopup="true">
                                <i aria-hidden="true"></i>
                                <span class="p-navgroup-linkText">{{ phrase('nav_inbox') }}</span>
                            </a>
                            <div class="menu menu--structural menu--medium" data-menu="menu" aria-hidden="true"
                                data-href="{{ link('conversations/popup') }}"
                                data-nocache="true"
                                data-load-target=".js-convMenuBody">
                                <div class="menu-content">
                                    <h3 class="menu-header">{{ phrase('conversations') }}</h3>
                                    <div class="js-convMenuBody">
                                        <div class="menu-row">{{ phrase('loading...') }}</div>
                                    </div>
                                    <div class="menu-footer menu-footer--split">
                                        <div class="menu-footer-main">
                                            <ul class="listInline listInline--bullet">
                                                <li><a href="{{ link('conversations') }}">{{ phrase('show_all') }}</a></li>
                                                <xf:if is="$xf.visitor.canStartConversation()">
                                                    <li><a href="{{ link('conversations/add') }}">{{ phrase('start_new_conversation') }}</a></li>
                                                </xf:if>
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>

The above will not stop the conversations showing to anyone who knows the link or may have bookmarked https://foumsite.com/conversations/

You would need to fix that, maybe put this into your .htaccess should do it:

Code:
Redirect 410 /conversations/
My goodness gracious, Mr Lucky sir, you truly are a blessing and a genuine bonafide inspiration.

I am indeed grateful for your generous assistance once more and I shall attempt removal of the indicated codes shortly.

Thank you so much.
 
Back
Top Bottom