Forum Replies Created
-
Bug confirmed: ticket
In reply to: Theme Compatibility – CustomizingFor template files, see this codex page:
I wouldn’t rely on messing with visibility settings.
To make a profile field only editable by admins, do this in bp-custom.php or a plugin:// only admins can edit the Skills field function chief_hide_profile_fields( $retval ) { if( is_super_admin () ) return $retval; if( bp_is_profile_edit() || bp_is_register_page() ) $retval['exclude_fields'] = '3'; //profile field ID's separated by comma return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'chief_hide_profile_fields' );Note that you need to add the correct id(s) for exclude_fields.
And that ‘ || bp_is_register_page() ‘ keeps the field(s) off the register page – which you may not need to do.Re how to create profile fields in code, there a couple of ways to do it depending on the kind of field and how it will be used.
Take a look at these plugins for more info:
https://wordpress.org/plugins/buddypress-xprofile-custom-fields-type/
https://wordpress.org/plugins/buddypress-xprofile-image-field/In reply to: Simple Way to Enable Image posting in Forums>most people using forums expect to be able to insert images into their posts nowadays.
Agreed.
Because BuddyPress and bbPress are two separate plugins, don’t expect BuddyPress to address this issue.
I’ve never used it, but try the free version of
https://wordpress.org/plugins/gd-bbpress-attachments/>To import the messages we are using the bbpress function messages_new_message( $args )
That is a BP function.
In it, near the bottom, you will see:
do_action_ref_array( 'messages_message_sent', array( &$message ) );
That is the hook to send email if the member has that Setting set to Yes.The function messages_message_sent is in:
\buddypress\bp-messages\bp-messages-notifications.phpSo you could use do_action_ref_array hook with a priority < 10 and strip out the recipients.
Or you could try a remove_action on
add_action( 'messages_message_sent', 'messages_notification_new_message', 10 );try this in bp-custom.php.
You’ll have to get the ids of the fields you want to exclude on the register pagefunction register_hide_profile_fields( $retval ) { if( bp_is_register_page() ) $retval['exclude_fields'] = '3'; //field ID's separated by comma return $retval; } add_filter( 'bp_after_has_profile_parse_args', 'register_hide_profile_fields' );In reply to: PM messaging and @mention predictions>regular topic reply
You mean a forum reply? That, and quotes, would be a question for bbPress.
In reply to: Custom Taxonomy for GroupsIt might be part of the 2.1 release, but more likely the 2.2 release.
https://buddypress.trac.wordpress.org/ticket/4017#comment:15In reply to: Dropdown group list on registration pageIt’s possible, but not easy.
You need to be logged in to join or create a group.
So you’d have to store the join/create group data until they complete their registration, activate their account and maybe log-in the first time.That would require custom code written by a web developer familiar with BP.
I’m not aware of such a plugin or code already existing.In reply to: Json api to groups pagePlease use the ‘code’ tag when sharing code.
Even better – use pastebin.comIn reply to: PM messaging and @mention predictions1. untested by me, but try http://pastebin.com/JcesLN8U
2. You want auto-suggest with the body of a pm reply as you create it?
If so, that is not currently available in BP.In reply to: Custom Taxonomy for GroupsThere is no built-in way at the moment, but there are efforts to do so in the future.
More info:In reply to: [Resolved] Using bp displayed user to query postsI can guess why author may != the meta value, but it would be a lot easier if you stored the user id in that meta value field.
Anyhow, you could use get_user.
$person = get_user_by('id', bp_displayed_user_id());then
... 'meta_value' => $person->user_login ...In reply to: [Resolved] Display a membership numberafaik – bp_displayed_user_id() requires an echo for display.
So in your template overload of this file:
buddypress\bp-templates\bp-legacy\buddypress\members\single\member-header.phppaste:
echo bp_displayed_user_id();In reply to: Conflict with my pluginafaik, this call in bp-members-admin.php is causing the issue.
add_action( 'pre_user_query', array( $this, 'remove_signups_from_user_query'), 10, 1 );You might try hooking admin_init early, 1 or 2,
then doing a remove action, run your code and the replace the action?In reply to: Conflict with my pluginWhat version of BP are you using to test this?
Is this what you see on /bp-members-admin.php:829
if ( $this->users_page != get_current_screen()->id ) {Just guessing, but…
You’re using the admin_init hook to call hmn_cp_trigger_upgrades which calls hmn_cp_v121_upgrade which seems to call remove_signups_from_user_query() in class BP_Members_Admin
So maybe the screen id or users_page doesn’t exist yet.
Perhaps try a hook other than admin_init?
Or give it a high number for priority?Other than the warning, is your plugin executing as expected?
In reply to: [Resolved] Profile view links !!?In bp-custom.php, paste this:
remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9, 2 );In reply to: [Resolved] Nobody visibilityYou may be interested in one of my premium plugins: BuddyNotes
It allows site admins to make notes per member.
>I can post my updated code?
It would be best if you posted a pastebin or gist url to the code.
Or even better, create a plugin and share a github repo.
In reply to: "customize" groups creationTake a look at this hook
do_action( 'groups_created_group', $group->id, $group );in buddypress\bp-groups\bp-groups-functions.php ~L. 161
Use that hook to connect to a function that changes the submitted name.
In reply to: [Resolved] Sort user list by last nameNo, it will use the first word in the display name.
To use the last word, follow danbp’s instructions and then paste this function in your child-theme/functions.php
function alphabetize_by_last_name( $bp_user_query ) { if ( 'alphabetical' == $bp_user_query->query_vars['type'] ) $bp_user_query->uid_clauses['orderby'] = "ORDER BY substring_index(u.display_name, ' ', -1)"; } add_action ( 'bp_pre_user_query', 'alphabetize_by_last_name' );In reply to: Increase search member performancePrior to BP 1.7, last_activity was stored usermeta.
Now it is stored in the activity table, (although you may see it still in usermeta for legacy purposes).Moving it to the activity table resulted in much improved performance.
You’ll probably see similar results.also – sometimes 2 queries are faster than one massive one with multiple joins, ands, ors.
also 2 – Have you studied this?
https://wordpress.org/plugins/bp-profile-search/
It’s been around for several years and the query has become more efficient with each release.>Okay, it worked!!!
You mean using the register_activation_hook ?
btw – you should still check to see if the field exists before you create it – to avoid duplications if they deactivate / reactivate the plugin.Or delete the field by using this hook:
https://codex.wordpress.org/Function_Reference/register_deactivation_hook>can you please tell me what if it’s in the functions.php file, do I need to use the bp_init then or something else?
Perhaps bp_loaded is more appropriate, you’ll have to try it and find out.
BP related functions are usually placed in bp-custom.php
For a plugin, instead of bp_init, use:
https://codex.wordpress.org/Function_Reference/register_activation_hooknote: I’m not sure BP is loaded before that hook is called.
Or you could use bp_init, but in your function, check for the existence of the xprofile field before you create it.
btw – you don’t need the global in that function.
This isn’t a BuddyPress question, but…
WPEngine is a very accomplished hosting company.
I can’t imagine that they haven’t had customers that migrated from a godaddy WP installation.
Have you posed this question to WPEngine?
Hope your migration goes fairly smoothly.
When you get BuddyPress installed, we await any questions you may have.