[buddypress-trac] [BuddyPress] #3271: groups admin manage members buttons hardcoded to core awkward for theme devs
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Thu Jun 9 12:34:14 UTC 2011
#3271: groups admin manage members buttons hardcoded to core awkward for theme
devs
--------------------------+----------------------------------------
Reporter: hnla | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 1.3
Resolution: | Keywords: bp-group-template, buttons
--------------------------+----------------------------------------
Comment (by boonebgorges):
hnla - Your second option is much better than the first. There is no good
reason for this markup to be generated in the PHP. It should be split out
into a proper loop.
One of two things will have to be done to make this work.
1) Add additional parameters to bp_group_has_members() that allow querying
for different member types. I would suggest a 'type' param, which can take
'members', 'mods', 'admins', or an array thereof. Corresponding
adjustments would have to happen down the whole chain (all the way down to
the query level) in order to make this work.
2) Use the existing 'include' param on bp_has_members() instead
{{{
$admins = groups_get_group_admins( bp_get_group_id() );
if ( bp_has_members( array( 'include' => $admins ) ) ) :
//loop
endif;
}}}
I guess I'd say that (2) is the way to go. For one thing, it would keep
this patch entirely inside of groups/single/admin.php, instead of
requiring adjustments to the query class. Also, I would eventually like to
see bp_group_has_members() and its template tags merged into
bp_has_members(), so I don't want to put a bunch of extra code into making
it work.
As for backpat - we'll simply leave the old bp_group_admin_memberlist()
and bp_group_mod_memberlist() in bp-groups-template.php for now. Custom
templates that use this tag will continue to work, though we will urge
theme authors to migrate to the new method.
hnla, are you up for patching this?
--
Ticket URL: <https://trac.buddypress.org/ticket/3271#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list