Search Results for 'private message button'
-
AuthorSearch Results
-
April 27, 2013 at 10:30 am #162865
In reply to: Private Message Button in Member List Loop
Henry
MemberInterestingly 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
Henry
MemberThanks 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
shanebp
ModeratorStart 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 Cavins
KeymasterHi 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
shanebp
ModeratorApril 15, 2013 at 8:05 pm #161737In reply to: Private Message Button in Member List Loop
funmi omoba
ParticipantYour link is not working anymore
April 15, 2013 at 3:06 pm #161708In reply to: Private Message Button in Member List Loop
shanebp
ModeratorTry 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
shanebp
ModeratorPlease 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
aldereteka
ParticipantHey @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 #152612danbpfr
Participantyou 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 Ogundipe
ParticipantI mean file which says: Mention this user in a new public message, this will send the user a notification to get their attention.
February 6, 2013 at 11:49 am #152479Prince Abiola Ogundipe
ParticipantOk @hnla thanks, I mean where it says :`<a href="” title=””>`
Not the functions. I have checked member-header.php but not there.
what am trying to do is list mention and private message under Add friend button as li .
I know how to do it but dont know where to locate the file anymore.
Regards
February 6, 2013 at 11:24 am #152477Hugo Ashmore
Participantfunctions.php ?
January 24, 2013 at 7:02 pm #151655Aventador
ParticipantOh Sorry, I understand that the link is not used.
So this:
(a) href = “/ news / pmaction newmessage = & to = ” target = “_blank”> send message (a)
January 24, 2013 at 7:00 pm #151654Aventador
ParticipantHallo @talha8877
Excuse me, my English is not so good, unfortunately.
I used the plugin Cartpauj PM Plugin from Mingle, as I have found as yet no viable solution to the buttons (message etc) of the BuddyPress insertion into posts / Articels.
So now I turn off the message part of BuddyPress and linking all the Cartpauj PM, which works wonderfully, except out of BuddyPress. There does not work.
Of Cartpauj in single.php just the link:
<a href = "/ news / pmaction newmessage = & to = “> Send
. put But as I said, the link works in BuddyPress indeed, but does not with the member users, which I will write. Since I’m still looking for a solution. Evtentuell with: bp user id, funktioiert might not.
So who has a solution to integrate Cartpauj PM in buddybress, bring it on.
That´s it
Thank you
January 22, 2013 at 11:37 pm #151518talha8877
ParticipantHi @strangerrj,
How do you generate the /the_messaging_page/ part in php?@chouf1,
I used it just like that inside the template but it didn’t return anything. But if I only use an action hook like
`add_action( ‘the_content’, ‘bp_add_friend_button’, 5 );`
Then the same button appears in all the posts. First I thought this worked but when I clicked the button all the buttons in all the posts became ‘cancel friendship request’January 21, 2013 at 1:57 pm #151299Aventador
ParticipantHello, I received the solution from houseofstrauss: https://wordpress.org/support/topic/get-the-user-id-for-pm-plugin?replies=2
Thanx @houseofstrauss
Is it also possible to integrate in buddypress the member header? The link work, but he does not detect the user from buddypress, the user I want to mail.
And is it possible in the same window e.g. in Thickbox to open Colorbox or Lightbox?
this link is:
a href=”the_messaging_page/?pmaction=newmessage&to=<?php the_author_ID(); PM me
the_author_ID is not correctly for Buddypress.
Thanx Greetings R.
January 20, 2013 at 4:51 am #151192myladeybugg
ParticipantLooking to do something similar, but I’m using the buddypress follow me plugin. I would like to display the “follow” button on my childsite’s sidebar.
January 20, 2013 at 1:57 am #151177danbpfr
ParticipantBy default, add as friend works only on the profile template or on the member template. So if you want to add this button into a post or in the post meta, it won’t work, i believe.
You should call the good template part first and probably need to add the appropriate action hook, yes.Did you use the statement if ( bp_is_active( ‘friends’ ) ) before `bp_add_friend_button ?
`January 20, 2013 at 1:25 am #151175talha8877
ParticipantHi Chouf,
Thanks for the response. Although I’m having hard time connecting the dots.
I’d already used
`bp_add_friend_button( $user_ids[‘users’][$i]->id ) ?>`directly in my code but it didn’t return any results.
Do I need to use an action hook to display it in posts?January 20, 2013 at 12:02 am #151165danbpfr
Participanthi @talha8877,
i think the answer is in bp-friends/bp-friends-templatetags.php:145
https://codex.buddypress.org/developer/developer-docs/action-reference/friends/
January 19, 2013 at 10:40 pm #151159talha8877
ParticipantHi!
I’m wondering if anybody figured out how to add a template tag for Add Friend button?
Cheers
January 15, 2013 at 1:17 pm #150690Aventador
ParticipantHello Henry, my Englisch is not so good. Sorry.
I do have 2 Problems, maybe you can help me: 1. send private message and 2. send public message doesn’t work but not like on the buddypress page itself. If for example click the private message, the message page opens without the address User name field, but it appears only an mempty field. Where is the mistake? And this could be handled and dissolve in an jquery colorbox or fancybox manner?
Thanks R.
November 23, 2012 at 10:25 pm #145559Brajesh Singh
ParticipantThere was a bug with bp-default theme shipped with bp 1.6+ and any theme which is based on bp-default or copies functions from it has the same bug.
Here is a way to fix that.
First look for this code(or similar) in your themes functions.php
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', 5 ); // Activity button if ( bp_is_active( 'activity' ) ) add_action( 'bp_member_header_actions', 'bp_send_public_message_button', 20 ); // Messages button if ( bp_is_active( 'messages' ) ) add_action( 'bp_member_header_actions', 'bp_send_private_message_button', 20 );and change this line
if(!is_admin()){to this
if ( !is_admin()||(is_admin()&&defined('DOING_AJAX')) ) {and it will work.
-
AuthorSearch Results