Skip to:

Opened 3 years ago

Last modified 21 months ago

#6387 assigned enhancement

Fix for bp_groups-template in order to support Ajax for group admin actions

Reported by: lenasterg Owned by:
Milestone: Awaiting Contributions Priority: normal
Severity: normal Version:
Component: Groups Keywords: needs-testing needs-patch


The attached patch allows the current group to be fetched for manage members actions(ban, unban, promote etc).
This would allow us in 2nd phase to use Ajax also in group members management similar to

Attachments (2)

bp-groups-template.php.patch (2.4 KB) - added by lenasterg 3 years ago.
6387.01.patch (21.0 KB) - added by r-a-y 3 years ago.

Download all attachments as: .zip

Change History (15)

#1 @DJPaul
3 years ago

  • Keywords has-patch needs-testing added
  • Milestone changed from Awaiting Review to 2.3

Thanks for the patch. Looks OK. Haven't tested it yet.

#2 @DJPaul
3 years ago

  • Owner set to DJPaul
  • Status changed from new to assigned

I really want to sneak this in as it looks like a trivial change, I'll take a look at it this weekend.

#3 @DJPaul
3 years ago

  • Keywords early added
  • Milestone changed from 2.3 to 2.4

Looks a bit more involved than at first glance. Let's do for 2.4.

#5 @DJPaul
3 years ago

  • Owner DJPaul deleted

#6 @r-a-y
3 years ago

bp-groups-template.php.patch has the potential to break links for those relying on the $groups_template global.

Instead, 01.patch sets the $group object to groups_get_current_group() after the group check in $groups_template does not exist for all our group template functions.

This should allow us to use group template functions across all group contexts now, which is something I've wanted to do for awhile now.

lenasterg - Does this work for you?

I'll split the changes to add a second parameter for bp_group_member_demote_link(), bp_group_member_ban_link(), bp_group_member_unban_link() and bp_group_member_remove_link() into a separate commit.

Last edited 3 years ago by r-a-y (previous) (diff)

3 years ago

#7 @lenasterg
3 years ago

Hi @r-a-y.
Yes the 6387.01 patch works fine for me.
If you include to src I can move forward and commit patch for the ticket

Thanks Lena.

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.

3 years ago

#9 @DJPaul
2 years ago

I see some sneaky changes for extract, let's commit those lines seperately.

RE: $groups_template->group vs groups_get_current_group(). I think these returns different objects. Did you check? I think I did and found they were different which is why I left my "this looks more involved than at first glance" comment.

#10 @DJPaul
2 years ago

  • Keywords dev-feedback added

#11 @DJPaul
2 years ago

  • Keywords needs-patch added; has-patch early dev-feedback removed
  • Milestone changed from 2.4 to 2.5

Patch needs some refactoring.

#12 @DJPaul
2 years ago

  • Milestone changed from 2.5 to 2.6

#13 @DJPaul
21 months ago

  • Milestone changed from 2.6 to Future Release
Note: See TracTickets for help on using tickets.