Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private message button'

Viewing 25 results - 1 through 25 (of 232 total)
  • Author
    Search Results
  • GyziieDK
    Participant

    Hello guys!

    I’ve seen this question in here a couple of times and maybe others would enjoy this code.
    I couldn’t find a good solution in trying to “hide” the official and hidden groups, when users are creating them (it just would not allow me to hide them!).

    I then managed to fix a code and make it work so at least it shows an error when a user (besides admin) tries to create a group that is NOT private. In this way when a user tries to create a public/hidden group it will not allow the user to “proceed” with the next step unless private group is chosen.

    Feel free to update the CSS to your liking!

    Hope it helps, enjoy! 🙂

    function restrict_group_type_selection() {
        // Ensure this script only runs during the group settings creation step
        if (bp_is_group_creation_step('group-settings')) {
            // Check if the user is not an admin (wrap the condition outside the script for cleaner HTML output)
            if (!current_user_can('manage_options')) {
                ?>
                <style type="text/css">
                    .group-type-error-message {
    					color: #ffffff;
    					background-color: #f95959;
    					position: relative;
    					margin-top: 20px !important;
    					border: 0 !important;
    					font-weight: 600;
    					}
    				}
                </style>
                <script type="text/javascript">
                    document.addEventListener('DOMContentLoaded', function () {
                        const nextButton = document.getElementById('group-creation-next'); // Target the "Next step" button
                        if (nextButton) {
                            nextButton.addEventListener('click', function (event) {
                                const selectedGroupType = document.querySelector('input[name="group-status"]:checked');
                                let errorContainer = document.getElementById('group-type-error-message');
    
                                // Remove any existing error message
                                if (errorContainer) {
                                    errorContainer.remove();
                                }
    
                                if (!selectedGroupType || selectedGroupType.value !== 'private') {
                                    // Prevent moving to the next step if the group type is not 'private'
                                    event.preventDefault();
    
                                    // Create and display a styled error message
                                    errorContainer = document.createElement('div');
                                    errorContainer.id = 'group-type-error-message';
                                    errorContainer.className = 'group-type-error-message';
                                    errorContainer.innerText = 'You are only allowed to create private groups.';
    
                                    // Insert the error message after the "Next" button
                                    nextButton.parentNode.appendChild(errorContainer);
                                }
                            });
                        }
                    });
                </script>
                <?php
            }
        }
    }
    add_action('bp_after_group_settings_creation_step', 'restrict_group_type_selection');
    #334753
    Lars Henriksen
    Participant

    Hello BP-developers

    Thank you for maintaining and developing Buddypress!

    I have an issue with translating some site messages and labels, i.e. ‘members-only area’ + ‘This community area is accessible to logged-in members only.’ , text in buttons like ‘view group’ and some time stamps like ‘a month ago’

    I use Loco Translate, and I update the strings, but the translations don’t show.

    Here is a link to a group, which redirects to ‘private community’

    WP 6.6.1
    BP 14.0.0

    #332985
    Gomle
    Participant

    I am glad to hear that a v.14 is planned!
    For 10 years I’ve tried to build something with buddypress, but I have never been able to launch a completed project, as I haven’t had the skills to make it as functional as it needed to be.

    I am one of those guys that have used wordpress + various other members plugin + freelancer to make what I want.

    Every community is different – so is the ones I’ve tried to make, and more often than not I haven’t needed 60% of the functionality coming out of the box in buddypress. But there are always something missing, at least for what I wanted to use Buddypress for.

    In version 14 I hope to see more functionality (presented in a clear way for the users) towards user-interacting: Easy to use notification system for 100% of interactions between users.

    All notifications is so, so important – as this is the way to bring members back. “Lila has sent you a message, click here to see”, “You got a new friend request”, “Someone replied to your topic”.. This brings people back, helping to grow the community!

    So: Live popups and emails + bell notifications for:
    Private messages, new bbpress replies / new topics, bbpress mentions, commenting, like buttons, added, follows, friend requests, accepted friend request, rejected friend requests, rating of content, e.g posts, forum posts etc.

    And the entire notification system must be easy to use for both members and the admins!
    Not all admins have coding skills. We just need an easy way to implement a bell in the header, which nicely presents new notifications. Small things like that is what I’ve been looking for.

    And I have often found that 50% of it is working as I hoped, but then the other 50% is just not there. Forcing me to go to Freelancer, and from the developers over there, getting told: “You don’t need such a heavy tool like buddypress to accomplish this. Let me fix it for you just using wordpress and UsersWP”.

    #331697
    Charles
    Participant

    Is it possible to easily make a link (that I can place in a button) that replicates the “Private Message” button that appears at the top of people’s profiles? Hovering on that link includes a nonce, the target nickname and my own user nickname.

    What I’d like is a button that I can place somewhere on the site which lets any user go directly to the compose screen with (specifically) my nickname already inserted in the “Send @username” field.

    So something like https://domain.com/messages/compose/?r=meeeeeee (but working).

    angieb2023
    Participant

    I am missing the buttons seen on this article https://codex.buddypress.org/administrator-guide/messages/

    When I was working on it and trying it out, they popped up once, but I can’t get them to come up again.

    I am using generatepress theme not sure why I would see them once but not again. How do I get those buttons back?

    my website is inspireherpossibilities.com

    I am using Buddypress Legacy.

    #331012
    Philippe Roussel
    Participant

    Hi,

    Indeed, messaging someone “publicly” does not make much sense if everyone and their mother can see the message, not just the specific group of people you intended it to.

    Now, how do you send a private message to several people at once? I guess I have to be “Friend” with each of them. From there is it enough to click on the username of one of them, then on the Private Message button and simply add in the Send @Username field all the other usernames?

    That’s a bit convoluted. Why the Messages/Compose tabs do not offer a Private/Public message option?

    Thanks again for your help.

    #330966
    Philippe Roussel
    Participant

    Hi,

    I am unable to explain in a clear and succinct way to my website’s future members how to send private or public messages and how to do it individually or in bulk (addressing group members, for instance). One reason for my incapacity is that there is a little bit of information everywhere about these topics, which is often contradictory. The other is that the info is generally obsolete; for instance, I have never seen a “Public Message” button or an “Add Friend” one, though this is still given as true in the tutorials. I have looked around a lot, to no avail.

    Can you point me to an up-to-date and thorough tutorial outside of the official BP documentation?

    Thanks for your help,

    Philippe

    #330586

    Topic: Change the buttons

    in group forum Third Party Plugins
    werny
    Participant

    I am using the plugin Block/Suspend/Report users.
    It looks good on desktop but I do not like the secuence in responsive version.

    Screenshot:
    https://www.werny.it/blog/wp-content/uploads/2023/07/IMG_0381.jpeg

    The „Private message button“ moves in a submenu.
    I want this button instead of the „block user“ button and move the other buttons in the submenu.

    Is there any way to do so?

    #328103
    Mathieu Viet
    Moderator

    Hi @fantamily

    Thanks a lot for your feedback. The issue is actually caused by some custom code wrongly using the bp_get_send_message_button_args filter. Instead of returning an empty array to disable the private button on members profile header, this custom code retuns false.

    That being said. We should be more cautious about this potential wrong usage, so we’ll have it fixed asap (next minor version 11.1.0).

    See https://buddypress.trac.wordpress.org/ticket/8800 to follow our progress about it.

    #327158
    werny
    Participant

    I installed the plugin “Block, Suspend, Report for BuddyPress”.
    But I noticed that on smaller screens not all buttons fit underneath the profile pic and so my Theme Gwangi will create a Button “More” with some type of submenu with more options.

    See screenshot:
    Screenshot

    The most imprtant buttons for me are “Add as Friend” and “Private Message”
    The Buttons “Bock user” and “Report User” are not soo important .

    Is there a way to arrange the buttons in some other order?
    I want the “Bock user” and “Report User” buttons in the submenu (More).

    #325971
    werny
    Participant

    Hi there,

    how can I deactivate the “Public message” button on all profile pages?
    I think those 2 buttons are too confusing for the users.
    The “Private message” button is more then enough, I think

    mounasis
    Participant

    Hello i use buddypress with masterstudy theme i activated private message on the buddypress settings but it’s not showing on the profile page
    I need help with this

    joselawrence
    Participant

    Hi, Some help here please.
    I am creating a buddypress community and among other plugins I have the “Buddypress Compliment” and the “Block, Suspend, Report for BuddyPress” plugins active, but these two plugins cause the the “Private Message” button to display last in the user profile header. I want the private message button to display second, right next to the “Add Friend” button and that all other buttons should fall after it.

    Somebody kindly help me with the code needed for this and where to insert it, or if the is another better way to solve this issue I will really be grateful.

    3bsstudio
    Participant

    Wordpress 5.7.2 BuddyPress 7.3.0 Theme: Gwangi

    My site has a search form. When input search fields are matched with a profile, the profile appears on the members results page as it should. Great. However, I want the ability for the person searching to click on the member profile and send them a message (notification) by email.

    When I currently follow the above, when I click on the profile of the member there is no-where on the profile page a facility to send them a message. Am I missing something obvious here?

    BuddyPress doc says: BuddyPress provides ways for you to send a message publicly to another member of the site or network. It also mentions: Private Message button in the member’s header – but I can’t see that.

    It must work that a non-registered person can send a registered person a message. Is this possible?

    Site is: https://myfamilyfinder.co.uk/family-search/

    To test: If you put Brian in the Current Name search field on the above page and click Submit you’ll get Brian’s Profile appear on the members page.

    #317597
    henryaline
    Participant

    Is it possible to delete single messages in a thread in BuddyBoss private messages? If two people have discussed for a long time and one accidentally sends something that is not ment for anyone to read, he has to delete his all sent messages in that thread.

    So, how do I add a ‘delete’ button to a SINGLE private message? Or is this not even possible?

    #317209
    purityboy83
    Participant

    Hi

    I use to wordpress + bbpress + buddypress

    When sending a private message between members, I want to put an image in the body
    Right now the only way is to use the image url link.

    I would like to upload a file using the upload button like a reference image and put it in the body

    Ref img : https://ibb.co/4pvMLDg

    This image is the “Inline Image Upload for BBPress” plugin

    Currently, images are not attached to buddypress’s private messages (inline).

    Is there any possible way?

    Best Regards,
    Hyunho

    #317082
    wybezeyl
    Participant

    Dear Sir/Madam,

    How can we customize the private messages, send by buddypress-users to each other? What we would like to do: Add a question in the message-content, that gives the sender the option if having the receiver to choose from a multiple choice question. (example: Sender asks: what is your favorite football team: Ajax, Barcelona or Juventus? Receiver responds with the name of his/her favorite team.)
    We already know how to send multiple choice options to a receiver. These options are saved in the MySql-database. The receiver gets al list with radiobuttons.
    The problem is that the receiver can check a radiobutton, but his choice is not sent to the original sender, nor is it saved in the database.
    The only thing that is sent back and saved is what you type in the message-reply-box.
    We already added an input textfield where the reciever types his/her choice in. This textfield is under the reply-box. But the content is not saved or sent when you click the reply-button.
    We use WordPress version 5.6.1.
    We use buddypress 7.1.0.
    Our website is 2tango.org/dating
    -Theme: twentytwenty
    The program-file is: bp-custom.php.
    In this file bp-custom we use add_action( ‘bp_after_messages_compose_content’, function() for adding the multiple-choice things when sending a message. This works fine.
    In this file bp-custom we use add_action( ‘bp_after_message_reply_box’, function() for adding the choice of the receiver to the reply-message.
    He or she can type his/her choice in an input-textfield.
    Unfortunately this does not work.
    So only the content of the classic message-reply textarea is sent and saved and not the content of the additional input-textfield.

    Can anyone help us?
    Thanks in advance.

    #315961
    tht1
    Participant

    Hey there!

    I really love your plugin. I really hope everthing will work good and we be able to use it!
    I work now on localhsot.
    my issue now – the send message privately not working. nothing appen after pressing the button

    some things that maybe help for you to know:
    * local host
    * php version – 7.3.5
    * wordpress version – 5.5.3
    * I try to switch theme – astra or buddyx – issue still there.
    * try to work with and without the addon “BuddyBuilder – BuddyPress Builder for Elementor”
    * after pressing the button the link looks good – from the friend I want to send to – the link is coming back to my profile and them
    http://club.local/the members page/my page/messages/compose/?r=heythere
    but there is nothing unser “send message”

    what can help me to solve the problem?
    thank you very much!

    #313320

    Topic: Enable Buttons

    in group forum Requests & Feedback
    Achille
    Participant

    Hello Team!
    I would like to activate the buttons (like – share – private message – public message) on each profile without being logged in and when the user wants to write he will be redirected to the registration or login page. From Forums: #post-16015 http://prntscr.com/twzgtd

    #313066
    kennethykw
    Participant

    I am using the Gwagi theme to make a social website. I am testing on the friendship connection function and found that the add friend button is missing and only have private message button.I have diable the private message function and the button will be disappeared. So I think the buddypress plugin in is functioning.

    Could you have any suggestion for checking the friend connection function?

    I like to provide my web site URL for your investigation:
    http://www.lovedating.love
    user:testing
    password:123456

    Chuck141
    Participant

    Hi,

    I hope everyone is staying safe. Thanks to everyone for posting helpful answers, I have already go so far considering my lack of coding.

    I want to remove “Add Friend” & “Private Message” on profiles ONLY for logged out users. But keep these buttons for logged in users, can this be done?

    Kind Regards, Chuck.

    kitakitune
    Participant

    Hello! Thanks for the great plugins.
    I’m writing this question using a translation software because I’m Japanese and I don’t speak English.
    I’m sorry if it’s hard to read.

    What I want you to help me with is exactly what the title says.
    The private messaging feature, which works in legacy, doesn’t work in Nouveau.

    I first tried the contents of the two URLs below.
    It was 19 months ago, but only because it was so similar to the current situation.
    I’ve removed “https://&#8221; from the URL.

    buddypress.org/support/topic/private-message-button-not-working-right/

    buddypress.trac.wordpress.org/ticket/7908

    But since it didn’t improve, the

    I installed the version of “6.0.0-RC2” on this site to make sure that it was fixed.
    However, the situation did not change.

    I was wondering if it was something I was going through.
    I tried everything I could to stop all other plugins, verify with various themes, change the PHP version, clear the cache, reinstall, etc., but it didn’t improve.

    The Nouveau feature is great, and I’d like to be able to use it somehow.

    Please help me.

    Below.
    buddypress.org/support/topic/when-asking-for-support-2/
    I also wrote a response to the list I found in
    I’m sorry if I’m wrong in my perception.

    1. which version of WordPress are you running?

    Answer: “Version 5.4.1-en.

    2. did you install WordPress as a directory or subdomain installation?
    I did a quick install against the domain on the server.
    If the directory is installed, is it in the root or subdirectory?

    4. Have you upgraded from a previous version of WordPress? If so, from which version?
    One front.

    5. was WordPress working properly before installing/upgrading BuddyPress (BP)? Examples: permalinks, creating a new post, comments.
    It was functioning properly.

    6. What version of BP are you running?
    6.0.0-RC2.

    7.Have you upgraded from a previous version of BP? If so, from which version?
    5.2.

    Are there any plugins other than BuddyPress installed and activated? If so, which one is it?
    BuddyPress is not surprising.

    9.Are you using a standard WordPress theme or a customized theme?
    It’s standard stuff.

    10.Which theme do you use?
    TWENTY SEVENTEEN.

    11. Have you changed the core file in any way?
    No.

    Is there a custom function in bp-custom.php?
    No.

    13. if you’re running bbPress, which version is it? Or do you have bbPress built into your BuddyPress installation?
    No, I’m not using it.
    14.Please provide a list of errors in the server log file: codex.wordpress.org/Debugging_in_WordPress
    Is this it?
    Notice: Trying to access array offset on value of type int in /home/xx/tarianpapa.com/public_html/wp-includes/formatting.php on line 904

    15. Which company offers your hosting?
    //www.xserver.ne.jp/でしょうか
    16.Is the server running Windows, or if it’s Linux…Apache, nginx or something else?
    It’s a server called the X server, I think it’s Windows.
    17. Which BP theme do you use?
    If you mean NOUVEAU or Legacy, then NOUVEAU.
    18. did you overload the BuddyPress template file?
    I don’t think they did.
    19. Are there any other site customizations that you think are relevant to the problem?
    No, sir.

    Basic troubleshooting.

    BP Themes: Is this issue specific to the theme set in Dashboard->Settings->BuddyPRess->Options?
    It only happens in NOUVEAU.
    You can use the private message feature normally in Legacy.

    tuvidigital
    Participant

    Hello, I have a healthcare site in which I would like to make it a “pro” feature for users to be able to colaborators (contributors).

    My default user will be a subscriber
    However I would only like clients and collaborators to be able to message each other (also admins and superadmins ofcourse).

    I saw a simlillar thread about hiding the private message button but it was ID specific, not role specific. I would appreciate specific information as for my request. Also, where should I paste the code? I am not very experienced. Thanks!

    shanebp
    Moderator

    You cannot get roles from just the user id.
    Try:

    function remove_private_message_button( $button ) {
    
    	$user_id = bp_loggedin_user_id();
    	$user = get_userdata( $user_id );
            $user_roles = $user->roles;
    	$allowed_ids = array( 23, 6, 25 );
    
    	if ( !empty( $user_roles ) && is_array( $user_roles ) ) {
    
    		if ( in_array( 'subscriber', $user_roles, true ) ) {
    
    			$button = '';
    			
    		} elseif ( in_array( 'contributor', $user_roles, true ) ) {
    				
    			if ( in_array( $user_id, $allowed_ids, true ) ) {
    				return $button;	
    			}
    
    		} 
    
    	}
    
    	return $button;
    
    }
    add_filter( 'bp_get_send_message_button', 'remove_private_message_button', 1 , 1 );
    honoluluman
    Participant

    Hello,

    I am running a small blog site with mainly 3 roles on it . Subscriber, Contributor, Admin
    I have been trying to remove the private message button under those conditions:

    – Hide message button from any users profile when Subscriber is logged in and viewing.
    – Hide message bytton from all subscribers profile when Contributor & admin is logged in and viewing, BUT allow contributor & admin to view other contributors & admins msg buttons.

    I have tried something like this but didnt work:

    function remove_private_message_button( $button ) {
    $user = bp_loggedin_user_id();
    
        if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
    
    		if ( $role == 'subscriber') {
    			$button = '';
    		}
    	
            else if( $role == 'contributor') {
    				
    		if ( $user == 23 || $user == 6 || $user == 25  ) { // the allowed user ID's, lets say that the contributors & admins are few and i could add them manually by ID's
    	     return $button;}	
    			
    		}
    	}
    
    }
    add_filter( 'bp_get_send_message_button', 'remove_private_message_button', 1 , 1 );

    any ideas would be appriciated

Viewing 25 results - 1 through 25 (of 232 total)
Skip to toolbar