Skip to:

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7640 closed enhancement (fixed)

Improve parameters of private and public message buttons, in order to improve flexibility and consistency

Reported by: antonioeatgoat's profile antonioeatgoat Owned by: djpaul's profile djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.2
Component: Messages Keywords: has-patch


The first couple of function involved are bp_get_send_public_message_button() and bp_get_send_message_button(). They do basically the same job in different contexts, however the first function accepts an array of parameters, but the second doesn't. This is the problem about consistency.

About flexibility there is the fact that the functions use bp_get_send_public_message_link() and bp_get_send_private_message_link() to generate the links. The problem is that those functions work only on members page and they don't accept any parameter. It would be nice if they can receive an user ID, so that they can be used also in other places, such as the members loop.

Attachments (1)

7640.patch (5.6 KB) - added by antonioeatgoat 6 years ago.
Improved parameters of the functions involved

Download all attachments as: .zip

Change History (4)

6 years ago

Improved parameters of the functions involved

#1 @DJPaul
6 years ago

  • Milestone changed from Awaiting Review to 3.0

We'll look at this for 3.0 - thanks for the patch!

#2 @djpaul
6 years ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11791:

Messages: allow customisable arguments for bp_get_send_message_button().

Matches the flexibility from the similar bp_get_send_public_message_button().

Fixes #7640

Props antonioeatgoat for the initial patch

#3 @DJPaul
6 years ago

Thanks for the good patch, @antonioeatgoat. I've committed part, but at this time have decided not to add the user ID to those functions you identified that only work with a members template loop. This sort of request (albeit it in different areas) keeps occurring, so I've created a new ticket to discuss if this is something the project should do or not. Please see #7652

Note: See TracTickets for help on using tickets.