Skip to:
Content

BuddyPress.org

Changes between Version 1 and Version 2 of Ticket #5336, comment 9


Ignore:
Timestamp:
02/24/2014 03:39:34 AM (10 years ago)
Author:
dcavins
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5336, comment 9

    v1 v2  
    11Hi boonebgorges-
    22
    3 Yep, one of the things I was looking for was input on the best way to get what we need for pagination without breaking compatibility with plugins and themes. I was hoping that leaving the function `groups_get_invites_for_group()` working would do it. (The only call to `BP_Groups_Group::get_invites` in BP is `groups_get_invites_for_group` and my new function. But of course returning an array of arrays instead of an array of user ids will never work.) I'll see if I can figure out how to do it using `BP_Group_Member_Query` instead.
     3Yep, one of the things I was looking for was input on the best way to get what we need for the admin interface without breaking compatibility with plugins and themes. I was hoping that leaving the function `groups_get_invites_for_group()` working would do it. (The only call to `BP_Groups_Group::get_invites` in BP is `groups_get_invites_for_group` and my new function. But of course returning an array of arrays instead of an array of user ids will never work, as I found when the send invites function broke.)
    44
    5 Invite visibility: Yes, I'll move that out.
     5Pagination really wasn't the crux of this ticket to begin with. (So I'll move that to another ticket as well.) This ticket was about adding an invitation management piece on the WordPress admin side group management page. It diverged along the way because I realized that I had to be able to get all outstanding invitations for the group and add pagination. The core piece I still need for this to work on the WP admin side is the ability to get all invites for the group (unscoped by user). We'd like to use `bp_groups_has_invites()` but that loop is scoped by user.
    66
    7 Send invites UI: I can only imagine that the extra step is a confirmation step, so you can fix a mistake before sending an awkward invitation. Yes, I'll open a new ticket.
     7{{{
     8bp_group_has_invites( $args = '' ) {
     9        global $bp, $invites_template, $group_id;
    810
    9 New loop template: The new loop template I think is used for easy AJAX page generation when changing pages. (The existing AJAX pagination functions use the related template file to create the new markup and then send it back to the browser. The existing template contains more than just the member list and pagination, which is what I moved to the new template file.)
     11        $defaults = array(
     12                'group_id' => false,
     13                'user_id' => bp_loggedin_user_id()
     14        );
     15}}}
     16
     17I could pass in a `user_id` of null or zero, I guess. Would that be an acceptable way to get around the user scoping?
     18
     19Invite visibility: Yes, I'll move that out. (Moved to ticket #5422.)
     20
     21Send invites UI: I can only imagine that the extra step is a confirmation step, so you can fix a mistake before sending an awkward invitation. Yes, I'll open a new ticket. (#5421)
     22
     23New loop template: I added the new loop template to simplify AJAX page generation when changing pages. (The existing similar AJAX pagination functions use the related template file to create the new markup and then send it back to the browser. The existing template for invitations contains more than just the member list and pagination--the parts that need to be refreshed--which is what I moved to the new template file.)
    1024
    1125Thanks for your feedback.