-
shanebp replied to the topic Restrict subscribers from showing in member list in the forum How-to & Troubleshooting 10 years, 11 months ago
You need to look at the s2member documentation to figure out how to gather all the ids for level1 members.
Then you can use the ‘include’ parameter in this approach:
https://codex.buddypress.org/developer/bp_user_query/#code-examples -
shanebp replied to the topic friends_check_friendships not working in the forum How-to & Troubleshooting 10 years, 11 months ago
Try
bp_is_friend( $user_id )
It will check to see if the logged_in user is a friend of $user_id
Returns – ‘is_friend’, ‘not_friends’, ‘pending’.
-
shanebp replied to the topic friends_check_friendships not working in the forum How-to & Troubleshooting 10 years, 11 months ago
If you’re not on the members page or a profile page, I don’t think bp_displayed_user_id() will work.
You need to get all the member ids and then loop thru them, something like:
friends_check_friendships(bp_loggedin_user_id(), $ids[$i])
You’re doing this on a custom WP page?
Rather than use ‘allow php in html’, you should create a template and…[Read more] -
shanebp replied to the topic Membership Reporting in the forum How-to & Troubleshooting 10 years, 11 months ago
What info would be useful in such a report?
Not just a total number per? -
shanebp replied to the topic Filtering member results. in the forum Creating & Extending 10 years, 11 months ago
So you’re creating an additional Members page ?
If not, you don’t need an override.
If you are, you need to change this hook in that override
do_action( 'bp_before_directory_members' )
And call the new hook in the example below.You need to know the id of the xprofile field that stores gender.
You need to know the value that is stored for…[Read more] -
shanebp replied to the topic is there a shortcode for embedding a single groups forum or a widget for that? in the forum How-to & Troubleshooting 10 years, 11 months ago
You’ll have better luck on the bbpress forums.
-
shanebp replied to the topic Display green border around avatar when user is online in the forum How-to & Troubleshooting 10 years, 11 months ago
You should be able to put the function in functions.php
But you still need to put this
$current_time = current_time( 'mysql', 1 );
at the top of the template and _not in functions.php -
shanebp replied to the topic Display green border around avatar when user is online in the forum How-to & Troubleshooting 10 years, 11 months ago
To show in the members loop, create a template override in your theme for members-loop.php
At the top of your override, paste this:
$current_time = current_time( 'mysql', 1 );
function online_check( $current_time ) {
global $members_template;if ( isset( $members_template->member->last_activity ) ) {
$diff = strtotime(…[Read more]
-
shanebp replied to the topic Sorting Private Message Threads in the forum How-to & Troubleshooting 10 years, 11 months ago
You can’t override core files.
Undo the changes you made to /bp-messages-classes.php
Copy
bp-templatesbp-legacybuddypressmemberssinglemessagessingle.php
to your child theme so that the dir structure looks like this:
your-themebuddypressmemberssinglemessagessingle.phpThen in single.php, change
if ( bp_thread_has_messages() ) :
to
<?php…
[Read more] -
shanebp replied to the topic Is there a way to suppress group membership activities in group activity feeds? in the forum How-to & Troubleshooting 10 years, 11 months ago
It helps to turn on debugging in wp-config.php
define('WP_DEBUG', true);
add_filter('bp_has_activities', 'mla_filter_out_membership_activities', 10, 3);
should be
add_filter('bp_has_activities', 'filter_out_membership_activities', 10, 3);
$args[per_page] should be $args[‘per_page’]
return array($a, $activites, $args);
should be
return…[Read more] -
shanebp replied to the topic [Resolved] BP_Group_Extension For Single Group? in the forum How-to & Troubleshooting 10 years, 11 months ago
Cool, a 4 year old thread that is still useful.
minor stuff:
You don’t need the $bp global
I’d put the foreach in the ‘if ( $group_id == 1 )’ conditional -
shanebp replied to the topic Some profile_data can not be called other do ? in the forum How-to & Troubleshooting 10 years, 11 months ago
Are you sure that the gender field value has been set for the member being viewed?
If it hasn’t been set, nothing will be returned.
-
shanebp replied to the topic [Resolved] BP_Group_Extension For Single Group? in the forum How-to & Troubleshooting 10 years, 11 months ago
Which file are you using to load the extensions?
If it’s a plugin, have you tried a simple include based on whether the group in question is being viewed?
-
shanebp replied to the topic Is there a way to suppress group membership activities in group activity feeds? in the forum How-to & Troubleshooting 10 years, 11 months ago
Unfortunately, there don’t seem to be hooks to avoid recording such activity.
And unfortunately you can’t suppress the display of only some group activity stream items – it’s groups or no groups.
So you have to filter all activity stream items – they all use the same code.
Take a look at the filter hook at the bottom of
function…[Read more] -
shanebp replied to the topic Filter Members List Based On Profile Field in the forum Creating & Extending 10 years, 11 months ago
I’ve added a comment to your gist.
If you’re storing the field as a string that is ‘Male’ or ‘Female’, it should be fine.
Otherwise you’ll have to make a few tweaks. -
shanebp replied to the topic Filter Members List Based On Profile Field in the forum Creating & Extending 10 years, 11 months ago
Please use https://gist.github.com/ to show us what you have so far.
-
shanebp started the topic add a column to BP_Groups_List_Table in the forum Creating & Extending 10 years, 11 months ago
In BP 1.9 –
Anyone know how to add a column to BP_Groups_List_Table?
Without touching core files?The usual hooks, manage_posts_columns etc, don’t work because groups is not a cpt.
-
shanebp replied to the topic Filter Members List Based On Profile Field in the forum Creating & Extending 10 years, 11 months ago
example:
-
shanebp replied to the topic Paid Themes in the forum How-to & Troubleshooting 10 years, 11 months ago
You can ask questions here, but you may not get answers.
If you’re paying for a theme, then the theme sellers should offer support.Remember that almost any WP theme will work with BuddyPress 1.8 and up.
So if you’re going to spend $55, you have a lot of choices.
You don’t need a BP specific theme. -
shanebp replied to the topic add to html markup in bp_activity_action() in the forum How-to & Troubleshooting 10 years, 11 months ago
Look at that function in
buddypressbp-activitybp-activity-template.phpUse one of the two filters to make your changes, probably with some string operations.
- Load More
@shanebp
Active 2 hours, 28 minutes ago