Forum Replies Created
-
In reply to: Creating Lessons Within Buddy Press
Your best bet is probably to look at this from the s2member side.
There is lots of info available, such asIn reply to: Creating Lessons Within Buddy PressIs there a way to connect my lessons to BuddyPRess?
Probably, but there are too variables in your questions:
– what does ‘connect’ my lessons mean?
– what is a gamification plugin?
– how are you dripping?btw – Those questions are rhetorical.
Unless somebody here has the same theme / plugin setup as you ( doubtful ), your chances of getting answers are slim to none.
Unless you are a developer, you’ll probably need to hire one to create the experience you desire.
And it sounds like a fairly large job.
You can post job listings here.In reply to: query ALL users with Role as Editor$subscribers = get_users( 'fields=ID&role=subscriber' );$subscriberswill be an array of just the IDs of all subscribers.In reply to: Admin control of who can become a memberGoogle: buddypress hide admin from members list
In reply to: Delete profile fieldsYou can get the ids by going to
.../wp-admin/users.php?page=bp-profile-setup
Click or roll-over the Edit links for group or single field.
And you’ll see group_id & field_id.
btw – you can delete groups and / or single fields on that wp-admin page.I would like to be able to hide all the information about my site administrators
What do you mean by ‘hide’?
Make them invisible?If you’ve changed the name of the admin’s account so it doesn’t say ‘admin’, then why do you need to hide it?
How would a scraper know that it’s the admin’s account?In reply to: Query posts by custom fieldDon’t use
bp_has_members.$members = my_custom_ids( 'country', 'Spain' );Don’t implode the array in my_custom_ids, just return the array.
$query = new WP_Query( array( 'author__in' => $members ) );In reply to: BP Components relationship to Registration/PageYou can have a login widget on your home page.
But register needs a separate page – afaik.To repair, create a blank page – just add the title ‘Register’.
And then assign the page.In reply to: [Resolved] Limiting Activities by User’s CityPlease use the
codebutton.Store your meta in the
bp_activity_metatable when an activity entry is created.
Then you can use an Activity Meta Query to filter activities.Add custom filters to loops and enjoy them within your plugin
In reply to: Profile fields open URL in new tab (_blank)There is a filter hook for displaying profile fields – so you don’t need to hack core files.
apply_filters( 'bp_get_the_profile_field_value', $field->data->value, $field->type, $field->id );Use str_replace to insert your target blank string.
function swiss_target_blank( $field_value, $field_type, $field_id ){ if( $field_id == 123 ) { // get the field_id from edit field url in wp-admin $field_value = str_replace('rel="nofollow"', 'rel="nofollow" target="_blank"', $field_value); } return $field_value; } add_filter('bp_get_the_profile_field_value', 'swiss_target_blank', 11, 3);In reply to: Query posts by custom fieldDid you read the link re
author__in?
It uses ids, not country.As we’ve said, it’s a two-step process.
Look at
function my_custom_idson this codex page for an example of gathering ids from xprofile.Then pass the ids to
author__in.In reply to: Query posts by custom fieldPlease use the
codebutton when posting code.You’re querying against user_meta.
But the data is an xprofile field.You need to collect the user ids of all members who have a certain xprofile value re the country field.
Then use theauthor__inparameter inWP_Query
https://codex.wordpress.org/Class_Reference/WP_Query#Author_ParametersIn reply to: Stopping forum spam?You shouldn’t need to disable the activity stream commenting – but try it.
There are several plugins re bbPress spam, such as:
https://wordpress.org/plugins/stop-spammer-registrations-plugin/In reply to: Stopping forum spam?Not sure what you mean by ‘comments’.
Did you check your comment settings?
…/wp-admin/options-discussion.phpIn reply to: Stopping forum spam?Did you enable anonymous posting?
Look at: …/wp-admin/options-general.php?page=bbpress > Anonymous postingbtw – this is the BuddyPress support site.
The bbPress support site is here.In reply to: Problem with gravatarRead this thread:
https://buddypress.org/support/topic/remove-gravatar-completely/In reply to: Member profile link goes to homepageYou have some custom code or another plugin that is adding that behaviour.
It is not default BP behaviour.In reply to: Echo logged in user countBP doesn’t track who is logged-in.
It does tracklast_activitywhich is based on actually doing something on the site – not just being logged-in and having the site open in a browser.So the best you can do is to show a number based on the number of members with last_activity within the last x minutes.
Try:
function boris_online_number( ) { global $wpdb; $time = date('Y-m-d H:i:s', time() - ( 15 * 60) ); // minutes * seconds $a_number = $wpdb->get_var( "SELECT COUNT(user_id) FROM {$wpdb->prefix}bp_activity WHERE component = 'members' AND date_recorded > '$time' "); echo 'Online: ' . $a_number; } add_action( 'bp_ready', 'boris_online_number' );In reply to: What is the purpose of wp_filter_kses function?It’s a security issue, it sanitizes input.
More info: http://ottopress.com/2010/wp-quickie-kses/
Also shows how to allow tags.When I removed that filter, nothing was stripped anymore and it worked fine.
Are you removing it based on how it was added?
See all theadd_filtercalls in bp-messages\bp-messages-filters.php
Useremove_filterto disable specific items.In reply to: BubbyPress + BBPress, ERRORThis is an issue for bbPress support.
Or you could try changing the display function in
class BBP_Forums_Group_Extensionfrom:
public function display() {
to
public function display($group_id = NULL) {In reply to: Allow Empty “What’s New” Activity UpdateI believe that it uses the built-in wordpress “post” function.
Why would you think that? Even a quick look at the code would show that’s not the case.
Use this hook:
apply_filters( 'bp_activity_post_update_content', $_POST['whats-new'] );Try:
function allow_empty_whatsnew( $content ) { if ( empty( $content ) ) $content = ' '; // cannot be empty return $content; } add_filter('bp_activity_post_update_content', 'allow_empty_whatsnew');In reply to: How to Center Avatar and Tabs on Profile Page>I still can’t seem to figure out where that @username went.
Look in this file, hopefully in [your-theme]\buddypress\members\single\member-header.php
Look near the top for
bp_displayed_user_mentionname();btw – you should not use ‘admin’ as a username.
https://codex.wordpress.org/Hardening_WordPress#Security_through_obscurityhttp://www.wpbeginner.com/wp-tutorials/how-to-change-your-wordpress-username/
In reply to: Show Members on Group page on selecting group nameThis is possible but requires custom code.
Writing and implementing that code will probably require you to hire a developer.
You can post a job here.In reply to: Limit update exceprtTry this in your theme/functions.php
function laurie_excerpt_length( $length ) { $length = 125; // adjust the length to desired number of characters return $length; } add_filter( 'bp_excerpt_length', 'laurie_excerpt_length', 11, 1 );