XF 2.2 How to remove Profile Posts Tab

MapleOne

Well-known member
Screenshot - 2023-01-24T232544.883.webp

I've disabled all permissions for everyone yet this tab continues to live in members profiles.

I don't use that feature on our board but some members keep asking me how to post there because they see that tab.

I inspected it and have tried every css combination I know off to no avail.

Has anyone been successful in removing this tab completely?

I have an addon installed that makes the About tab the default selected tab.
 
Great thank you, I thought that one was so members could see the profile.

I also have this extension installed



So the about tab becomes the default

@AndyB once I remove the setting above the about tab is no longer the default with your addon, instead it shows Latest Activity as the default.

Our board does not use profile posts and because we have custom verified fields in the about tab it is the most important tab and needs to be the default.

So for now I have to keep the profile posts tab active to keep the About tab as the default.

Getting closer to completely removing profile posts, just one more step.
 
I found an imperfect solution...

I removed the description from the language file, now the tab is barely visible with no heading.
Edit the member_view template and look for the 'tabs-tab is-active', leave only the one that corresponds to "{{ link('members/about', $user) }}" as active.

Example:

Code:
            <span class="hScroller-scroll">
                <!--[XF:tabs:start]-->
                <xf:if is="$user.canViewPostsOnProfile()">
                    <a href="{{ link('members', $user) }}"
                        class="tabs-tab"
                        role="tab"
                        aria-controls="profile-posts">{{ phrase('profile_posts') }}</a>
                </xf:if>

                <xf:if is="$user.canViewLatestActivity()">
                    <xf:if is="!$user.canViewPostsOnProfile()">
                        <a href="{{ link('members', $user) }}"
                            class="tabs-tab"
                            role="tab"
                            aria-controls="latest-activity">{{ phrase('latest_activity') }}</a>
                    <xf:else />
                        <a href="{{ link('members/latest-activity', $user) }}"
                            rel="nofollow"
                            class="tabs-tab"
                            id="latest-activity"
                            role="tab">{{ phrase('latest_activity') }}</a>
                    </xf:if>
                </xf:if>

                <a href="{{ link('members/recent-content', $user) }}"
                    rel="nofollow"
                    class="tabs-tab"
                    id="recent-content"
                    role="tab">{{ phrase('postings') }}</a>

                <!--[XF:tabs:after_recent_content]-->

                <a href="{{ link('members/about', $user) }}"
                    class="tabs-tab is-active"
                    id="about"
                    role="tab">{{ phrase('about') }}</a>

                <xf:if is="$xf.visitor.canViewWarnings() && $user.warning_count">
                    <a href="{{ link('members/warnings', $user) }}"
                        class="tabs-tab"
                        id="warnings"
                        role="tab">{{ phrase('warnings') }}</a>
                </xf:if>
                <!--[XF:tabs:end]-->
            </span>
 
No, don’t do that, you’ll mess up any other addons that look for that code in the template.

Yeah, I don't like messing with templates especially because it complicates upgrades.

I'm happy with the way I did it, I have about and admins have a notes tab.

The default tab is not visible because there is nothing in the language file so unless you know its there it is 99% invisible, shows a tiny space and that is it.
 
Top Bottom