Remove Members List [Deleted]

XenForo 1.2 Status: Not required.

Reason:

This customization is no longer required in XenForo 1.2 + because there is no longer a generalized member list, but rather the members list has been replaced with a "top user" type page. In addition there is an option within XenForo 1.2 + to disable this features.
Support Status:

I'm opposed to deleting old resources because they can be still useful for others. So this will remain indefinitely, but no further updates or support will be provided upon the first public beta release of XenForo 1.2


edited and post updated August 29, 2013
New status here
http://xenforo.com/community/threads/remove-members-list.36634/page-2#post-624568
 
Last edited:
  • Like
Reactions: DRE
It is turned off by default, only notable members are showing. Does notable members eat a lot of resources too or I can leave it, because when I take a look at the code its the same removal that can be done to it.
 
It is turned off by default, only notable members are showing. Does notable members eat a lot of resources too or I can leave it, because when I take a look at the code its the same removal that can be done to it.
Notable members uses few resources.

This guide is not for XenForo 1.2 and should not be used. There is an options within XenForo to turn off the members list now.
 
Original XenForo 1.1.x
instructions


Members could just as easily search for members, follow other members to their profile (if that member allowed it), send personal messages to members, and leave profile comments without a members list.

Further the members list was heavy on resources and primarily abused by spammers as a spam list. Removing the members list saved on server resources by saving database queries, page loads, and has prevented abuse through spam. The above also reduced to page speed load for members using our community.

STEP 1

First let's remove the tabs

Skin Template: navigation

Search for:

IF XenForo 1.1.4 (or newer)

PHP:
  <!-- members -->
  <xen:if is="{$tabs.members}">
  <li class="navTab members {xen:if $tabs.members.selected, 'selected', 'Popup PopupControl PopupClosed'}">
 
  <a href="{$tabs.members.href}" class="navLink">{$tabs.members.title}</a>
  <a href="{$tabs.members.href}" class="SplitCtrl" rel="Menu"></a>
   
  <div class="{xen:if {$tabs.members.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} membersTabLinks">
  <div class="primaryContent menuHeader">
  <h3>{$tabs.members.title}</h3>
  <div class="muted">{xen:phrase quick_links}</div>
  </div>
  <ul class="secondaryContent blockLinksList">
  <xen:hook name="navigation_tabs_members">
  <li><a href="{xen:link members}">{xen:phrase registered_members}</a></li>
  <li><a href="{xen:link online}">{xen:phrase current_visitors}</a></li>
  <xen:if is="{$xenOptions.enableNewsFeed}"><li><a href="{xen:link recent-activity}">{xen:phrase recent_activity}</a></li></xen:if>
  </xen:hook>
  </ul>
  </div>
  </li>
  </xen:if>


IF XenForo 1.1.3 (or older)
PHP:
<!-- members -->
  <xen:if is="{$tabs.members}">
  <li class="navTab members {xen:if $tabs.members.selected, 'selected', 'Popup PopupControl PopupClosed'}">

  <a href="{$tabs.members.href}" class="navLink">{$tabs.members.title}</a>
  <a href="{$tabs.members.href}" class="SplitCtrl" rel="Menu"></a>

  <div class="{xen:if {$tabs.members.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
  <div class="primaryContent menuHeader">
  <h3>{$tabs.members.title}</h3>
  <div class="muted">{xen:phrase quick_links}</div>
  </div>
  <ul class="secondaryContent blockLinksList">
  <xen:hook name="navigation_tabs_members">
  <li><a href="{xen:link members}">{xen:phrase registered_members}</a></li>
  <li><a href="{xen:link online}">{xen:phrase current_visitors}</a></li>
  <xen:if is="{$xenOptions.enableNewsFeed}"><li><a href="{xen:link recent-activity}">{xen:phrase recent_activity}</a></li></xen:if>
  </xen:hook>
  </ul>
  </div>
  </li>
  </xen:if>

Comment that ALL out using

PHP:
<xen:comment>
</xen:comment>



Next....

Skin Template: Extra.css

Add the following:

PHP:
.navTabs .navTab.members.PopupClosed
{
  display: none;
}
Next....

Let's remove members list link in your Quick Navigation Menu ;)

In template: quick_navigation_menu

Look for

PHP:
 <li><a href="{xen:link members}">{xen:phrase registered_members}</a></li>

And comment it out by wrapping it with

PHP:
<xen:comment>
</xen:comment>

So when done it will look like this

PHP:
 <xen:comment><li><a href="{xen:link members}">{xen:phrase registered_members}</a></li></xen:comment>



Step 2 - A
You can skip step Step 2 - A if you follow Step 2 -B
Or you can do both if you want (the choice is yours)


Lets remove all remaining extra links and make entering the address manually useless

Skin Template: member_list

Search for:

PHP:
<xen:h1>{xen:phrase registered_members}</xen:h1>

Directly below it add:
PHP:
<xen:if is="!{xen:helper ismemberof, $visitor, $member}">

So when done it will look like:

PHP:
<xen:h1>{xen:phrase registered_members}</xen:h1>
<xen:if is="!{xen:helper ismemberof, $visitor, $member}">

Next .... (within same template)

Search for:

PHP:
</xen:sidebar>

Directly under it add the following:

PHP:
<xen:else />
The Administrator has turned off this feature.
</xen:if>

Note: You can change that notice however you like.
"The requested page could not be found." works just as good.

So when done it will look like this:

PHP:
</xen:sidebar>
<xen:else />
The Administrator has turned off this feature.
</xen:if>

Step 2 - B

If you prefer not having more template edits and would rather allow Apache to re-direct /members/ back to your forum's home page. You can simple add this to your htaccess

PHP:
  RedirectMatch 301 ^/forums/members/?$ /forums/

You should adjust that path to fit your needs.

For example:

If you're not using /forums/ for your site, but rather /community/ it would look like this

PHP:
  RedirectMatch 301 ^/community/members/?$ /community/

Step 3

All that remains now is the breadcrumbs. Let's get rid of them.

In the following files search for:

library/XenForo/Route/Prefix/Members.php

PHP:
return $router->getRouteMatch('XenForo_ControllerPublic_Member', $action, 'members')

library/XenForo/Route/Prefix/Online.php

PHP:
return $router->getRouteMatch('XenForo_ControllerPublic_Online', $action, 'members');

library/XenForo/Route/Prefix/RecentActivity.php

PHP:
return $router->getRouteMatch('XenForo_ControllerPublic_RecentActivity', 'index', 'members');

You should notice that that while part of those code strings vary, they all end with

PHP:
'members');

Change that to:

PHP:
'forums');

DONE


Congratulations

:D


Future version plans:
  • TMS Release so manual template edits not required
  • .htaccess redirect so that manually entering /members/ alone without a user name, will direct you back to the forum (site). Making the above notice, not required. Step 2 B added May 8th, 2013
License

This modification uses shared common usage code from XenForo and as such as the property of XenForo Ltd (all rights reserved). It may be freely used and modified among customers of XenForo Ltd.

This modification also uses common usage code from Apache and this aspect of this modification maybe freely used (its non exclusive).​
 
By popular demand a XenForo 1.2.x update is now in progress....

..... Please stand by......

(Seems enough people keep asking about this. Notably about the Notable Members List)
 
Last edited:
Adam Howard updated Remove Members List with a new update entry:

XenForo 1.2.x update - Notable Member List

So originally this was discontinued after XenForo 1.2.x because you can simply turn off the members list using settings.

However, after wave upon wave of post and mostly PM's (private messages) of people asking (sometimes demanding) that I continue this with an update, to remove The Notable Member List.... I decided to give what the people want (you're welcome).

I have not fully tested this update and you should try this on a test site first. Just as you should read resource update notices before applying anything (and not doing so is stupid).

If you're bold enough (crazy enough) to try this on your life site without testing... Backup. If you don't, the fault is yours.

Enjoy :)

Read the rest of this update entry...
 
It is turned off by default, only notable members are showing. Does notable members eat a lot of resources too or I can leave it, because when I take a look at the code its the same removal that can be done to it.
Notable Members uses so very few resource, that its negligible. It's safe to leave it.

But since I've had a few dozen or more people request this be updated to remove Notable Members... I've updated the resource to do just that.
 
@Adam Howard Any reason why the template mod for commenting out the navigation template wouldn't take? I've tried it about 4 different times and it always comes up 0/4/0 and the test never works either. I know what its supposed to do, I just can't get the TM system to do it.
 
@Adam Howard Any reason why the template mod for commenting out the navigation template wouldn't take? I've tried it about 4 different times and it always comes up 0/4/0 and the test never works either. I know what its supposed to do, I just can't get the TM system to do it.
XenForo's TMS is very picky when it comes to the spacing... ie... Everything has to match exactly.

For example.
Code:
1234
is not the same as
Code:
     1234

So if you're coping and pasting from this "guide" and the spacing isn't matching.... Because sometimes browsers are funny not to pick it up.... Navigate to YOUR own navigation template (not just from within the TMS), copy the code from there and past it into the tms.

Another possibility is you have a custom style and your template is different from the default.

If you need someone to take a look and all else fails.... Send me a PM.
 
That was my first thought as well, but it didn't work either. Maybe it has something to do with my browser. I just went ahead and did it manually. Maybe after the next update if I can't get it again I'll reach out. Thanks for the offer.
 
That was my first thought as well, but it didn't work either. Maybe it has something to do with my browser. I just went ahead and did it manually. Maybe after the next update if I can't get it again I'll reach out. Thanks for the offer.
Do you have any other add-ons or template edits that could be conflicting?

I mean if you have something else for your navigation, you may need to customize to fit your own independent needs.

As I recall in your earlier post, you were using a custom style (and the code in that style maybe different from the default style).
 
Yeah, different styles, but the mod wasn't even picking up the default style. No biggie. Just thought I'd see what you had to say.
If you send me a PM I can take a look.

But my only theory would be....

1) Conflict with another template edit
2) Conflict with another add-on
3) Coping and pasting the spacing does not match (for whatever reason)

.... since you after all you claim you even tried to copy & paste your own code, from your own template (and not this guide)

So if you're coping and pasting from this "guide" and the spacing isn't matching.... Because sometimes browsers are funny not to pick it up.... Navigate to YOUR own navigation template (not just from within the TMS), copy the code from there and past it into the tms.

That was my first thought as well, but it didn't work either. Maybe it has something to do with my browser. I just went ahead and did it manually. Maybe after the next update if I can't get it again I'll reach out. Thanks for the offer.

What version of XenForo are you using?
 
Last edited:
Back
Top Bottom