Search Results for 'buddypress'
-
Search Results
-
Hi all,
I have tried probably a half dozen approaches to hiding buddypress pages from non-logged in visitors, but none seem to work! The site continues to show all member/etc pages, logged in or not. Here is my latest attempt, which is the entirety of the bp-custom.php file I just created at /wp-content/bp-custom.php:
<?php function restrict_access(){ global $bp, $bp_unfiltered_uri; if (!is_user_logged_in() && ( BP_MEMBERS_SLUG == $bp_unfiltered_uri[0] || BP_GROUPS_SLUG == $bp->current_component || BP_BLOGS_SLUG == $bp->current_component || ‘forums’ == $bp->current_component || is_page_template(‘private-page.php’) ) ) { bp_core_redirect( $bp->root_domain . '/' . bp_get_root_slug( 'register' ) ); } } add_action( ‘wp’, ‘restrict_access’, 3 ); ?>Any ideas what I’m doing wrong? Thank you! (And code credit for this snippet goes to: https://buddypress.org/support/topic/redirect-if-not-logged-in-for-some-sections/ )
Hi,
when i mention user (eg: @shadow_boi) in a new forum post/reply, is the mentioned user supposed to receive a bubble notification?
I tired, but there is no bubble notification or email sent. was it expected?
WP: 4.3
theme: Twenty FifteenVersion: 1.3
buddypress 2.3.2.1
bbpress 2.5.8i have disabled all other plugins except for bbpress and buddypress
am trying to add a domain whitelist to the buddypress registration.
all of the email address that will sign up to on my site will have the domain form @XX.yo.ac.uk with the XX varying in character length and number characters themselves.
I basically would like to strip the domain of the entered email address down to the last 9 characters and then compare them to (.yo.ac.uk) and return an error message if not identical, if not then allow the registration to continue.
I found this code:
// ==================================== // Limit signup by banning domains function bp_as_restrict_signup_domains( $result ) { $banned = array( 'spam1.com', 'spam2.com' ); $error = 'Your email domain has been the source of spam. Please use another email address.'; $email = $result['user_email']; $domain = array_pop(explode('@', $email)); if ( in_array($domain, $banned)) { $result['errors']->add('user_email', __($error, 'bp-restrict-email-domains' ) ); }; return $result; } add_filter( 'bp_core_validate_user_signup', 'bp_as_restrict_signup_domains' );here: http://alexschreyer.net/programming/limit-buddypress-registration-by-domain/
But this is to block certain domains rather than allow. Any ideas how to change it? and to strip out the characters before the last 9?
Thanks for any help!
I have existing site with 500 plus users and already have WP profile fields created a while ago with simple fields like address, city, state and Zip and custom fields like year joined and speciality.
I am planning on deploying Buddypress to add functionality to the site. How can sync all these fields with XProfiles fields
I know https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/ help you create Xprofile fields and https://wordpress.org/plugins/bp-xprofile-wp-user-sync/ help you sync first and last name.
How about all other fields. I need members to be able to message each other, create events, map each other by location and events by location and finally create groups. Do I need BuddyPress or alternate that work with WP Profiles will work.Thanks/Shaunik
Topic: Membership plugins
Hello,
I’d like to run a dating site with buddypress and add a membership plugin with page restrictions and so on. I also use BP registration. Could you suggest any plugin that would work easily alongside buddypress?
ThanksTopic: PHP 7.0 compatibility
Hi, Can the latest BuddyPress version run on PHP7 configuration? Does BuddyPress support PHP7.0?
Thanks.Hi everyone,
I’am currently try to add custom notification from a non BuddyPress component. I’m using this hooks:
bp_notifications_get_registered_components
bp_notifications_get_notifications_for_user
and this function:
bp_notifications_add_notificationEverything works well except the hook
bp_notifications_get_notifications_for_user. My problem is in my installation there is the bbPress plugin. It is also using this hooks. So this hooks is call twice, and the$actionargument is empty or contain the rendered notification content. So I’m not allowed to do the right things on the second call.I must add this to this file in bbPress plugin :
/wp-content/plugins/bbpress/includes/extend/buddypress/notifications.phpon line 78 (at the end of the functionreturn $action):/** * Format the BuddyBar/Toolbar notifications * * @since bbPress (r5155) * * @package bbPress * * @param string $action The kind of notification being rendered * @param int $item_id The primary item id * @param int $secondary_item_id The secondary item id * @param int $total_items The total number of messaging-related notifications waiting for the user * @param string $format 'string' for BuddyBar-compatible notifications; 'array' for WP Toolbar */ function bbp_format_buddypress_notifications( $action, $item_id, $secondary_item_id, $total_items, $format = 'string' ) { // New reply notifications if ( 'bbp_new_reply' === $action ) { $topic_id = bbp_get_reply_topic_id( $item_id ); $topic_title = bbp_get_topic_title( $topic_id ); $topic_link = wp_nonce_url( add_query_arg( array( 'action' => 'bbp_mark_read', 'topic_id' => $topic_id ), bbp_get_reply_url( $item_id ) ), 'bbp_mark_topic_' . $topic_id ); $title_attr = __( 'Topic Replies', 'bbpress' ); if ( (int) $total_items > 1 ) { $text = sprintf( __( 'You have %d new replies', 'bbpress' ), (int) $total_items ); $filter = 'bbp_multiple_new_subscription_notification'; } else { if ( !empty( $secondary_item_id ) ) { $text = sprintf( __( 'You have %d new reply to %2$s from %3$s', 'bbpress' ), (int) $total_items, $topic_title, bp_core_get_user_displayname( $secondary_item_id ) ); } else { $text = sprintf( __( 'You have %d new reply to %s', 'bbpress' ), (int) $total_items, $topic_title ); } $filter = 'bbp_single_new_subscription_notification'; } // WordPress Toolbar if ( 'string' === $format ) { $return = apply_filters( $filter, '<a href="' . esc_url( $topic_link ) . '" title="' . esc_attr( $title_attr ) . '">' . esc_html( $text ) . '</a>', (int) $total_items, $text, $topic_link ); // Deprecated BuddyBar } else { $return = apply_filters( $filter, array( 'text' => $text, 'link' => $topic_link ), $topic_link, (int) $total_items, $text, $topic_title ); } do_action( 'bbp_format_buddypress_notifications', $action, $item_id, $secondary_item_id, $total_items ); return $return; } return $action; } add_filter( 'bp_notifications_get_notifications_for_user', 'bbp_format_buddypress_notifications', 10, 5 );And i have to do the same thing for my custom notification rendering.
So my question is quite simple: Is this a bug? A bug from bbPress? A bug from BuddyPress? Or I am not using the hook properly?
Please advice me, and I create a ticket if it is necessary.
Thanks in advance.
Hey. Is there a way to output permanent steam links in profiles using WordPress Social Login?
It can output a permanent ID in “provider user identifier” field of WSL which can be linked to any custom buddypress field, but how do I convert it to something like this: steamcommunity.com/profiles/<provider_id> ?I picked up this code for adding extra fields to my buddypress groups. http://pastebin.com/Bj3aE4Q0
Everything works great but I was wondering if there is a string of code I can add so it only shows that field if a selection was made or someone filled in that field in the backend settings.
Right now by default all the fields show whether people added information or not.
So if field is blank or null I would like it hidden on the front end.


