Forum Replies Created
-
A standard installation of BuddyPress does not do the things you describe.
Try deactivating any other plugins you have running and see it that stops your issues.
In reply to: Let users edit custom profile.phpCreate a template overload of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\single\member-header.phpAnd put what you want into it, such as a link to wp-admin/user/profile.php
For example:
if( bp_is_my_profile() ) { global $current_user; get_currentuserinfo(); $login_name = $current_user->user_login; echo '<a href="' . site_url() . '/wp-admin/' . $login_name . '/profile.php">Edit Your Profile</a>'; }In reply to: Suggested PluginI’m not aware of such a plugin.
And would be surprised if it exists, since you want something that adds bridge functionality to 2 specific plugins.
You’ll probably need to write some custom code.
You should ask on the support forums for those 2 plugins.
In reply to: How to search event by name custom query?The event manager plugin has a search function.
For additional questions about that plugin, you should use their support forums.Perhaps those styles are no longer being used ?
You can download older versions of BP here.
Make a backup of your database.
Then deactivate the BP plugin.
Then upload another version of BP and activate.In reply to: No profile name on profile pageUnless you are specifically use the BP default theme, BP will use the files in
buddypress\bp-templates\bp-legacy\Are you sure that your theme or child-theme is not overloading those files?
In reply to: redirect buddypress groups page to forum pageThe function works on a test site when I go to
home_url() . '/groups/'You may need to put it in bp-custom.php.
In reply to: redirect buddypress groups page to forum pageMy function was hooking too early.
And using name instead of slug.Try:
function my_group_forum_redirect() { if ( bp_is_groups_directory() ) { $user_id = get_current_user_id(); $args = array( 'user_id' => $user_id, 'populate_extras' => false ); $groups = groups_get_groups( $args ); $groups = $groups['groups']; $group_slug = ''; foreach( $groups as $group ) { $group_slug = $group->slug; } if( $group_slug != '' ) { wp_redirect( home_url() . '/groups/' . $group_slug . '/forum/' ); exit; } } } add_action( 'wp', 'my_group_forum_redirect' );In reply to: redirect buddypress groups page to forum pageCan a user belong to more than one group?
If not, try this (untested):function my_group_forum_redirect() { if ( bp_is_groups_directory() ) { $user_id = get_current_user_id(); $args = array( 'user_id' => $user_id, 'populate_extras' => false ); $groups = groups_get_groups( $args ); $groups = $groups['groups']; $group_name = ''; foreach( $groups as $group ) { $group_name = $group->name; } if( $group_name != '' ) { wp_redirect( home_url() . '/groups/' . $group_name . '/forum/' ); exit; } } } add_action( 'init', 'my_group_forum_redirect' );In reply to: Hide profile page of admin from other usersThere are a few issues with that solution.
1. ‘1’ can’t view their own profile
2. What if there are multiple adminsSuggestion:
function hide_admin_profiles() { // Bail if this is not a profile. if ( ! bp_is_user_profile() ) return; if ( ! is_super_admin() ) { if ( is_super_admin( bp_displayed_user_id() ) ) { wp_redirect( home_url() ); exit; } } } add_action( 'init', 'hide_admin_profiles' );In reply to: BP Group Extension APIWhere are you running your code?
Try it in a plugin or in bp-custom.phpIn reply to: How to change page layout of user profiles?Create a template overload of one or more of the files found here:
\buddypress\bp-templates\bp-legacy\buddypress\members\single\In reply to: BP Group Extension APIPlease note the edits made above.
You’re saving a groupmeta field called ‘group_extension_ville_setting’
but in display() and settings_screen() you’re asking for a groupmeta field called ‘group_extension_ville’ – so of course it will not work.In reply to: BP Group Extension APITry:
function display() { $town = groups_get_groupmeta( $group_id, 'town' ); echo esc_attr( $town ); }In reply to: How Do I Make A Registration Field Read From DB1. No need to create register.php, just copy this file:
buddypress\bp-templates\bp-legacy\buddypress\members\register.php
into your theme/ child theme using this approach.Then adjust it accordingly.
You don’t say whether ‘location’ is a required field – that will affect where in the file you make your adjustments.Will the values for ‘location’ change very often?
If not, you can use code to create both the field and all the values, so you don’t have to manually enter all the values.
And won’t have to overload register.php
ExampleIn reply to: Redirect to login page if user not logged inIn reply to: [Resolved] Hide User ID from public viewif( bp_is_my_profile() || is_super_admin() ) echo bp_displayed_user_id();In reply to: Reposition Extended Profile Field DescriptionsCreate a template overload of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\single\profile\edit.php
and adjust it to fit your needs.In reply to: Activity Stream Push Notifications> Ideally we could filter what type of content triggers these push notifications.
Use this hook:
do_action( 'bp_activity_add', $r );In bp_activity_add() in bp-activity\bp-activity-functions.php
There are some plugins that export data.
google: buddypress export membersFor example, for site admins:
https://wordpress.org/plugins/export-user-data/For front-end, you could extend that plugin or find something else.
As part of your purchase of Paid Memberships PRO, you should receive support from them.
Ask them if they have any email hooks that might over-ride BP or bbPress hooks.
In reply to: DirectorySounds like a checkboxes field in the ‘Base Group’ is what you want.
Go to:
/wp-admin/users.php?page=bp-profile-setup&group_id=1&mode=add_fieldAdd a Field and select ‘checkboxes’ as the field type.
In reply to: Duplicate edit-profile groupsHow many instances of a problem field, such as Zip, do you have in the database on the install that is causing problems?
If there are more than one, then somehow multiple fields were created.
I’m not sure exactly what your issue is, but your function accepts only one parameter.
But 3 are passed.
Yours:
function record_post_activity_content_update($content){The filter_hook:
$activity->content = apply_filters( 'bp_blogs_record_activity_content', bp_create_excerpt( $post_content ), $post_content, (array) $activity );Notice that post_id is not in there.
It might be in $activity.So try something like this:
function record_post_activity_content_update( $excerpt, $post_content, $activity ) { $post_id = $activity->secondary_item_id; // or $post_id = $activity->item_id; // then build your string using $post_id rather than $post->IDYou are only filtering for new posts.
Take a look at buddypress\bp-blogs\bp-blogs-functions.php
Look for the filter hook you are using.
Look for this filter hook too: bp_blogs_record_activity_content