Search Results for 'private message button'
-
AuthorSearch Results
-
August 25, 2013 at 4:20 pm #170386
In reply to: Private Message Button Label Change
HenryMemberYou could do it like that but each time you update BuddyPress you’ll lose the changes you’ve made to bp-messages-template.php. I’d try to avoid making changes to the plugin core.
August 25, 2013 at 4:18 pm #170385In reply to: Private Message Button Label Change
tayenewmParticipantThat process seems beyond me and very long (and I cannot find the /plugins/buddypress/bp-languages folder) I just want to change the “Private Message” button label. Can I access/change it quickly like this:
1. access buddypress/bp-messages/bp-messages-template.php
2. change the ‘link text’ to the new label name in this block of code?function bp_get_send_message_button() {
// Note: ‘bp_get_send_message_button’ is a legacy filter. Use
// ‘bp_get_send_message_button_args’ instead. See #4536
return apply_filters( ‘bp_get_send_message_button’,
bp_get_button( apply_filters( ‘bp_get_send_message_button_args’, array(
‘id’ => ‘private_message’,
‘component’ => ‘messages’,
‘must_be_logged_in’ => true,
‘block_self’ => true,
‘wrapper_id’ => ‘send-private-message’,
‘link_href’ => bp_get_send_private_message_link(),
‘link_title’ => __( ‘Send a private message to this user.’, ‘buddypress’ ),
‘link_text’ => __( ‘Private Message’, ‘buddypress’ ),
‘link_class’ => ‘send-message’,
) ) )August 25, 2013 at 1:58 pm #170380In reply to: Private Message Button Label Change
HenryMemberThis will help you. It shows you how to change most of the text labels and messages outputted by BuddyPress:
https://codex.buddypress.org/developer/customizing/customizing-labels-messages-and-urls/
July 28, 2013 at 11:19 am #168939In reply to: BuddyPress 1.8 Issue
GhostPoolParticipantI already have the following in my custom BP functions file:
if(bp_is_active('friends')) add_action('bp_member_header_actions', 'bp_add_friend_button'); if(bp_is_active('activity') && bp_activity_do_mentions()) add_action('bp_member_header_actions', 'bp_send_public_message_button'); if(bp_is_active('messages')) add_action('bp_member_header_actions', 'bp_send_private_message_button'); // Group Buttons if(bp_is_active('groups')) { add_action('bp_group_header_actions', 'bp_group_join_button'); add_action('bp_group_header_actions', 'bp_group_new_topic_button'); add_action('bp_directory_groups_actions', 'bp_group_join_button'); }
As I say these buttons displayed in the theme in v1.7.3, they only disappear in v1.8. I think you’re right of course, it looks like a theme issue, I just cannot figure out what changed in v1.8 to stop these buttons working in my theme.
July 27, 2013 at 2:44 pm #168900In reply to: BuddyPress 1.8 Issue
GhostPoolParticipantNobody else has had the same issue? Lets try a different tact. Has there been any changes made to private message, add friend and public message buttons in 1.8?
July 1, 2013 at 10:11 am #167336In reply to: show header item when user not login in buddypress
designwebParticipant@bphelp Thank for your reply. my question is simple. i need to show member header item which include (add friend, send private message etc). which are not showing when user are not login. i need to remove login to see header item button condition . any way to do this.
June 28, 2013 at 10:35 pm #167154In reply to: Private Message Button in Member List Loop
HenryMemberI’m still scratching my head with this one. It must be my install playing games. In the end I got it working with
Anyway I thought why not just build the link and throw it directly in the friends template?
June 28, 2013 at 4:16 pm #167111In reply to: Private Message Button in Member List Loop
kizmarkParticipant@Henry, Did you got it solved?
I’m having the same question.. I want to get the link to have a send private message button
April 27, 2013 at 5:30 pm #162886In reply to: Private Message Button in Member List Loop
HenryMember@shanebpdev
For the life of me I cannot figure out why it doesn’t work for the friends loop. Am I missing something glaringly obvious?
Anyway I thought why not just build the link and throw it directly in the friends template?
echo wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( bp_get_member_user_id() ) );
April 27, 2013 at 3:29 pm #162881In reply to: Private Message Button in Member List Loop
shanebpModeratorI’m not going to spoon-feed this to you.
But you’re on the right track.
( I should have said ‘ The clue is in your reply…’ )
You’ve found what is the same in those two situations.
So what is different about them ?Sometimes it’s easier to start anew.
For example – instead of ‘how to I change this to do that’, start with ‘how do I do that’.Use echo to confirm the required variables.
Use var_dump to expose all the fields in objects.April 27, 2013 at 2:40 pm #162878In reply to: Private Message Button in Member List Loop
HenryMember@shanebp you mean the bp_directory_members_item is different? That is the same in both the members directory and the friends list (both use the members loop)…
April 27, 2013 at 2:00 pm #162876In reply to: Private Message Button in Member List Loop
shanebpModerator@henrywright-1
What’s different? The answer is in your reply “Thanks for that… ”
@valuser
That usage makes sense and has been mentioned by others.
But it’s not a simple tweak.
And would require an admin screen so you could choose to show / not show the button in loops.
And etc. etc.
I’ll write an article in the next week or so on
PhiloPressApril 27, 2013 at 11:17 am #162868In reply to: Private Message Button in Member List Loop
valuserParticipantThanks for function https://gist.github.com/shanebp/5391229
works bp 1.7, wp 3.5.1, bbPress 2.3.1 Theme: Child of bp Befault
Any chance that it might call up your BP Profile Message UX 1.1.3
April 27, 2013 at 10:30 am #162865In reply to: Private Message Button in Member List Loop
HenryMemberInterestingly I just tried this outside of the members loop. It doesn’t work on the friends list page. What is different about the friends loop and the members loop for this not to work? Humm…
April 27, 2013 at 9:13 am #162863In reply to: Private Message Button in Member List Loop
HenryMemberThanks for that! I can see now you’ve created a new function display_private_message_button which hooks on to action bp_directory_members_item in the members loop. Sorry for being slow, i got there in the end :}
April 27, 2013 at 2:12 am #162849In reply to: Private Message Button in Member List Loop
shanebpModeratorStart with the add_action and follow the function calls.
If you see a function that isn’t defined in the gist, then that function is in the codebase.
Find and study it.The add_action calls a function that calls bp_send_message_button() which creates the button.
Part of creating the button is creating the link.
The link can be filtered – so look for apply_filters in that context.April 26, 2013 at 6:29 pm #162830In reply to: Private Message Button in Member List Loop
April 22, 2013 at 8:04 pm #162380David CavinsKeymasterHi Modemlooper-
My theme is a child theme of Twenty Twelve, so my style.css declares Template: twentytwelve.
I followed your suggestion then took it a step farther and included slightly modified version of the js setup functions from the template pack in my `functions.php` file. I’ll post them here in case somebody else has the same problem I’m having:
`function bp_support_theme_setup() {
global $bp;// Load the default BuddyPress AJAX functions if it isn’t explicitly disabled or if it isn’t already included in a custom theme
if ( ! function_exists( ‘bp_dtheme_ajax_querystring’ ) )
require_once( BP_PLUGIN_DIR . ‘/bp-themes/bp-default/_inc/ajax.php’ );// Let’s tell BP that we support it!
add_theme_support( ‘buddypress’ );if ( ! is_admin() ) {
// Register buttons for the relevant component templates
// Friends button
if ( bp_is_active( ‘friends’ ) )
add_action( ‘bp_member_header_actions’, ‘bp_add_friend_button’ );// Activity button
if ( bp_is_active( ‘activity’ ) )
add_action( ‘bp_member_header_actions’, ‘bp_send_public_message_button’ );// Messages button
if ( bp_is_active( ‘messages’ ) )
add_action( ‘bp_member_header_actions’, ‘bp_send_private_message_button’ );// Group buttons
if ( bp_is_active( ‘groups’ ) ) {
add_action( ‘bp_group_header_actions’, ‘bp_group_join_button’ );
add_action( ‘bp_group_header_actions’, ‘bp_group_new_topic_button’ );
add_action( ‘bp_directory_groups_actions’, ‘bp_group_join_button’ );
}// Blog button
if ( bp_is_active( ‘blogs’ ) )
add_action( ‘bp_directory_blogs_actions’, ‘bp_blogs_visit_blog_button’ );
}
}
add_action( ‘after_setup_theme’, ‘bp_support_theme_setup’, 11 );/**
* Enqueues BuddyPress JS and related AJAX functions
*
* @since 1.2
*/
function bp_support_enqueue_scripts() {// Add words that we need to use in JS to the end of the page so they can be translated and still used.
$params = array(
‘my_favs’ => __( ‘My Favorites’, ‘buddypress’ ),
‘accepted’ => __( ‘Accepted’, ‘buddypress’ ),
‘rejected’ => __( ‘Rejected’, ‘buddypress’ ),
‘show_all_comments’ => __( ‘Show all comments for this thread’, ‘buddypress’ ),
‘show_all’ => __( ‘Show all’, ‘buddypress’ ),
‘comments’ => __( ‘comments’, ‘buddypress’ ),
‘close’ => __( ‘Close’, ‘buddypress’ )
);// BP 1.5+
if ( version_compare( BP_VERSION, ‘1.3’, ‘>’ ) ) {
// Bump this when changes are made to bust cache
$version = ‘20120412’;$params[‘view’] = __( ‘View’, ‘buddypress’ );
$params[‘mark_as_fav’] = __( ‘Favorite’, ‘buddypress’ );
$params[‘remove_fav’] = __( ‘Remove Favorite’, ‘buddypress’ );
}
// BP 1.2.x
else {
$version = ‘20110729’;if ( bp_displayed_user_id() )
$params[‘mention_explain’] = sprintf( __( “%s is a unique identifier for %s that you can type into any message on this site. %s will be sent a notification and a link to your message any time you use it.”, ‘buddypress’ ), ‘@’ . bp_get_displayed_user_username(), bp_get_user_firstname( bp_get_displayed_user_fullname() ), bp_get_user_firstname( bp_get_displayed_user_fullname() ) );
}// Enqueue the global JS – Ajax will not work without it
wp_enqueue_script( ‘dtheme-ajax-js’, BP_PLUGIN_URL . ‘/bp-themes/bp-default/_inc/global.js’, array( ‘jquery’ ), $version );// Localize the JS strings
wp_localize_script( ‘dtheme-ajax-js’, ‘BP_DTheme’, $params );
}
add_action( ‘wp_enqueue_scripts’, ‘bp_support_enqueue_scripts’ );
`Which is identical to installing the template pack only for the JS, I think. Everything’s working as expected, so I think we can consider this problem resolved. Thanks for your attention, Hugo and Modemlooper.
-David
April 15, 2013 at 8:57 pm #161746In reply to: Private Message Button in Member List Loop
shanebpModeratorApril 15, 2013 at 8:05 pm #161737In reply to: Private Message Button in Member List Loop
funmi omobaParticipantYour link is not working anymore
April 15, 2013 at 3:06 pm #161708In reply to: Private Message Button in Member List Loop
shanebpModeratorTry this in your functions.php or bp-custom.php file
April 13, 2013 at 1:47 pm #161535In reply to: No button for private messages
shanebpModeratorPlease provide a username and password so we can login without having to create an account.
Do you have Private Messaging selected on the Components page under Settings -> BuddyPress ?
March 29, 2013 at 5:52 pm #159195In reply to: [Resolved] hide profile from non-logged-in users
alderetekaParticipantHey @Chouf1
Can your code be modified for private messaging? I’m trying to make the private message button on profiles visible when someone is logged out, but redirected to log in/register when a logged out/unregistered user attempts to contact someone. Can anyone point me in a general direction?
Thanks.
February 8, 2013 at 12:10 am #152612danbpfrParticipantyou may found these kind of information in the language pot file
#: bp-messages/bp-messages-template.php:657
msgid “Private Message”#: bp-activity/bp-activity-template.php:2430
msgid “Public Message”etc
February 6, 2013 at 11:58 am #152480Prince Abiola OgundipeParticipantI mean file which says: Mention this user in a new public message, this will send the user a notification to get their attention.
-
AuthorSearch Results