Hi @klubnika74
BuddyPress doesn’t allow a user to email another user directly.
You may be mixing this up with the email notification messages, that BuddyPress sends out.
By “send a copy of private message between users”, are you specifically referring to the Private Messages feature within BuddyPress?
I have that installed already and that works fine on the Buddypress site itself.
What I am looking for is a button on an external site that links directly to a users private profiel to post the the article on their activity time line.
@avaiya,
you do not have to be friends to send a private message.
Choose – Messages – Compose and Send To (Username or Friend’s Name)
One more piece of the puzzle that I don’t understand is that I was able to resolve this issue when trouble shooting it on my local host, using an exact copy of my website’s files. So there is something interfering with the registration process only when connected to the internet. I wish I could give out my website details here but there is no private reply option.
Thank you again for your time.
Take care,
Kari
Not to be a pest, but would you happen to know how to change the color of the meta description areas where it says how many group members there are, whether it’s public or private, and what you’re viewing? Thank you.
I am using WP Mail SMTP to get the mail to send without issues. But it seems to affect this particular email only, I am getting everything else as far as I am aware.
Here are my current active plugins – There is quite a long list.
I do use Autoptimize, so not sure if it’s affecting anything.
One of note, is Social Login, which when logging directs to their site, and redirects back to my site to log the user in via their social network, this is where it falls over and does not send this one email. It manages to send other emails related to the login, but it now gives me an idea to look into the code that sends this social email sign up notification.
(BuddyDev) BP Auto Login on Activation (1.0.3)
Advanced Custom Fields (4.4.11)
Allow Multiple Accounts (3.0.4)
Autoptimize (2.2.2)
BP Profile Message UX Free (1.5)
BP xProfile Location (1.2)
BP XProfile WordPress User Sync (0.6.4)
BuddyDev Username Availability Checker (1.1.1)
BuddyExtender (1.0.1)
BuddyPress (2.7.4)
BuddyPress Member Type Generator (1.0.3)
BuddyPress Security Check (2.1.2)
BuddyPress Simple Terms And Conditions (1.3)
BuddyPress Xprofile Custom Fields Type (2.6.3)
BuddyPress Xprofile Member Type Field (1.0.4)
BuddyPress XProfile Validate with RegEx (0.1.2)
Cherry Parallax Plugin (1.1.0)
Cherry Plugin (1.2.8.1)
Child Theme Configurator (2.1.2)
Conditional Profile Fields for BuddyPress (1.1.9)
Contact Form 7 (4.6)
Contact Form 7 – Dynamic Text Extension (2.0.1)
Contact Form 7 Conditional Fields (1.0)
Contact Form 7 Get and Show Parameter from URL (0.9.7)
Contact Form 7 Honeypot (1.10)
Contact Form 7 Modules: Hidden Fields (2.0)
Contact Form 7 Shortcode Enabler (1.1)
Custom Hooks (1.0)
Custom Post Template By Templatic (1.0)
Custom Post Type UI (1.4.3)
Disable Comments (1.6)
Display Posts Shortcode (2.7.0)
FacetWP (2.7.4)
FacetWP – Map (1.0.5)
Flamingo (1.5)
GeoIP Detection (2.7.0)
GEO my WP (2.7)
Google Analytics Dashboard for WP (4.9.6.2)
List Plugins (1.4.4)
Meta Slider (3.4)
Optimize Database after Deleting Revisions (4.2.1)
Page-list (5.1)
PHP Compatibility Checker (1.4.0)
Popup Maker (1.4.20)
Shortcodes in Menus (3.2)
Social Login (5.2)
Stream (3.2.0)
String Locator (2.2.0)
Sucuri Security – Auditing, Malware Scanner and Hardening (1.8.3)
SuitePlugins – Advanced XProfile Fields for BuddyPress (1.0.3)
Theme Check (20160523.1)
Visual Builder for Contact Form 7 (2.0)
WPFront User Role Editor (2.13)
WP Mail SMTP (0.11.1)
WP Private Content Plus (1.13.1)
WP Smush (2.6.1)
Yoast SEO (4.3)
Ah, interesting.
1. If you’ve got access (through the mysql command line tool, or through PHPMyAdmin, check the character set and collation https://makandracards.com/makandra/2531-show-the-character-set-and-the-collation-of-your-mysql-tables There may be something funny going on there.
2. Do you have the same problem with other content? Can you post a private message with a special character in the subject line? A blog post with a special character in the title?
These items will help narrow down whether it’s a problem with bp-groups, or a database-level config issue.
BuddyPress’s Register page is a special kind of page that cannot be edited via the Dashboard. That’s why it’s blank when you view it in the normal way.
To add additional fields to the registration process, go to Dashboard > Users > Profile Fields. Add one for Address and one for Phone Number. Make them required and/or private, if you’d like. As long as they are part of the ‘Base’ profile field group, they will appear as part of the registration process.
Thanks. I’ve just installed the combination of rename-wp-login and lh-private-buddypress, and I’m unable to reproduce the problem – after logging in, I’m being redirected to the originally-requested page. It may still be worth a test on your end; if temporarily disabling rename-wp-login fixes the problem, it would at least narrow down what’s going on.
If it were my site, the next thing I’d do is to debug the redirection chain, but I’m unsure how familiar/comfortable you are with debugging PHP functions. Try adding the following settings to your wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );
After a few pageloads, WP should have created a file at wp-content/debug.log. Once you’ve confirmed this, drop the following into a bp-custom.php file, and then run through the login redirect process. It’ll dump some info into your debug.log file, which we can use for further debugging.
add_filter( 'wp_redirect', function( $redirect ) {
error_log( print_r( debug_backtrace(), true ) );
return $redirect;
} );
If you don’t see anything in your cookies, then that’s the source of the problem. BP uses cookies to indicate that you’re moving through the group creation process, and if it doesn’t see these cookies, it sends you back to the first step.
So, the question is why those cookies aren’t being set. Things to look at:
1. I assume that at least some cookies are being set on your site, or you wouldn’t be able to log in 🙂 Are other BP-related cookies working? For example, if you go to the group directory and change the “Order by” dropdown to, say, “Newly Created”, is a browser cookie created bp-groups-scope? A quick test is to do a hard-refresh of the groups directory, and see if your selection sticks.
2. If other cookies are being set, it could be a path-related issue. Have you set a custom COOKIEPATH in your wp-config.php file? It could be that cookies are being set in such a way that they’re inaccessible to certain pages of the group creation process.
3. Have you tried in other browsers? Or in private browsing windows? It could be that this is being triggered by privacy settings of one sort or anotheer.
4. You showed some WP_DEBUG errors that (as you surmise) are unrelated to the problem. Are those shown when you first visit the group creation page, or *after* you’ve submitted the first step? It’s the submission process I’m concerned about, since the groups aren’t being created in the first place.
LH Private BP works, I don’t know if you understood the problem I am having. This is my problem, after login the page just refreshes, but the user has already been logged in, then he can browse the site as a logged in member. But might be under the impression that he has not logged in because it didn’t take him to where he was about to go before he was requested to login.
Logged out user Before login, going to a group named ‘the blog coach’ he clicks on the link sent by a friend example.com/groups/the-blog-coach
he gets redirected to
https://www.example.com/login/?redirect_to=%2Fgroups%2Fthe-blog-coach%2F
Link after logging in still directed to
https://www.example.com/login/?redirect_to=%2Fgroups%2Fthe-blog-coach%2F
the page just refreshes no direction. i copied the links uniquely before and after login.
Before you respond to this, please try to make me understand how far you have understood me and my problem so far? Thanks so far
Hi @plumbingsuperstore – Oof, sorry to hear about the problems, but glad your hosting provider had a way to roll back.
BuddyPress doesn’t touch user credentials, so it’s highly unlikely that BuddyPress itself would be the cause of your admin creds not working after BP was installed. I’m guessing that either there’s some user error here, or there’s another plugin interfering with the process. To reiterate, logging into WP should be exactly the same before or after the activation of BP.
Regarding the 404 error when activating your account: When you install BuddyPress, it should create pages called Register and Activate. It sounds like this worked for Register (since you were able to register a new account), but didn’t for Activate. If you try this again, take careful note of the URLs you see in your browser when registering, the URL that appears in the activation email, and the URL you see in the browser after clicking the activation link. There could be a clue here.
One final tip: You can stay logged in as an admin in your browser and still test as another user. Open a private browsing window: Firefox https://support.mozilla.org/en-US/kb/private-browsing-use-firefox-without-history, Chrome https://support.google.com/chrome/answer/95464?co=GENIE.Platform%3DDesktop&hl=en, Safari https://www.macworld.com/article/1133941/software-web/safariprivate.html
It looks, at a glance, like the LH Private BuddyPress plugin ought to be doing what you’re asking for. https://plugins.trac.wordpress.org/browser/lh-private-buddypress/trunk/lh-private-buddypress.php#L101
If it’s not working, it’s either because of an error in the plugin logic, or because something on your server or WP setup is interfering with the redirect_to parameter.
Can you share the format of the URL at various points of the process? For example, when visiting example.com/groups/my-private-group as a logged-out user, you should be redirected to:
example.com/wp-login.php?redirect_to=/groups/my-private-group
If, after login, you’re being redirected back to wp-login.php, what is the format of the URL then?
What is the URL format of your BP/WP installation? Are you installed at the top level of a domain example.com or in a subdirectory example.com/buddypress/?
Hi @aubreyw – The email should show up immediately. If it’s not, the places you should check are:
1. Is any email being sent from your server? For example, do BP emails (like private message notifications) show up? How about other WP notifications, like a password reset?
2. Check your spam folders (which it sounds like you’ve already done)
It’s possible to manually trigger the activation of a changed email address, but it sounds like the more fundamental problem here is that emails aren’t working properly, so it seems better to try to address that problem first.
FIXED PARTIALLY. I was using BP Redirect To Profile so I disabled it, the contents are still private and it doesn’t keep redirecting.
But the problem I am having is that after login it will just refresh the login page without directing to anywhere. Some people won’t know that they have been logged in already. That is why I used to Redirect Plugin initially so that it can direct to somewhere.
So asking the masters, how can the login direct to where they left off? For instance, sent a logged out user a group link, and his tries to visit the groups and login page appears, how can he continue straight to the group after login?
I mean when I send private message to my members, the message shows notification to everyone who visits my site. Please visit my website now so you can see it http://www.friendlygooners.com
Hello,
I am new to Buddypress and this is my first post, I am new to web development also, and my PhP coding is not all that great, my years as a software developer was strictly in a windows environment (vb.net and sql)
I developed my own website and I am using Buddypress as part of my social media for users to connect with each other.
I have spent endless hours researching a fix, and I have not been able to find anything php file that I can edit in File Manager to edit or remove the line of code.
When a user updates an Activity, it updates in three places:
1. The Activity Stream (which is what I want)
2. The Member’s Profile where the Activity tab was (now removed, which is what I want)
3. Under the Member’s profile cover, with that pesky “view link” (which I DO NOT want to show)
And the “view link” is a bit buggy also, sometimes when a user clicks on it, it throws a 404 error, sometimes it opens up a blank page, and sometimes it opens up the recent activity that they posted in the Activity Stream.
Also in the members directory I have a button to send the user a private message whether or not they are friends.
When I click on a user name from the member’s directory, it take me to the compose a message like it is suppose to do, and the user name appears , but it does not save the user name in the send to box, do you have a fix for this also?
Thank you very much, a fix to these problems are greatly appreciated.
Naomi
@louisarthur – Thanks for sending me credentials. I’ve logged into your site to have a look.
As you note in your email, there’s no href attribute on these links. It’s not clear to me how this would be the case, but I can give you a starting point for looking into it yourself. Briefly, the buttons will be built without an href if the button constructing function passes an empty link_href parameter to the BP_Button class. The functions used in the two cases are different:
Message public: https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-activity/bp-activity-template.php?marks=3090#L3079
Message privé: https://buddypress.trac.wordpress.org/browser/tags/2.9.2/src/bp-messages/bp-messages-template.php?marks=1362#L1360
The logic in each case is different, but since neither is showing up, I’m guessing that one of two things is happening:
1. One of the conditional checks shared between them is failing for some reason: bp_is_my_profile(), is_user_logged_in().
2. Something on your installation – perhaps your theme but probably a plugin (since you said Twenty Seventeen was exhibiting the problem as well) – is filtering both ‘bp_get_send_private_message_link’ and ‘bp_get_send_public_message_link’, and then incorrect returning empty strings.
To test idea #2, you might try – if you can – searching through your codebase for those filter names.
Hi @paksunny-
#1 can be accomplished by adding this code to you bp-custom.php file (or wherever you keep your customizations): https://gist.github.com/dcavins/c65f3856dd6ed5be37eef115ab09405a
#2 Try this plugin: https://wordpress.org/plugins/buddypress-private-message-for-friends-only/
-David
Next time try hiring an expert or consult a more experienced developer in private to sort out some issues.
Without being told the people that started this Buddypress has tried a lot. I don’t think they need this sort of discouragement.
please nobody should regard this topic.
I’m confused about what you’re trying to do, but if you want to restrict access to forums, then, yes, private groups are an excellent option. First, create a forum in wp-admin, then create a private group. Then, in the group management tab, check the box “Yes, I want this group to have a forum” and select the forum you just created.
Then, only users who belong to private group will be able to use that forum.
Did you find a solution to recover the activity stream? My private group activity stream is no longer showing past activity even though the activity is still in the database.
Okey, here is the correct code, thanks to @brajesh
// Adding message button in members directory
function filter_message_button_link( $link ) {
$link = wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r='. bp_core_get_username( bp_get_member_user_id() ) );
return $link;
}
function display_private_message_button() {
if( is_user_logged_in() && bp_get_member_user_id() != bp_loggedin_user_id() ) {
//bp_send_message_button();
?>
<div id="send-private-message" class="generic-button">
<div class="private-message-button generic-button" ><a href="<?php echo filter_message_button_link(); ?>" class="button small secondary radius" rel="add"><i class="icon-envelope"></i></a></div>
</div>
<?php
add_filter('bp_get_send_private_message_link', 'filter_message_button_link', 1, 1 );
}
}
add_action( 'bp_directory_members_item_last', 'display_private_message_button',9999 );
I’m trying to set up a membership site and may go with WooCommerce Membership. But I have a hard time finding a way to solve a problem.
When a member’s membership (via WooCommerce Membership) is cancelled, his Buddypress WordPress user account is still active, which means he can still log in and freely contact other members. i need to find a way to restrict these cancelled members from accessing BP entirely, or at least from Private Message so they can’t contact other members.
So far the closest one i found is this thread
https://buddypress.org/support/topic/hiderestrict-access-to-private-messaging/#post-170393
According to the note, USER_TO_DISALLOW would be my cancelled WooCommerce users. But I wouldn’t know which member would cancel (or their membership level) upfront so this codes don’t seem to work for my site. Besides, it’s 4+ years old and I’m not sure if it’s still relevant.
The other one is
https://buddypress.org/support/topic/restrict-private-messages/
The moderator said there’s a hook available in BuddyPress called messages_message_before_save which can be used to do things before a message is sent. But I don’t know how to write a function to customize it for my need.
Can anyone help? If you happen to know any other membership plugins that can achieve this, I’d really appreciate if you can let me know.
Thank you.
I am trying to build a contact form that I can load on any page that would send a private message to a user. I already have the selected user/s in an array and now I would like to take that plus form data to (I’m guessing) message_new_message
Sample HTML Form
<form>
<label>Subject</label>
<input id="subjec_input" name="subject_input" type="text">
<label>Message Body</label>
<textarea id="body_input" name="body_input"></textarea>
<button id="submit_btn" name="submit_btn">Submit</button>
</form>
How I think arguments are given to the function
`messages_new_message( $args = array( ‘recipients’ => $user_id, ‘subject’ => $title, ‘content’ => $message );
Any help would be appreciated. Thanks