Hi
I discovered that users (spammers in this case) can send private messages and spam other users even though their accounts are yet to be activated by WordPress.
Is this how Buddypress is designed or is this a bug?
Regards
WordPress:
Version: 4.9.5
Language: en_US
Permalink Structure: /%postname%/
Active Theme: Tempera NoLink 0.6
Page On Front: Si Valetis, Valeo! (#62)
Page For Posts: Blog (#133)
— Web Server Configurations —
PHP Version: 7.0.30
MySQL Version: 5.6.34
Web Server Info: Apache
— PHP Configurations —
PHP Memory Limit: 256M
PHP Upload Max Size: 256M
PHP Post Max Size: 301M
PHP Upload Max Filesize: 256M
PHP Time Limit: 1000
PHP Max Input Vars: 1000
PHP Arg Separator: &
PHP Allow URL File Open: Yes
— WordPress Active Plugins —
Akismet Anti-Spam: 4.0.3
Caldera Forms: 1.6.1.1
Category Posts Widget: 4.8.5
Category Sticky Post: 2.10.1
Cryout Serious Theme Settings: 0.5.9
Custom Login Page Templates: 1.0
Custom Sidebars: 3.1.4
Disable Emojis: 1.7
Download Monitor: 4.0.8
Google Analytics Dashboard for WP (GADWP): 5.3.3
GTranslate: 2.8.40
Jetpack by WordPress.com: 6.1
Plugins Garbage Collector: 0.10.3
Shortcodes Ultimate: 5.0.3
Simple:Press: 5.7.5.2
Simple Link Directory – Pro: 4.8.0
Team Members PRO: 4.1.1
The Events Calendar: 4.6.15
TinyMCE Advanced: 4.6.7
Ultimate Member: 2.0.13
Ultimate Member – Followers: 2.0.1
Ultimate Member – Friends: 2.0.1
Ultimate Member – Google reCAPTCHA: 2.0
Ultimate Member – Instagram: 2.0.1
Ultimate Member – MailChimp: 2.0.1
Ultimate Member – Notices: 2.0.1
Ultimate Member – Online Users: 2.0
Ultimate Member – Private Messages: 2.0.2
Ultimate Member – Profile Completeness: 2.0.1
Ultimate Member – Real-time Notifications: 2.0.1
Ultimate Member – Social Activity: 2.0.1
Ultimate Member – Social Login: 2.0.1
Ultimate Member – Terms & Conditions: 2.0
Ultimate Member – User Reviews: 2.0.3
Ultimate Member – User Tags: 2.0
Ultimate Member – Verified Users: 2.0.1
UM New Members widget: 1.0.7
UpdraftPlus – Backup/Restore: 2.14.8.1
VaultPress: 1.9.5
Wise Chat Pro: 1.9
WP-Optimize: 2.2.4
WP Responsive Recent Post Slider: 1.4.2
Yoast SEO Premium: 7.4.2
Just to let everybody know: I found the cause for my problem. I had to add the capability ‘view private pages’ to the role and now everything works as expected.
I’m not crazy about the iframe solution, but I do believe it can allow invite to private server on discord, which would be useful, but I’m not sure. I’m going to play with it in staging and post back here on results.
Yep something is making your BP areas private for sure. BuddyPress for example on it’s own makes yoursite.com/members a public page, to make it private, like your’s is, you’d need to add a plugin – bp does not even have a setting for it.
That’s not actually the way BP works out of the box, normally you would need to add a plugin to make the site private. are you sure you’ve not got one installed?
Hi Vapvarun, thanks for your response. However, it’s not just an auto installer glitch. I don’t think you know “free.fr” host. This host DOES requires the use of “index.php” in the permalinks structure, you just get 404 errors otherwise.
This a restriction imposed by this host provider. “Free.fr” is free but it imposes several restrictions in exchange. For example, out-going traffic, auto-updates, newsletters, private sites, and any rewrite rule in the “.htaccess” are all forbidden.
That’s why I was looking for a way to make buddypress working with “index.php” in the permalink structure. In the end, I gave up but it’s a shame cause buddypress is really a great plugin. I’d still be very interested if someone by any chance knows what I need to modify in buddypress to make it work for my particular case.
This is happening in functions.php to fire up in members_loop:
Even though the Date of Birth is a private field I still need to pull it so I can calculate and display the user’s age. The below code works fine when I’m logged in as Admin but returns 0 when I’m logged in as a regular user which made me realize it’s probably because it’s set to private.
$dod = bp_get_member_profile_data( 'field=Date of birth' )
How do I get the field value straight from wp_bp_xprofile_fields?
The below isn’t working. I’m assuming it’s terribly wrong. I think I need to include in the db query the userID because it only pulls one value no matter who the user is but how do I get the displayed user’s ID (if that’s the case to begin with)? I managed to get this to work when viewing one’s profile page but I can’t seem to do it in members_loop.
//Add fields in the member directory results
function add_info_to_members_loop() {
//$dateOfBirth = bp_get_member_profile_data( 'field=Date of birth' );//This isn't working
global $wpdb;
$dateOfBirth = array();
$dateOfBirth = $wpdb->get_col("SELECT value FROM {$wpdb->prefix}bp_xprofile_data WHERE field_id = 2");
$dob = $dateOfBirth[0];
/*This will work when I finally get the date of birth
$today = date("Y-m-d");
$diff = date_diff(date_create($dob), date_create($today));
$state = bp_get_member_profile_data( 'field=State' );
echo 'Age '.$diff->format('%y') . ' - In ' . $state;
*/
}
add_action( 'bp_directory_members_item', 'add_info_to_members_loop' );
Thank in advance.
Hi Venutis! Thank you for the tip 🙂
But I found this code online created by a fellower named Brajesh Singh that worked very well. I just pasted it into my child theme’s functions.php
//////////////////////////////////////////////////////////////////
// BuddyPress send private message button
//////////////////////////////////////////////////////////////////
/**
* Get a link to send PM to the given User.
*
* @param int $user_id user id.
*
* @return string
*/
function buddydev_get_send_private_message_to_user_url( $user_id ) {
return wp_nonce_url( bp_loggedin_user_domain() . bp_get_messages_slug() . '/compose/?r=' . bp_core_get_username( $user_id ) );
}
/**
* Shortcode [bp-pm-button username=optional_some_user_name]
*
* @param array $atts shortcode attributes.
* @param string $content content.
*
* @return string
*/
function buddydev_private_message_button_shortcode( $atts, $content = '' ) {
// User is not logged in.
if ( ! is_user_logged_in() ) {
return '';
}
$atts = shortcode_atts( array(
'user_id' => '',
'username' => '',
'label' => 'Send Private Message',
), $atts );
$user_id = absint( $atts['user_id'] );
$user_login = $atts['username'];
// if the username is given, override the user id.
if ( $user_login ) {
$user = get_user_by( 'login', $user_login );
if ( ! $user ) {
return '';
}
$user_id = $user->ID;
}
if ( ! $user_id ) {
if ( ! in_the_loop() ) {
return '';
}
$user_id = get_the_author_meta('ID' );
}
// do not show the PM button for the user, if it is aimed at them.
if ( bp_loggedin_user_id() === $user_id ) {
return '';
}
// if we are here, generate the button.
$button = sprintf('<a href="%1$s">%2$s</a>', buddydev_get_send_private_message_to_user_url( $user_id ), $atts['label'] );
return $button . $content;
}
add_shortcode( 'bp-pm-button', 'buddydev_private_message_button_shortcode' );
Hi there,
I have a plugin called BP Profile Shortcodes Extra. I’ve added a shortcode to provide you with a configurable Private Message link [bpps_profile_private_message_link] you can use the user_id=”” setting to determine a specific user to private message. Let me know what you think.
Hi. I have buddypress + woocommerce + WC marketplace installed on my site running the flatsome theme. My site is a multi-vendor marketplace and I would really like to have a button or something on the single product’s page where logged in users easily can send a message to the product’s particular vendor through Buddypress’ PM system. Could someone please help me creating a shortcode that allows me to do this?
I’ve tried to search the forum but to no help.
Thanks.
When I install Buddypress, which I used in the past and I adore this plugin btw, I try with my new site to select the options ‘Friend Connections’, ‘Private Messaging’, ‘User Groups’ and ‘Site Tracking’ and activate them. It will save and when the page reloads it shows none of these features ever being activated.
I am currently on chat support with WordPress for the last two hours and they have no idea what is causing this. I tried uninstalling reinstalling, installing the beta version, changing themes, removing any possible conflicting plugins, and selecting them one at a time, I even had every other admin and the site owner try to get it to work for them and it still hasn’t worked.
What could be going on that is causing this issue? We have the business plan with WordPress so I’m not sure on the server being an issue as I didn’t use WordPress for my server in the past.
Hi Glenn, welcome aboard.
I’m pretty new to BuddyPress myself, at least on the in-depth side of things but I’ve been a user for a few years now. Just recently started writing plugins. I know what you mean regarding integration, I guess that’s what you get with a private system, less features but better integrated.
I’ve just created a plugin that I hope will take a step in the right direction integration wise. It’s called BP Post Status and it integrates WordPress posts with BP, allowing posts to be shared in groups and to friends. It’s also got a neat group homepage feature. If you intend to give your members the ability to blog it’s worth taking a look at. Still got a few teething problems though, nothing major, just my lack of experience shining through 🙂
@studial you can add a limit on group creation, like who can create a group. How many groups a member can join, or how many members can be part of a group. It can also be auto join to groups based on their member type during registration.
You can check for these plugins
https://wbcomdesigns.com/buddypress-private-community-pro-plugin/
BuddyPress Auto Group Join
Hi all,
Does anyone know how to create a permanent private circle group for all users. In other words instead of users creating groups, I want to create 1 or more groups for the users permanently and have control over the member type(s) that will be the admin, however I will choose the number of people that will be in that circle it could be 3 to 100 not sure, but I want to control the limit and give the user specific guidelines as to what they can do. Could you direct me as to how I would go about doing this with WordPress?
Hi
I have figure it out where the issue is i have checked this 3 components
PLease see screenshot
https://prnt.sc/j7k2k1
So i can now assign my member page
http://prntscr.com/j7k7uf
So can you please give easy way instrutions or tutorial?
On How can i make this Please!
1.Create Buddypress Community
*Users can create and update profiles, including the use of profile photos. Site administrators can easily set up the parameters of the user profiles.
*Users can befriend one another. The site owner can decide what special abilities friends have with regard to one another.
*Users can send private messages. BuddyBoss comes with a robust private messaging system, similar to that found on Facebook. Users can choose whether or not to receive an email notification when someone sends them a message.
*Users can form and join groups. Groups can be used for a wide range of functions within the website. Administrators can choose to let their users create and join groups of common interest.
*Users can follow activity streams. BuddyPress activity streams provide a quick digest of the recent activity going on within a site or with regard to a particular user.
*Users can create blogs. Capitalizing on the full functionality of WordPress, the most popular blogging platform in the world, BuddyPress gives administrators and users a full-featured online publishing platform.
*Users can participate in forum discussions. BuddyPress is fully integrated with bbPress, a slick forum system.
2. Active Login portal with Facebook or Google login credentials.
3. Active User generated material through BuddyForms or other methods.
Please advice thank you!
I am trying to find a 3rd party plugin or functionality below..
the function is like adding a review or testimonial without the star rating and such…
1st
a component for them to add name, email, prayer title and prayer content then submit button
2nd
the prayer will be automatically show to the prayer wall page and also will be added to a new component called my prayer request tab.. so every user can see each prayer they submitted.. and once the prayer has been answered they can click a button right next to the prayer like saying “praying has been answered” and will show up to my victory component tab privately and publicly.
I couldnt find such a thing.. please help me..
I am trying to find a 3rd party plugin for this..
the function is like adding a review or testimonial without the star rating and such…
1st
a component for them to add name, email, prayer title and prayer content then submit button
2nd
the prayer will be automatically show to the prayer wall page and also will be added to a new component called my prayer request tab.. so every user can see each prayer they submitted.. and once the prayer has been answered they can click a button right next to the prayer like saying “praying has been answered” and will show up to my victory component tab privately and publicly.
I couldnt find such a thing.. please help me..
Hello and thanks for your answer Paul.
Yes both installations are on the same server, same account, differents folders side-to-side
I tried adding a SMTP plugin, but no results.
The problem is only for private message notifications, other notifications are OK..
Hello,
I have a wp + BP installation where users do not get email notifications when a private message is being sent (all other emails notifications are ok).
What is strange is that I have a clone of this installation where only users and posts are different (same theme and child theme, same plugins…) where the problem does not exist.
I tried everything I could think about to find out what the problem is : changing theme, desactivating extensions…but to no avail.So I presume there is something wrong in my database ?
Really don’t know what to try next. Any idea ?
Thanks for your help
Hi there,
My name is Julien (french user) so may you excuse my EN language lvl 😉
I face a problem I cannot find out how to solve it (event after search around the web).
I’ve a wordpress site with Buddypress installed in. This private website is for workteams inside a company. I’m keymaster of this site.
All users have their own avatar image loaded from their profile page (fine)! Of courses I did so and my avatar is ok in most of the pages. But, in a forum discussion, my answers display another Avatar!! I’ve noticed that : this Avatar is also displayed in the Backoffice/Settings/Discussion as ALL default Avatars for users. But I’m the only user with this strange avatar in forums discussion. Other users display their own picture they loaded for their profile…
I’ve thought this was a matter of “gravatar” thing, but I’ve changed my gravatar in the gravatar website and nothing changed at all.
It looks like this default setting in the BackOffice for discussion users default avatar as been set on my “Google account avatar” and is only used for me and for forums discussions…
How can I change this two-duet-default-strange Avatar in the settings and/or in my profile?
I can send pictures for a better understanding, but is it possible to post images here?
THANKS!!! 🙂
Hello,
thank you for the answer
Of course there will be plugins to perform this operation. It will be another plugin (on my community sites, I arrive at 40!, All essential to achieve features not made by buddypress).
One more plugin, it is an additional risk of having incompatibilities, slower site, an obsolete version after 2 years …
All forms are integrating rgpd. It seems logical that buddypress integrates rgpd, because of these private data.
It would be nice if there is at least one type of field that after the entry is never displayed again, especially for the check box with the link of the rules of use.
Regards
Heres the link to the other users topic, he used the messages_message_content_before_save filter… but this doesn’t work for me.
remove_filter( 'messages_message_content_before_save', 'wp_filter_kses', 1);
send-private-message-in-html
(sry i can’t edit my own posts after a while..)
Hi, i didn’t found any fittings solution for my problem, i hope you can help me out.
I want to send a private message to one single User from my functions.php. This is just a kind of notification. Inside this message, i want to show two links and style it with some html tags like BR and Strong.. simple things…i thought.
But then i realized that buddypress filters out everything :/
$message = ‘This is the test<br>more like that.’;
$args = array( ‘recipients’ => [$user_teacher], ‘sender_id’ => $user_user, ‘subject’ => ‘Anfrage ‘ . mre_get_full_name($user_user), ‘content’ => $message );
$sending = messages_new_message( $args );
I tryed to remove the ‘messages_message_content_before_save’ Filter from inside a bp-custom.php file and also inside of my functions.php… but nothing happens.
Does someone know a solution for this?
Wp version: 4.9.4
Bp version: 2.9.3
Hi billysgtr, I’ve done it, you need to make the following changes to bp-pms-for-friends.php:
Line 69 replace:
if ( ! friends_check_friendship( bp_loggedin_user_id(), $recipient->user_id ) ) {
unset( $message_info->recipients[$key] );
$u++;
}
With:
if ( current_user_can( 'subscriber' ) && user_can($recipient->user_id, 'subscriber') ) {
unset( $message_info->recipients[$key] );
$u++;
}
Line 98 edit:
$message = __( 'You are not authorized to message the person(s) you are attempting to send a message to. Your message has not been sent.', 'bp-pms' );
With you own message
Line 129 Replace:
$is_whitelisted = in_array( bp_displayed_user_id(), $this->whitelist_ids );
With:
`$is_whitelisted = true;
if ( current_user_can(‘subscriber’) && user_can( bp_displayed_user_id(), ‘subscriber’) ) {
$is_whitelisted = false;
}’
This will deny any attempt to PM another subscriber and will remove the Private Message link from other subscribers profiles.