Forum Replies Created
-
In reply to: Registered Members Only Pages?
Have you tried this plugin: https://wordpress.org/plugins/bp-simple-private/
In reply to: Keyboard shortcutsIf hitting ‘Enter’ does not work then no, afaik.
You were clear enough about it being settings – I misread your posts.
You should use this hook:
do_action( 'bp_core_general_settings_after_save' );
Found in:buddypress\bp-settings\bp-settings-actions.phpChanging the feedback message is more difficult.
You could change the content of the message by using this hook:
apply_filters( 'bp_core_render_message_content', $bp->template_message, $type );
Found in:buddypress\bp-core\bp-core-functions.phpBut I don’t see how you can change the type of message from error to success.
So what I would do is – create a new tab on the Settings panel and handle everything separate from the General tab functionality.
There is lots of documentation about that task, this will get you started…
function had_setup_biz_phone_navigation() { bp_core_new_subnav_item( array( 'name' => 'Billing Phone', 'slug' => 'bphone', 'parent_url' => bp_loggedin_user_domain() . 'settings/', 'parent_slug' => 'settings', 'screen_function' => 'name of the function to create the content', 'show_for_displayed_user' => false ) ); } add_action( 'bp_setup_nav', 'had_setup_biz_phone_navigation' );modifying the general.php template
There is no such template in a standard BP install, afaik.
But there is an easier way to add a field…
Why not add a profile field in the proscribed manner?
In wp-admin, go to Users > Profile Fields and add your field to whichever Group you want.
All fields in the Base Group will appear on the Registration page.If you can reproduce the issue with a vanilla install, definitely open a report on trac.
In reply to: Autocomplete usernames when cosing private messageAssuming there are no errors on your site….
afaik, the auto-complete only handles friends by default. So if you aren’t friends with ‘Jenn’, you won’t see a suggestion.To turn on auto-complete for all users, put this in bp-custom.php :
define( 'BP_MESSAGES_AUTOCOMPLETE_ALL', true );In reply to: How to reduce user’s view on groups only to his ownsTry this, untested:
function jan_add_nav_menu_items( $items, $args ) { if ( is_user_logged_in() ) $items .= '<li><a href="' . bp_loggedin_user_domain() . '/groups/">My Groups</a></li>'; return $items; } add_filter( 'wp_nav_menu_items', 'jan_add_nav_menu_items', 10, 2 );In reply to: Private messagesYou mean on a per-member basis?
This plugin allows a member to block other members so they can’t message them.
BuddyBlockYou could try this approach:
https://webdevstudios.com/2015/10/06/buddypress-adding-custom-notifications/Set up a custom notification callback. Look at existing BP components to see how it is handled.
When you register your component, in
function setup_globals, what value ( function name ) do you give to'notification_callback'? And does that function exist?'secondary_item_id'should be the user id of the person creating the notification.
That might be the problem.In reply to: calling BP function in bbpress return nothingYou should not change that function. You should use the hook.
Try something like this in your theme functions.php:
function hosam_delete_notification( $topic_id ) { // you cannot send an array // create individual variables $user_id = 386; // etc bp_notifications_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ); } add_action( 'bbp_trash_topic', 'hosam_delete_notification' );In reply to: Buddypress mails get sent text-onlyYou can open a ticket here. Use the same user name and password that you use for this forum.
In reply to: calling BP function in bbpress return nothingDid you try this hook
do_action( 'bbp_trash_topic', $topic_id );found inbbp_trash_topic?For addresses, you may be able to use a single field.
BP xProfile Location – Get it from the WP Plugin Repo or on PhiloPressTry:
'contexts' => array( 'activity', 'member', 'friends' ),In reply to: [Resolved] Remove Group Email Notifications ScreenDon’t add a function, just do this:
remove_action( 'bp_notification_settings', 'groups_screen_notification_settings' );And it won’t work in bp-custom.
Put it in your theme or child-themefunctions.php.In reply to: Adding Gravity Forms Entry to Site ActivityAsk GF for the hook re a form submission.
Then use that hook to call a function that uses bp_activity_add()In reply to: [Resolved] Editing code in bp-members-function file.mois compiled from a.poor.potfile.
Does sublime text compile.pofiles?
If not, use poEdit.To show xprofile fields, you could do this:
// add the custom column header function philopress_modify_user_columns($column_headers) { $column_headers['extended'] = 'Meta Fields'; return $column_headers; } add_action('manage_users_page_bp-signups_columns','philopress_modify_user_columns'); // dump all the pending user's meta data in the custom column function philopress_signup_custom_column( $str, $column_name, $signup_object ) { if ( $column_name == 'extended' ) return print_r( $signup_object->meta, true ); return $str; } add_filter( 'bp_members_signup_custom_column', 'philopress_signup_custom_column', 1, 3 );If you only want to show specific meta fields, you need to know the field id(s).
Then you could do this:
return $signup_object->meta['field_4472'];>any suggestions do you have?
Forget your new idea and go back and try using my suggestion again.
$field_idand$valueare arguments passed to whatever function you hook intoxprofile_profile_field_data_updated. Check the $field_id in your function to see if it matches the id for the email field – if it does, create a user_meta value.Read about
do_actionandupdate_user_metaYou need to track the number of times an email is changed – probably by creating and setting a user_meta field.
Try using this hook found in:bp-xprofile\bp-xprofile-screens.php
do_action( 'xprofile_profile_field_data_updated', $field_id, $value );Then create a template overload of the profile/edit.php template and add a conditional that checks that user_meta field.
You could ask the creators of that plugin.
You could hack the plugin as you wish.
But I don’t advise making that change.
Emails can change. User IDs are unique and fixed.