@optimized Private messaging is available at the individual level, you can use https://wordpress.org/plugins/mass-messaging-in-buddypress/ to send a message to all group members or extend the same
Hi,
1. How do I get the Private Messsage button to display ?
2. How do we set up private messaging for groups ?
Regards,
Mike
Thanks. I looked at Auto Group Join, and am considering it. Registration Groups hasn’t been updated in a long time, so I’m a bit leery of that. I’ve also tried bbPress Private Groups, but I’m finding forum accessibility to be oddly inconsistent.
At the moment, I’m looking at:
1. Just BuddyPress – create lots of overlapping single-purpose groups.
2. Just bbPress & Private Groups – forget about the social aspect and just use structured fora.
3. Social media – give up and use a Google Group, Google+ community, or even [gulp] a Facebook group.
Info
Latest versions of WP, BP, and bbP
Goal
I’m trying to devise a simple, socially-oriented discussion space that has some invitation-only groups, and specific private fora for specific topics, but that is easy to enter and manage.
Structure
My initial thought was to have two groups:
Fans – open group
Various fora – all open
Contributors – invitation-only group
Specific fora and sub-fora – all private. For example:
Project forum 1 – open only to some members of the Contributors group
Project sub-forum A – open only to some members of the Forum 1 group
I’m finding that the groups and fora are hard to administer. I’d like to be able to simply check some boxes on the back end to define which site members belong to which groups and fora. Instead, they have to join, then I have to invite them (through the front end) to each group and to each forum and sub-forum. It’s slow and tedious.
Infrastructure
I had thought that using both BuddyPress and bbPress would give me what I want, and it does function, but it’s unattractive and awkward to manage. Some specific issues:
- Group ‘forum’ – each group has its own discussion space aside from the fora. I’d like to force people to use the fora instead.
- Signup – as noted, it’s very awkward to manage memberships in groups and fora; too much so for anyone to realistically sign up for the site, join a group, join a forum, join a sub-forum. I know who should be where; I’d like to manage all or most of this on the back end.
- Forum font size – is very small. While this seems a small detail, I’ve tried altering every font setting in my theme, and none seem to affect this.
Questions:
- Am I using the right tools? Would just bbPress or just BuddyPress be better?
- Are there specific plugins I should be using? I’ve seen some that look useful, but many are out of date. Some aren’t described with much specificity. I’m not sure which would do what I want.
Advice much appreciated.
(Also, any free themes that would work well, so that fora aren’t pushed way down the page.)
Hello, I’m trying to use BP Shortcodes with Siteorgin page builder. Basically I don’t want to use the premade BuddyPress pages at all. I want to be able to use my page builder to design the layout by using widgets and shortcodes. I’m having trouble getting any shortcodes to work right when I use them inside a pagebuilder html widget… specifically, it never takes on my background and font color settings from pagebuiler. Is this even possible? Is it even possible to not use the built in buddypresss pages/templates at all? When I do try to use them it just doesn’t match the look and feel of my site and makes everything look pretty ugly. Its either this or peepso. I prefer buddypress because things like media sharing and user private messaging comes free… with peepso they are paid add ons. But with PeepSo at least I can fully use widgets/shortcodes into a page builder designed page to make everything look uniform. Can anyone help? I’m new to all of this and I’m very very frustrated. This is the third time in the past two months I’ve redownloaded and given buddypress a shot… and I always get hung up at this very very point and then I always deactivate and go back to PeepSo. Any and all help would be greatly appreciated!!
This is not working on browser but works on private ones
The code above works to restrict private messages to to only friends, but the message the user gets if they try to message someone who is not a friend is:
“The message was not sent. Please try again later.”
Is there anyway to change this message to something like:
“Sorry, you can only message connections within your network”
Can I send the error log privately?
Did you ever find a solution to your first requirement?
– When a new user sign up via GF > create a private group(business) exclusively assigned to this new user (which will be a group admin)?
@onions2578 you can keep a private group and invite your friends only to join your group.
For a group-specific, you can create custom code which adds those members to a specific group when they will be added to your friend list, but it can not be a general scope.
When listing a group buddypress has
This is a public group
This is a private group
This is a hidden group
Any way my site can have
This is a friends only group
Here’s how I want it to work.
1. David registers at my site.
2. David creates a private group.
3. David emails a group invitation to Stephen.
4. Stephen follows the link, where he is prompted to register at the site, assuming he has not already done so.
5. Stephen logs in, and submits the invitation to join David’s group.
6. Stephen receives a confirmation email, using the email address by which David mailed the invitation. This may or may not be the email address Stephen used when registering at the site.
I am using the free version of BuddyPress for the time being. Even when I upgrade to pro, I don’t believe it is going to give me all of this functionality.
Hi Glenn,
(a) There are a number of plugins that allow you to customise the WordPress Login page. https://wordpress.org/plugins/custom-login/
(b) No I don’t think so, this is indicating that Incognito is redirecting login.php to another page.
(c) There’s a number of plugins that will allow you to put the login form into a widget for example, you could use one of these to put the login form on any page you like. https://wordpress.org/plugins/tags/login-widget/
2. Maybe you could try: https://wordpress.org/plugins/redirect-after-login/
3. There’s a number of BP privacy plugins, they tend to work in different ways so it’s really a case of checking out a few to see if they deliver what you need. I personally tend to use a modified version of BP Members Only. I modified it so that posts are not private.
Sorted using the code from :https://buddypress.org/support/topic/private-message-friends-only/
One question will the messages still be stored in the database even if the message isnt sent? I dont want these spammers filling up my database with junk..
🙂
Phishing bots are spamming users on my site with private messages and its doing my head in lol!
Everyday I get a new user that bypasses akismet and google recapcha doesnt post anything but starts spamming private messages to people.
How can I make it so only friends can send private messages to each other?
Also is there a way to auto delete accounts that are bots which sign up and dont post naything after a certain period of time?
Thanks.
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' );