[buddypress-trac] [BuddyPress] #2383: Output error message filters for Messaging Component

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed May 12 16:12:14 UTC 2010


#2383: Output error message filters for Messaging Component
-----------------------+----------------------------------------------------
 Reporter:  r-a-y      |       Owner:       
     Type:  defect     |      Status:  new  
 Priority:  normal     |   Milestone:  1.2.4
Component:  Messaging  |    Keywords:       
-----------------------+----------------------------------------------------
 I've finished creating a small plugin that blocks private messages from
 being sent if one of the recipients isn't a friend of the logged-in user
 who is composing the message.

 The plugin works well, but rather than outputting the generic "''There was
 an error sending that message, please try again''" error, I need a way to
 customize the error message string.

 Instead of telling users to use a language file, I'm suggesting the
 following two filters:

 '''line 186 - bp-messages.php'''

 {{{
 bp_core_add_message( apply_filters( 'messages_compose_sent_error', __(
 'There was an error sending that message, please try again', 'buddypress'
 ) ), 'error' );
 }}}

 '''line 485 - /bp-themes/bp-default/_inc/ajax.php'''

 {{{
 echo "-1<div id='message' class='error'><p>" . apply_filters(
 'bp_dtheme_ajax_messages_send_reply_error', __( 'There was a problem
 sending that reply. Please try again.', 'buddypress' ) ). '</p></div>';
 }}}

 ---

 I'm listing this as a defect so it'll get seen and hopefully included in
 BP 1.2.4, but understand if this gets bumped to v1.3.

 The sooner this gets included, the sooner I can release the plugin.

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2383>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list