Search Results for 'private message button'
-
AuthorSearch Results
-
March 15, 2014 at 4:57 am #179827
In reply to: Help! button "post update" is not present
Patryk
ParticipantI have the same thing to me and not display private message button, etc
March 5, 2014 at 8:40 pm #179350Doremdou
ParticipantI tried to create a shortcode to show the join/leave button using the buddypress-functions but can’t make it to work… 🙁
What am I doing wrong?I would like a shortcode like this :
[groupbutton name=”party1″]
I tried with this code for a join button only at first:
add_shortcode( 'groupbutton', 'groupbutton_check_shortcode' ); function groupbutton_check_shortcode( $attr ) { extract( shortcode_atts( array( 'name' => 'read' ), $attr ) ); $current_group_id = BP_Groups_Group::get_id_from_slug($name); $group = groups_get_group( array( 'group_id' => $current_group_id ) ); if(bp_loggedin_user_id()) { if( 'public' == $group->status ) { echo '<a id="group-' . esc_attr( $current_group_id ) . '" class="join-group" rel="join" title="' . __( 'Join Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>'; } } }I am not a developer at all so I dont understand everything but I am trying… :/
Cant figure what I am doing wrong… and why it does not display anything at all.Thank you for your help and sorry for my bad english 🙂
PS: I would like to use all cases of buttons like here on the buddypress-functions.php:
function bp_legacy_theme_ajax_joinleave_group() { // Bail if not a POST action if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) return; // Cast gid as integer $group_id = (int) $_POST['gid']; if ( groups_is_user_banned( bp_loggedin_user_id(), $group_id ) ) return; if ( ! $group = groups_get_group( array( 'group_id' => $group_id ) ) ) return; if ( ! groups_is_user_member( bp_loggedin_user_id(), $group->id ) ) { if ( 'public' == $group->status ) { check_ajax_referer( 'groups_join_group' ); if ( ! groups_join_group( $group->id ) ) { _e( 'Error joining group', 'buddypress' ); } else { echo '<a id="group-' . esc_attr( $group->id ) . '" class="leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>'; } } elseif ( 'private' == $group->status ) { // If the user has already been invited, then this is // an Accept Invitation button if ( groups_check_user_has_invite( bp_loggedin_user_id(), $group->id ) ) { check_ajax_referer( 'groups_accept_invite' ); if ( ! groups_accept_invite( bp_loggedin_user_id(), $group->id ) ) { _e( 'Error requesting membership', 'buddypress' ); } else { echo '<a id="group-' . esc_attr( $group->id ) . '" class="leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>'; } // Otherwise, it's a Request Membership button } else { check_ajax_referer( 'groups_request_membership' ); if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) { _e( 'Error requesting membership', 'buddypress' ); } else { echo '<a id="group-' . esc_attr( $group->id ) . '" class="membership-requested" rel="membership-requested" title="' . __( 'Membership Requested', 'buddypress' ) . '" href="' . bp_get_group_permalink( $group ) . '">' . __( 'Membership Requested', 'buddypress' ) . '</a>'; } } } } else { check_ajax_referer( 'groups_leave_group' ); if ( ! groups_leave_group( $group->id ) ) { _e( 'Error leaving group', 'buddypress' ); } elseif ( 'public' == $group->status ) { echo '<a id="group-' . esc_attr( $group->id ) . '" class="join-group" rel="join" title="' . __( 'Join Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>'; } elseif ( 'private' == $group->status ) { echo '<a id="group-' . esc_attr( $group->id ) . '" class="request-membership" rel="join" title="' . __( 'Request Membership', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_send_membership_request' ) . '">' . __( 'Request Membership', 'buddypress' ) . '</a>'; } } exit; } /** * Close and keep closed site wide notices from an admin in the sidebar, via a POST request. * * @return mixed String on error, void on success * @since BuddyPress (1.2) */ function bp_legacy_theme_ajax_close_notice() { // Bail if not a POST action if ( 'POST' !== strtoupper( $_SERVER['REQUEST_METHOD'] ) ) return; if ( ! isset( $_POST['notice_id'] ) ) { echo "-1<div id='message' class='error'><p>" . __( 'There was a problem closing the notice.', 'buddypress' ) . '</p></div>'; } else { $user_id = get_current_user_id(); $notice_ids = bp_get_user_meta( $user_id, 'closed_notices', true ); $notice_ids[] = (int) $_POST['notice_id']; bp_update_user_meta( $user_id, 'closed_notices', $notice_ids ); } exit; }November 10, 2013 at 6:37 pm #174037In reply to: No all-in-one event calendar plug-in for Buddypress?
Marc K.
ParticipantHi Seth!
Interesting, I didn’t know that you had a BP integration in place for EE. With which BP version was it compatible?
I know that the BP core developers have their hands full of work, so I won’t blame them for not taking on a complete events module in the core.
For me the question now is, which plugin takes the least effort to extend on our own. And yes, I know about your crowdfunding like offer to fund extensions to EE. But I need to meet certain deadlines and I don’t think you can guarentee a certain development until then.
BTW, isn’t the “I’ll attend’ and ‘Maybe’ a pretty simple code addition? A user presses a button which captures that users user id and writes it into a custom field of the event page. The plugin then fetches those ids and shows avatars of those people who attend.
I found an interesting tutorial (http://wp.smashingmagazine.com/2012/01/27/limiting-visibility-posts-username/) which might lead the way for my other request, specific event visibility/privacy:
1. Only friends of events creator (again, write all the user ids of the event creator into a custom field thats not visible/accessible to users and then restrict visibility of event page to those users)
2. Only invited (would require more work. First have a way to notify other users of the event by private message or BP notification. Write the user ids of those into yet another custom field, rest see above)
I am pretty much a PHP noob. But are these things really so hard to do? More than a week of work for an experienced BP developer?
November 5, 2013 at 5:16 pm #173863In reply to: Private Message button only appears sometimes
Anonymous User 13302461
InactiveOK I’ll try the workarounds.
Thanks a lot for the feedback.
November 5, 2013 at 4:57 pm #173861In reply to: Private Message button only appears sometimes
Paul Wong-Gibbs
KeymasterHi @welshdemo
The theme’s fine. The problem is actually caused by a bug in our widgets (you’re using the Members list and the “Who’s online?” widgets). We’re tracking the bug here https://buddypress.trac.wordpress.org/ticket/5170 and currently aiming to fix it by the 2.0 release, which is probably 4 months away. If we get a fix before then, we’ll put it into a 1.9.x small release.
A workaround is to make sure that no BuddyPress widgets are rendered before the main content of the page. i.e. try moving the widgets to the right-hand column, or a widget area at the bottom of the page, or just removing the widgets.
November 5, 2013 at 4:52 pm #173859In reply to: Private Message button only appears sometimes
Paul Wong-Gibbs
KeymasterThis was cross-posted to https://wordpress.org/support/topic/private-message-and-button-doesnt-always-appear-empty
October 30, 2013 at 9:11 am #173600In reply to: Private Message button only appears sometimes
Anonymous User 13302461
InactiveAhh yes. seems to appear every time with default template. I will go to the theme support forum and ask there. Thanks.
October 29, 2013 at 7:32 pm #173573In reply to: Private Message button only appears sometimes
shanebp
ModeratorSwitch to the BP default theme or a WP theme like Twenty Thirteen.
Does the problem still exist?
If not, then the problem is in your custom theme.October 29, 2013 at 6:26 pm #173567In reply to: Private Message button only appears sometimes
Amid Dadgar
Participantthere should be 3 buttons (Add Friend,Public Message,private message) but as you said It just appears sometimes and I have a same problem 🙁
October 8, 2013 at 12:17 pm #172471In reply to: Private message users
chur74
ParticipantThank you very much for the reply, and I understand.
On the other hand I have seen that also can send public messages, but I can not display the button to send them, just see the private message when I activate the option.
thank you.
September 30, 2013 at 9:14 pm #172062In reply to: Duplicate Avatars in Activity Stream
Uncle Jimmy
Participant@Shanebp and @mercime [RESOLVED]
The following file was responsible. Comments marked !!!IMPORTANT!!! are where I made changes.
wp-content/plugins/gantry-buddypress/bpt-functions.php
<?php /** * @version 1.3 November 8, 2012 * @author RocketTheme, LLC http://www.rockettheme.com * @copyright Copyright © 2007 - 2012 RocketTheme, LLC * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only */ // Sets up WordPress theme for BuddyPress support. function gantry_bp_tpack_theme_setup() { global $bp, $gantry_bp_path; // Load the default BuddyPress AJAX functions if it isn't explicitly disabled require_once( $gantry_bp_path . '/_inc/ajax.php' ); if ( !is_admin() ) { ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED MEMBER HEADER DUPLICATE BUTTONS Friends/Public Message/Private Message]] ///!!!IMPORTANT!!!/// ///!!!IMPORTANT!!!/// [[ALSO REDUCED QUADRUPAL MESSAGES/COMMENTS/REPLIES TO DUPLICATES]] ///!!!IMPORTANT!!!/// // 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' ) ) { ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED DUPLICATE GROUP BUTTON Join/Leave ]] ///!!!IMPORTANT!!!/// //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', 'gantry_bp_tpack_theme_setup', 11 ); // Enqueues BuddyPress JS and related AJAX functions function gantry_bp_enqueue_scripts() { // Enqueue the global JS - Ajax will not work without it wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), bp_get_version() ); // 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_x_comments' => __( 'Show all %d comments', 'buddypress' ), 'show_all' => __( 'Show all', 'buddypress' ), 'comments' => __( 'comments', 'buddypress' ), 'close' => __( 'Close', 'buddypress' ), 'view' => __( 'View', 'buddypress' ), 'mark_as_fav' => __( 'Favorite', 'buddypress' ), 'remove_fav' => __( 'Remove Favorite', 'buddypress' ), 'unsaved_changes' => __( 'Your profile has unsaved changes. If you leave the page, the changes will be lost.', 'buddypress' ), ); wp_localize_script( 'dtheme-ajax-js', 'BP_DTheme', $params ); // Maybe enqueue comment reply JS if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) ) wp_enqueue_script( 'comment-reply' ); } add_action('wp_enqueue_scripts', 'gantry_bp_enqueue_scripts'); // Enqueues BuddyPress basic styles function gantry_bp_enqueue_styles() { global $gantry_bp_url; // Do not enqueue CSS if it's disabled if (get_option( 'gantry_bp_disable_css' )) return; // BP 1.5+ if ( version_compare( BP_VERSION, '1.3', '>' ) ) { $stylesheet = 'bp.css'; // Bump this when changes are made to bust cache $version = '20110918'; } // Add the wireframe BP page styles wp_enqueue_style( 'bp', $gantry_bp_url . '/' . $stylesheet, array(), $version ); // Enqueue RTL styles for BP 1.5+ if ( version_compare( BP_VERSION, '1.3', '>' ) && is_rtl() ) wp_enqueue_style( 'bp-rtl', $gantry_bp_url . '/' . 'bp-rtl.css', array( 'bp' ), $version ); } add_action('wp_enqueue_scripts', 'gantry_bp_enqueue_styles'); // Gantry BuddyPress plugin doesn't use bp-default's built-in sidebar login block, // so during no access requests, we need to redirect them to wp-login for // authentication. if (!function_exists('gantry_bp_use_wplogin')) { function gantry_bp_use_wplogin() { // returning 2 will automatically use wp-login return 2; } add_filter('bp_no_access_mode', 'gantry_bp_use_wplogin' ); } // Hooks into the 'bp_get_activity_action_pre_meta' action to add secondary activity avatar support function gantry_bp_activity_secondary_avatars( $action, $activity ) { // sanity check - some older versions of BP do not utilize secondary activity avatars if ( function_exists( 'bp_get_activity_secondary_avatar' ) ) : switch ( $activity->component ) { case 'groups' : case 'friends' : // Only insert avatar if one exists if ( $secondary_avatar = bp_get_activity_secondary_avatar() ) { $reverse_content = strrev( $action ); $position = strpos( $reverse_content, 'a<' ); $action = substr_replace( $action, $secondary_avatar, -$position - 2, 0 ); } break; } endif; return $action; } ///!!!IMPORTANT!!!/// COMMENTED OUT BY UNCLEJIMMY [[FIXED DUPLICATE AVTIVITY STREAM AVATARS]] ///!!!IMPORTANT!!!/// ///!!!IMPORTANT!!!/// [[ALSO FIXED DUPLICATE MESSAGES/COMMENTS/REPLIES]] ///!!!IMPORTANT!!!/// //add_filter('bp_get_activity_action_pre_meta', 'gantry_bp_activity_secondary_avatars', 10, 2);Thank you for your time and attention, please let me know if I could’ve done this better.
God Bless
September 22, 2013 at 10:38 pm #171677In reply to: Two installations have failed
Eric J T
ParticipantSorry I didn’t include the code for that. Yes, it is in the wp functions.php file, but it is relevant to bp theme. Here is the full function that line 100 is found in. Line 100 is the third to last, which starts with “add action”.
/** * Sets up theme defaults and registers support for various WordPress and BuddyPress features. * * Note that this function is hooked into the after_setup_theme hook, which runs * before the init hook. The init hook is too late for some features, such as indicating * support post thumbnails. * * To override bp_dtheme_setup() in a child theme, add your own bp_dtheme_setup to your child theme's * functions.php file. * * @global BuddyPress $bp The one true BuddyPress instance * @since BuddyPress (1.5) */ function bp_dtheme_setup() { // Load the AJAX functions for the theme require( get_template_directory() . '/_inc/ajax.php' ); // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); // This theme comes with all the BuddyPress goodies add_theme_support( 'buddypress' ); // This theme uses post thumbnails add_theme_support( 'post-thumbnails' ); // Add default posts and comments RSS feed links to head add_theme_support( 'automatic-feed-links' ); if ( ! is_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { // 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' ) && bp_activity_do_mentions() ) 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 ); // Group buttons if ( bp_is_active( 'groups' ) ) { add_action( 'bp_group_header_actions', 'bp_group_join_button', 5 ); 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_dtheme_setup' ); endif; if ( !function_exists( 'bp_dtheme_enqueue_scripts' ) ) :In the first install the failed bp had been installed and working for a few days. It suddenly gave errors when I edited a css color code on line 1211 in this file and uploaded it to the server by ftp. Yeah, I know you might say I made a mistake, but I know I did it correctly. And they you might say the file got corrupted in transfer, except that the second install on godaddy had no such changes or transfers and in short order – less than an hour of use with no other plugins or style changes – gave the same final error for line 100 when I changed my public name in the buddypress members listing, at which point neither the front nor back ends were accessible.
Looking forward to your insights.
August 25, 2013 at 8:51 pm #170404In reply to: Private Message Button Label Change
funmi omoba
Participantthanks for your reply I thought as much but I think it get wiped during the plugin update.
Thanks for your input anyways.
Best Regards
August 25, 2013 at 8:41 pm #170403In reply to: Private Message Button Label Change
shanebp
ModeratorOpen the plugin file, find the text, replace the text
August 25, 2013 at 7:48 pm #170400In reply to: Private Message Button Label Change
funmi omoba
ParticipantThanks for your snippet which works great with standard buddypress message system but did not work if using BP Profile Message UX plugin, is there anyway to make it work please
https://wordpress.org/plugins/bp-profile-message-ux/
tahnks
August 25, 2013 at 5:00 pm #170392In reply to: Private Message Button Label Change
Henry
Member@shanebp good point about using the bp_send_private_message_link approach. Although you would avoid double buttons by using a translation file.
August 25, 2013 at 4:44 pm #170389In reply to: Private Message Button Label Change
shanebp
Moderator@henrywright-1
And how would you avoid double buttons due to this call in member-header.php?
do_action( ‘bp_member_header_actions’ );
@tayenewm
Use the provided apply_filters:function tweak_button_label ( $args ) { $args[link_text] = 'Something'; return $args; } add_filter( 'bp_get_send_message_button_args', 'tweak_button_label', 1, 1 );August 25, 2013 at 4:28 pm #170387In reply to: Private Message Button Label Change
Henry
Memberactually you could make use of the
bp_send_private_message_linkfunction and do it like this:<a href="<?php bp_send_private_message_link() ?>" title="Private Message">Private Message</a>You can change the “Private Message” text to whatever you like. You’d just paste the code into your theme where ever you’d like the button to appear
August 25, 2013 at 4:20 pm #170386In reply to: Private Message Button Label Change
Henry
MemberYou 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
tayenewm
ParticipantThat 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
Henry
MemberThis 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
GhostPool
ParticipantI 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
GhostPool
ParticipantNobody 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
designweb
Participant@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
-
AuthorSearch Results