Opened 12 years ago
Closed 12 years ago
#4717 closed enhancement (no action required)
Member list "views" or modes
Reported by: | sooskriszta | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Members | Keywords: | |
Cc: |
Description
At the moment, member list is available at www.domain.com/members and www.domain.com/group-name/members etc
On clicking a member's name or profile image, I am taken to that member's "page" www.domain.com/member-name/ where the activity tab is open and I can access other tabs like profile and groups by clicking on them.
It would be a welcome addition to have additional views whereby a different tab is open when member's page is opened following a click from member list.
e.g.
There could be a profile view
www.domain.com/members/profile
The page render would look exactly like www.domain.com/members/
But when I click on a member's name or photo,
I am taken to www.domain.com/member-name/profile/
instead of www.domain.com/member-name/activity/
Similarly, for users of BuddyPress Media http://wordpress.org/extend/plugins/buddypress-media/ there could be a media view
www.domain.com/members/media (clicking a member would go to www.domain.com/member-name/media/)
which would be useful for folks who want to create media-centric communities like Flickr or DeviantArt
Change History (5)
#1
follow-up:
↓ 2
@
12 years ago
- Component changed from Template Pack to Members
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Severity changed from major to normal
- Status changed from new to closed
- Version 1.6.1 deleted
#2
in reply to:
↑ 1
@
12 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
Thanks, @r-a-y but that's not what the ticket is about. I should have done a better job of explaining in the OP.
In the current codebase ('BP_DEFAULT_COMPONENT', 'profile') snippet changes which tab is default when you go to profile.
Yet, at the moment, there can only be ONE default while navigating through the community.
Here's what will happen with this ticket:
Suppose site admin says BP_DEFAULT_COMPONENT = media meaning www.domain.com/christina/ shows www.domain.com/christina/media/
Even then, if a user clicks on "Profile" view in member directory, then clicking on username or photo goes to www.domain.com/christina/profile/
In essence, there are MULTIPLE views available to USERS/MEMBERS as opposed to currently available SINGLE view (at the moment, multiple options are available to SITE ADMIN to define the default view). I hope this is a bit clearer.
#3
@
12 years ago
- Resolution set to invalid
- Status changed from reopened to closed
I would say this could easily be done in a plugin.
Filter the member permalink ('bp_get_member_permalink') when on a members directory page and change the permalink to whatever you want. In your case, add '/profile/' to the end of the member permalink.
That way you can still use the BP_DEFAULT_COMPONENT constant, while having a different endpoint when viewing the members directory.
#4
@
12 years ago
- Resolution invalid deleted
- Status changed from closed to reopened
While I appreciate the extendability aspect of BP, different "views" does seem to have a fair bit of core appeal.
#5
@
12 years ago
- Resolution set to invalid
- Status changed from reopened to closed
different "views" does seem to have a fair bit of core appeal.
I'm going to respectfully disagree. I'm having a hard time imagining how this would be implemented in core in a sensible way.
If, on the one hand, the goal is simply to replace the proper filters/constants into BuddyPress to allow plugins to set their own "views", then, as r-a-y says above, it's already done: just filter 'bp_get_member_permalink'
and change its value based on the current location. (And really, why not do this in a theme template file? This kind of customization - where markup needs to be changed in a very specific place in the theme - is exactly why WordPress and BuddyPress's theme system exists.)
If, on the other hand, the goal is to create a core UI for selecting these views, then it's not at all clear to me how it would work. What would the UI look like? Would you see a list of all possible places where member links appear, and then have dropdowns where you can select which profile component the specific links go to? This seems like an overwhelming number of choices. Moreover, it seems like something that would only be used by a small fraction of installations: I'd imagine that there are relatively few people who would prefer that (to use your example) a username in a directory goes to the Media tab, while other user links go to the Profile.
It's quite possible that I'm suffering a failure of imagination here. If someone thinks that this is really a viable idea for core, let them build or mock up a plugin first.
This can be done in the current codebase.
Read the following codex article:
http://codex.buddypress.org/developer/extending-buddypress/changing-internal-configuration-settings/
In particular, you'll want to use this code snippet in
/wp-content/plugins/bp-custom.php
:define( 'BP_DEFAULT_COMPONENT', 'profile' );
This changes the default user page to 'Profile' instead of 'Activity'.
If you don't want to fool around with code, there is a plugin that can handle extended BuddyPress settings:
https://wordpress.org/extend/plugins/buddypress-extended-settings/