[buddypress-trac] [BuddyPress] #2242: make Group sticky

buddypress-trac noreply at wordpress.org
Tue Aug 27 18:45:58 UTC 2013

#2242: make Group sticky
 Reporter:  erich73                  |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Groups                   |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
Changes (by imath):

 * cc: math.viet@… (added)
 * keywords:   => has-patch needs-testing



 I've worked on the first part of the ticket : stick one or more groups on
 top of the first page of the Groups Directory.

 The patch (2242.diff) first adds a settings option to BuddyPress main
 settings page to activate/deactivate sticky groups (see
 Then if this settings is set and the group status is not hidden, a new
 checkbox will appear in the WordPress backend Group Admin UI when viewing
 a single group just above the privacy settings of the group (see
 Then if groups are sticked to the top of the Groups Directory, they will
 be displayed first then the other groups will be displayed (see
 In the WordPress backend Group Admin UI when viewing all groups, sticky
 ones have a yellow background (see http://flic.kr/p/fDew1A).

 Now Sticky groups are displayed on top if :
 - we're on the first page of the Groups Directory
 - no search query have been sent > i think a group that don't match the
 query but shows is an annoying behavior
 - no user id have been sent > in this case, we're not in groups directory
 - no include group have been sent > in this case, the user wants the
 included groups, not the sticky ones.

 I needed to use the function round() for the groups pagination as playing
 with floats and integer gave me some weird results...
 for instance :
 {{{intval( (1.4 - 1) * 5 )}}} gives 1
 but {{{intval( round( (1.4 - 1) * 5 ) )}}} gives 2 (and i think it's the
 correct result ;) )

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/2242#comment:5>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list