[buddypress-trac] [BuddyPress] #2566: [patch] “Send Private Message” and “Mention this User” Button Filtering

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Aug 27 22:19:01 UTC 2010


#2566: [patch] “Send Private Message” and “Mention this User” Button Filtering
-----------------------+----------------------------------------------------
 Reporter:  jeffsayre  |       Owner:  jeffsayre                                         
     Type:  defect     |      Status:  new                                               
 Priority:  major      |   Milestone:  1.2.6                                             
Component:  Core       |    Keywords:  has-patch, security, privacy, abstraction, filters
-----------------------+----------------------------------------------------

Comment(by jeffsayre):

 Okay, attached to this ticket is my repatch. I think it is a decent
 solution given the circumstances of what this ticket is trying to
 accomplish. I'm keeping the original patch in this ticket for the time
 being in case anyone wants to see it. At some point, the old patch should
 be removed. '''Note:''' It is crucial to make sure that the proper patch
 is applied.

 As you will see, in this patch, I've managed to keep most of the original
 template coding. I've added a conditional test that must be passed in
 order for the division CSS and contents to be outputted. The privacy
 filter will pass back false to the calling function if a given button is
 not to be displayed.

 Finally, I've extracted the division CSS from the bp_add_friend_button()
 but kept the other CSS selectors that are found embedded in the if clause
 conditional statement within that function. It was just too difficult to
 extract these selectors into a generic, variable-based single output.
 Also, I kept the division markup the same as it was in the
 bp_add_friend_button() because at least one of the selectors is used by a
 jQuery function, so I did not want to make any changes in the selector
 output. That is why I used the list() construct--which is PHP 4 and 5
 complaint--to pass back the requisite variables to the template.

 So, with respect to the division wrappers within the member-header.php
 template, at least all three buttons are now on equal footing.

-- 
Ticket URL: <https://trac.buddypress.org/ticket/2566#comment:19>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list