Forum Replies Created
-
In reply to: Custom Sort of Group Members
The example on the codex page uses this hook: bp_before_directory_members
So you shouldn’t see it on a group members page.
From the codex page:
“It will not affect the display of members on pages like …/groups/some-group/members/ or in widgets, etc.”It’s a bit complex the first time you use member query hooks, but they are extremely useful.
In reply to: Custom Sort of Group MembersWhen Boone says manually, he means use this hook…
do_action_ref_array( 'bp_pre_user_query', array( &$this ) );…to call a function that you write that adjusts the ‘order’ and/or ‘orderby’ clauses.
So now you have two paths for adjusting sort 🙂
No need to edit core files.In reply to: Custom Sort of Group Members@dimensionmedia
>those examples and hooks don’t apply to group member pagesYes they do.
BP_Group_Member_Query extends BP_User_QueryFor example, say a member with id=2 belongs to a group.
You can leave them on the main Members page but remove them from the group members page like so:function group_exclude_two( $query_array ) { $query_array->query_vars['exclude'] = 2; } function group_exclude_one() { add_action( 'bp_pre_user_query_construct', 'group_exclude_two', 1, 1); } add_action('bp_before_group_body', 'group_exclude_one');Of course the filter you request in that ticket would be very useful, thanks.
In reply to: Custom Sort of Group MembersYou don’t say if you’re doing this on a group page.
Assuming you are…Find a hook prior to output of group users.
Hook a function that contains your custom sql.
Take a look at using the bp_pre_user_query_construct hook and ‘Preserve the Order’ here:
https://codex.buddypress.org/developer/bp_user_query/#code-examplesIn reply to: Just Need a Little AdviseIn reply to: Just Need a Little Advise> I do want restricted access… for a section of my site
So for area ‘x’ you want to restrict access to logged-in members?
What is area ‘x’?
What should happen when a non-logged-in person goes there?
Redirect? Membership prompt?In reply to: Getting group name from idTry this:
$group_ids = groups_get_user_groups( bp_loggedin_user_id() ); var_dump( $group_ids["groups"] ); foreach( $group_ids["groups"] as $id ) { $group = groups_get_group( array( 'group_id' => $id) ); echo '<pre>'; var_dump( $group ); echo '</pre>'; }In reply to: Customising default member avatar – Gravatar bug?There are some resources re disabling gravatars in BP.
Here’s one, untested by me but at least will give you hints:
http://bp-tricks.com/snippets/completely-disable-the-use-of-gravatars-on-your-buddypress-site/In reply to: Display total number of contributorsYou’ll need some custom sql. Put this in bp-custom.php
function contributor_count() { global $wpdb; $contributor_count = $wpdb->get_var( "SELECT COUNT(user_id) FROM {$wpdb->prefix}usermeta WHERE meta_key = '{$wpdb->prefix}capabilities' AND meta_value LIKE '%contributor%'" ); return $contributor_count; }Use it wherever you want like this:
echo contributor_count();In reply to: Hiding Activity Feed/Members from non-members.You want to hide the listing of members on the Members page from everybody?
Logged or not?Either way, it’s not something you want to do with css.
Also make sure that your single forum slug is ‘forum’
The settings are in Dashboard > Settings > Forums > Single Forum Slugs > Forum.If it isn’t ‘forum’, before changing the slug, trying changing your ‘define’ to use your current slug.
This works fine on my basic test install
define( 'BP_GROUPS_DEFAULT_EXTENSION', 'forum' );Make sure that the quotes are straight verticals – not slanted or curved.
Otherwise, it’s something about your install.
Are you positive that your group(s) have forums ?Over-ride this file:
buddypress\bp-templates\bp-legacy\buddypress\groups\single\home.phpAnd adjust it to make forums the default rather than activity.
Over-riding BP templates:
https://codex.buddypress.org/themes/theme-compatibility-1-7/a-quick-look-at-1-7-theme-compatibility/Do a var_dump on $notifications so you can see the structures.
Your code will need to test each $notifications[$i] to see if it’s an array and then handle it accordingly.
In reply to: Use full content for custom post activity entryUse this hook: do_action( ‘bp_activity_entry_content’ );
in the template: buddypress\bp-templates\bp-legacy\buddypress\activity\entry.php
And write a function to embed the video.
In reply to: Link ultimate auction pro to buddypress emailIf it’s the ‘pro’ version, then you paid for it, yes?
Part of that payment includes support, yes?
Have you asked the creators of ultimate auction pro about your issue?My guess – ultimate auction pro uses the WP email address for each member.
But so does BP.
So your question is unclear.
And your best chance for an answer is to ask ultimate auction pro.In reply to: Member/profile links in commentsI would think that there are several places where a link to the BP profile would appear.
To handle them all, including the case you state, try using the filter hook in
function bp_loggedin_user_domain()return apply_filters( 'bp_loggedin_user_domain', isset( $bp->loggedin_user->domain ) ? $bp->loggedin_user->domain : '' );found in
buddypress\bp-members\bp-members-template.phpIn reply to: Backend notification when user profile completeUse something like this:
https://wordpress.org/plugins/buddypress-profile-progression/Omit the visual and add the member to your admin display and / or send an email when ‘points == x’
In reply to: What is the url for a user's homeYou’re creating these redirects thru Dashboard options provided by one or more plugins, yes?
Unless those options can include php, you’ll need to adjust or add code somewhere.
The complete profile link for a logged in user is returned by this call:
bp_loggedin_user_domain()In reply to: Membership Reporting@ubernaut – thanks for the kind words and your feedback during the dev
@henrywright
>like a member stats dashboardNot sure what you mean.
http://www.philopress.com/products/buddyreports/ is meant to be a flexible Administrator tool. Therefore access can be restricted.
There is this plugin for front-end graphs.
https://wordpress.org/plugins/buddypress-activity-graphs/In reply to: Membership ReportingThis premium plugin can handle most all needs re membership reporting and statistics:
BuddyReportsIn reply to: Displaying profile fields in admin users.phpDoesn’t sound like you need to edit xprofile fields from within the Dashboard,
but this premium plugin allows you to view, edit and save xprofile field values from a User > Edit screen in the Dashboard:
http://www.philopress.com/products/bp-dashboard-user-profile-edit/In reply to: [Resolved] Timestamps in members timezoneAh, didn’t notice that instruction, just looked at the code.
( It’s surprising how many plugins leave in that kind of code. )>I’m new to wordpress/buddypress so writing a plugin isn’t going to happen anytime soon
You’ve already done a good chunk of the work.
If you and/or @henrywright-1 want to draft a plugin, I’d be willing to get involved.In reply to: [Resolved] Timestamps in members timezoneNice. It would also be interesting to provide this on all timestamps.
One issue ‘tho – in this:
http://docs.taptappress.com/buddypress-add-time-zone-list-profile-field/I think you’re inserting / updating all those xprofile fields on every page load.
Why not just do it once?You could write a plugin that uses ‘register_activation_hook’ to run bp_add_custom_timezone_list() once.
And then use the filter hook in:
bp_get_message_thread_last_post_date()
to adjust the timestamp without requiring a template change.And you could use other hooks to adjust other timestamp displays.
That would be a popular and very handy plugin.
In reply to: Universal Profile Link<a href="<?php echo bp_loggedin_user_domain(); ?>profile/">My Profile</a>