Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private message button'

Viewing 25 results - 76 through 100 (of 219 total)
  • Author
    Search Results
  • Raphael.v
    Participant

    Thank you @danbp, this work ! I’m pretty sure this will help a lot (and not only me).

    I’am asking something more : can this be adapt to allow only some user role to use private message ? (and not only some users ?) As the second part of the code you wrote, it remove the button to susbscriber.

    (I’m learning PHP, I’ve tried to change the code but did not succeed to have it work…)

    danbp
    Participant

    Hi,

    try this (goes to bp-custom.php)

    function bpex_remove_private_message_button( $button ) {
    $user = bp_loggedin_user_id();
    
        if ( $user == '4' || $user == '7' || $user == '25'  ) { // the allowed user ID's
    	 return $button;
    	}
    
    	if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
    
    		if ( $role == 'subscriber') {
    			$button = '';
    		}
    	}
    }
    add_filter( 'bp_get_send_message_button', 'bpex_remove_private_message_button', 1 , 1 );

    No idea how to get specifically a pmpro defined user ID – you have to check their doc to adjust the above snippet. Note that it works on a standart install – without pmpro.

    #259414
    danbp
    Participant

    Hi @koded1999,

    please, use the <code> button to insert snippets. Also avoid double posting.
    Closing this topic as duplicate.
    Conversation goes ahead here:

    Disable or Hide Private Message Button

    #259413
    koded1999
    Participant

    @henrywright i managed to fix that and is working perfectly.

    but i have another problem.

    i will like to populate the subject automatically when user click the private message button from post

    pls how can i achieve this.

    thank you

    #259410
    koded1999
    Participant

    @henrywright Please i will like to add private message button in post side bar. i used the code below it works but doesnt populate the author automatically. how can i fix this thanks in advance.

    function bpfr_message_shortcode() {	
    $author = get_the_author();
    $message = 'Login to contact advertiser!';
    
    if( is_user_logged_in() ) {
    	return '<a>MESSAGE ADVERTISER</a>';
     } else {
        return $message;
     }
    } 
    add_shortcode( 'ksam', 'bpfr_message_shortcode' );
    BexxBl
    Participant

    I have this very specific problem I need to solve. The thing is I have this BuddyPress-Setup that is linked to my WP and WC Vendors. What I’m trying to achive is a sidebar/seller info tab displaying the BuddyPress-Profil informations from the Vendor. Something like this when the User is logged in:

    • Profile name (BuddyPress/WP)
    • Storename (from WC Vendors)
    • phone number
    • email-address
    • Button to send Private Message to Seller

    If the User is not logged in there should be a Button with the meassgae to please login. I already know how to do that button.
    I already linked my BuddyPress Profile with the WC Vendors store. So that the “Visit-Store”-Button is displayed on the BuddyPress profile of my Users (from knowledge Base of WC Vendors)

    How is the best way to approche this problem?

    I’m not looking for a fullywritten out solution just some suggestions where to start.

    I’m running the current versions of WP, BuddyPress, WooCommerce and WC Vendors(free) with the Socialize Theme. Also posted the question on the WC Vendors Support Site.

    Thank you for your help.

    #258281
    danbp
    Participant

    Hi,

    you can try to remove the private message button from the template or hide it with CSS.
    And add a custom one who leads to admin inbox.

    The link should look like
    http://your-site.com/members/YOU/messages/compose/?r=THE ADMIN&_wpnonce=an_alpha_numeric_value

    See here how you may code this

    Codex and Forum are your friends to search about template customization.

    #258149
    danbp
    Participant

    You’re welcome. 😉
    In case of, here’s another trick.

    #258094

    In reply to: New Privacy Plugin

    danbp
    Participant

    hi @fencer04,

    thank for sharing your work. Well done, but it needs some revision (sorry).
    At his activation on 2 test sites (one with 4.5.3/bp 2.6.1, other 4.6/bp2.6.2) i got a notice.
    Array to string conversion in buddypress/bp-core/classes/class-bp-core-nav.php on line 279from

    sbpp04_privacy_check( )	..\plugin.php:525
    sbpp04_privacy_redirect( )	..\buddypress-profile-privacy.php:176
    bp_core_remove_nav_item( )	..\buddypress-profile-privacy.php:184
    BP_Core_Nav->delete_nav( )	..\bp-core-buddybar.php:798

    Another point concerning UI/UX is the Private button appearing on buddybar.
    On this tab, a default message says Friends Only.
    USERNAME has chosen to limit profile access to friends only.
    That’s wrong! Because this appear on each profile, even if the owner hasn’t setup anything about his profile privacy.

    So far i understand its fonctionality, this plugin let each member decide to show or not his whole profile page to friends or members only or to everyone (bp default).

    – imo this tab should show “This profile is private” to anybody who is concerned by a privacy setting and should not appear at all if “Everyone” is set.
    – the original BP Add as friend button on profile header or members directory is still there. This means that there is no need to go on Private tab to ask forfriendship.
    This is a little confusing !

    If the plugin is to extend profile settings, it should appear in profile settings only. And as it doesn’t superseed BP, there is no real reason to give him an extra tab on buddybar outside of the settings scope. A template notice could be enough to tell visitors what’s going on on such a profile.

    Just my 2 cents.

    danbp
    Participant

    Try this:

    function mohammad_remove_private_message_button( $button ) {
    $user_id = bp_loggedin_user_id();
    
        if ( $user_id == '37' ) // the user ID
    	$button = '';
    
         return $button;
    }
    add_filter( 'bp_get_send_message_button', 'mohammad_remove_private_message_button', 1 , 1 );

    More details here:

    [Resolved] how hide tab only for user? not remove/disable

    johnrobertsonsquid
    Participant

    Hi,

    I have the BuddyPress 2.6.1.1 and Buddyblock from Philopress v1.6. I wanted to remove the private message and block button on the members directory so that I would only see the Add Friend button.

    I’ve seen this on the template <?php do_action( 'bp_directory_members_actions' ); ?> However, it does remove all of the actions. I only need the Add Friend Button to appear on the members directory can anyone help me please?

    Thank you.

    danbp
    Participant

    I tested your code and got first a page not found error while trying to send a private message from the new position.
    I deactivated both action hook in cover and home files.
    Disallowed cover image option. And tested again and everithing worked.
    Allowed cover image and worked also.

    So i confirm that your code works and all buttons show up (with active href’s), at least with Twenty Sixteen theme, at the members profile page bottom.

    In resume, the only thing you have to do is to deactivate the original action hook in both files (so you can allow/disallow cover images).

    Forgot to mention that there is a litle error in your code line 133
    <?= wpautop(xprofile_get_field_data("About me", bp_displayed_user_id() ) ); ?>

    Should be
    <?php wpautop(xprofile_get_field_data("About me", bp_displayed_user_id() ) ); ?>

    marcelo2605
    Participant

    I made some changes on BuddyPress theme and now private and public message buttons appears when current user saw his Friends tab.

    I removed this line: do_action( 'bp_member_header_actions' ); from cover-image-header.php file and now the messages buttons appears in user current Friend’s tab, with no href value.

    shanebp
    Moderator

    Re private message button, try:

    function masoud_remove_private_message_button( $button ) {
    
         if ( ! is_super_admin() )
    	$button = '';
    
         return $button;
    }
    add_filter( 'bp_get_send_message_button', 'masoud_remove_private_message_button', 1 , 1 );
    Masoud
    Participant

    @danbp
    first of all i have to thank you for your quick answer and great support.
    i am very satisfied with the support of this plugin. you guys are great.
    thank you very much.
    —-
    1 & 2 ) the function worked great, but the “private message” button in profile still remains!
    i mean if a user can not send message so there is no need to show them that button.
    is it possible to show that button only to admins too?

    3)
    oh no no. i didnt mean WP DASHBOARD.
    i dont want users to be able to change their email account on their own, after sign-up(bp sing up form), unless they contact admin of site, and request the change of email.
    the option of changing email account is in
    Setting Tab > General Tab
    there is a place for them to write their new email and …
    i want to hide and disable it for normal users and available only for admin.
    look at this picture please.
    the red area.

    #253918
    semperaye
    Participant

    * correction. The last active IS showing for admin, I just didn’t see it because it’s inside the “cover image.” This happens when a user is logged into buddy press and views their own profile, this is because in that instance, the “cancel friendship,” and “private message” buttons do not show up.

    mario83s
    Participant

    I need to output “Send Private Message” button on a custom profile page.
    I’ve managed to add “Add Friend” button but this one is bugging me.

    So far, I’ve managed to output only a link which actually works, but the problem is when I click on it, I need to type manually a user name to send message to.

    I was hoping to get the functionality that when I click “Send Message”, the recipient is auto populated. Just like it’s on original buddypress profile page.

    So far, I used this code..

    if ( is_user_logged_in() ) echo '<a href="' . wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . get_the_author_meta('user_login') ) . '" title="Send a private message to this user" class="send-message">Private Message</a>';

    #253276
    jameshh93
    Participant

    Okay I managed to create a add friend button using some code found on this website.. but im still a little stuck on creating a send private message button? any help would be great! thank you!

    jameshh93
    Participant

    Hello does anyone know how to display links on wordpress post pages for the author of the posts buddypress profile link, send the author a private message and add friend with an if statement to check that the user isnt the author and if so echo nothing?

    Would be extremely helpful!

    Thank you!

    jawynan1
    Participant

    WordPress Version 4.4.3
    BuddPress Version 2.4.3

    link – http://dev.inclusivetech.net/hammydowns/
    Although you need to be logged in to see the button on the listings page.

    Ok so obviously I have researched this matter on these forums before and have found useful
    advice that i have used to make the button work. The one issue I am having trouble with
    is pre-filling the messages subject field with the title of the item they wish to
    message the user about.
    The link works well and the user(Send To) field that the message is being sent to is correctly filled in after clicking on the button to message that person, similar to visiting a members profile page and then clicking private message.

    I created the bp-custom.php file to achieve putting the link on the listings page. The code in there is as follows:

    function bp_custom_get_send_private_message_link($to_id,$subject=false,$message=false) {
    
    //if user is not logged, do not prepare the link
    if ( !is_user_logged_in() )
    return false;
    
    $compose_url=bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?';
    if($to_id)
    $compose_url.=('r=' . bp_core_get_username( $to_id ));
    if($subject) 
    $compose_url.=('&subject='.$subject);
    /*if($message)
    $compose_url.=("&content=".$message);*/
    
    return wp_nonce_url( $compose_url ) ;
    }
    
    //for auto populating message content
    add_filter(‘bp_get_messages_content_value’,’bp_custom_message_content_value’);
    function bp_custom_message_content_value($content){
    
    if(!empty ($content))
    return $content;
    $content=$_REQUEST[‘content’];
    
    return $content;
    }
    

    Again this works well but for some reason this line of code does not seem to be effecting my messages
    subject field at all. $compose_url.=('&subject='.$subject);

    I am calling the function correctly and the resulting http address is http://dev.inclusivetech.net/hammydowns/members/admin/messages/compose/?r=tvolmari&subject=Leather+Wallet&_wpnonce=181a9404ae
    so I can see the subject title is being passed but it won’t populate my messages subject field.

    Does anyone have any possible advice on how to solve this??? Or maybe a least a new direction
    I should start to look at to figure it out? I’m starting to run out of idea’s.. haha

    Any help would be appreciated thx 🙂

    #253053
    shanebp
    Moderator

    I agree that there should be some indication or disabling when the button is clicked.

    You can open an enhancement ticket here – use the same user & pw you use for these forums.

    There is a plugin that will disable the button when sending public and private messages.

    You can get it here:
    https://wordpress.org/plugins/bp-profile-message-ux/

    Or here:
    http://www.philopress.com/products/buddymessageux-free/

    #253045
    plumwd
    Participant

    I am running WP 4.5 with up to date BuddyPress with Private Message enabled. I have noticed that when replying to a message, the send button doesn’t change, nor is there any indication that the message is actually being sent. This often results in double messages since the users are hitting “send reply” multiple times.

    I have tested this with 2016 and the same thing occurs. Any way to notify the user that their message is being sent before it loads on the screen?

    bradleyrf
    Participant

    Hey everyone,
    First of all, thanks so much for the work and effort you put into BP. It’s amazing what you all do.

    I recently updated to the latest BP and WP versions (the details you requested are below).

    Issues #1 – when someone initially posts into a group, not a reply to a comment, users who have requested All Email option from the BP Group Email Subscription Plugin receive an email using that BP Group Email Subscription plugin’s email template vs. the new BP email templates. If someone replies to the comment, then the new BP email templates work perfectly.

    Issue #2 – the email mentioned in #1 is from wordpress@mydomain.org. while the others are sent from mysite@mydomain.com.

    Thanks for any advice you can send my way.

    1. Which version of WordPress are you running? 4.4.2

    2. Did you install WordPress as a directory or subdomain install? subdomain

    3. If a directory install, is it in root or in a subdirectory?

    4. Did you upgrade from a previous version of WordPress? If so, from which version? From 4.3.3

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? Yes

    6. Which version of BP are you running? 2.5.2

    7. Did you upgraded from a previous version of BP? If so, from which version? 2.4.2

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?

    Advanced Cron Manager
    Automessage
    Black Studio TinyMCE Widget
    BP Group Hierarchy
    BP Profile Search
    Broken Link Checker
    BuddyBoss Wall
    BuddyDrive
    BuddyPress
    BuddyPress Activity Plus
    BuddyPress Global Search
    BuddyPress Group Email Subscription 3.6.0
    Select BuddyPress Groups Extras
    Select BuddyPress Members Import
    Select BuddyPress Message Attachment
    Select CCL Salesforce Connector
    Contact Form
    Easy Google Fonts
    Events +
    Google Analytics by Yoast
    Google Doc Embedder
    Google Maps
    HiFi
    iframe
    Invite Anyone
    Page Builder by SiteOrigin
    PHP Code Widget
    PHP Snippets
    PopUp Pro
    Deactivate
    Post Tags and Categories for Pages
    Deactivate
    Private Community For BP Lite
    Redirection
    Search shortcode
    Shortcodes Ultimate
    Simple Follow Me Social Buttons Widget
    Simple:Press
    UberMenu 2 – WordPress Mega Menu Plugin
    User Role Editor
    Wordfence Security
    WordPress HTTPS
    WP-FormAssembly
    WPMU DEV Dashboard

    9. Are you using the standard WordPress theme or customized theme? BuddyBoss

    10. Have you modified the core files in any way? Nope

    11. Do you have any custom functions in bp-custom.php? Yes

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in? Not running

    13. Please provide a list of any errors in your server’s log files. None

    14. Which company provides your hosting? BlueHost

    15. Is your server running Windows, or if Linux; Apache, nginx or something else? Apache

    bradleyfried
    Participant

    Okay, that worked! Now I can see all my WP members on the BP Members page.

    The functionality for some users still appears to be limited, however.

    – no friend request button on the other members in the list.
    – no private message button on the other members in the list.
    – no ability to join groups.
    – no access to activity stream.

    etc.

    -Brad

    #251680
    shanebp
    Moderator

    afaik, there are no plugins.
    But it’s a simple filter.
    https://buddypress.org/support/topic/disable-or-hide-private-message-button/

Viewing 25 results - 76 through 100 (of 219 total)
Skip to toolbar