-
shanebp replied to the topic [Resolved] New users only visible after logging in in the forum How-to & Troubleshooting 11 years, 10 months ago
They aren’t visible because they have no last_activity field.
Going forward, this should add it for new members – untested, goes in theme/functions.phpfunction pilon_add_timestamp( $user_id ) {
bp_update_user_last_activity( $user_id );
}
add_action('user_register', 'pilon_add_timestamp', 10 , 1);For existing members with no last_activity,…[Read more]
-
shanebp replied to the topic [Resolved] Display groups a user is member of in the forum How-to & Troubleshooting 11 years, 11 months ago
-
shanebp replied to the topic [Resolved] Replace plugin-function from bp-groupblog – double output in the forum How-to & Troubleshooting 11 years, 11 months ago
Nice. And thanks for the link to the discussion.
-
shanebp replied to the topic [Resolved] Trying to locate php file for editing the Activity Stream Output. in the forum How-to & Troubleshooting 11 years, 11 months ago
This is the file:
buddypressbp-templatesbp-legacybuddypressactivityentry.phpCreate a template overload before you change it.
-
shanebp replied to the topic How to Limit Personal Activity Feed Posts in the forum How-to & Troubleshooting 11 years, 11 months ago
buddypressbp-templatesbp-legacybuddypressactivityactivity-loop.php
-
shanebp replied to the topic Integrating BuddyPress with WP Job Manager in the forum Creating & Extending 11 years, 11 months ago
You could use the approach in the codex page you’ve referenced.
Probably easier to use this hook from WP Job manager: ‘job_manager_save_job_listing’
In the function that you create for that hook, use bp_activity_add. -
shanebp replied to the topic Adding xprofile data in my Activity Stream in the forum How-to & Troubleshooting 11 years, 11 months ago
Yikes – that was just a skeleton that needs actual code in the function.
Given your code ability and the number of code requests you’ve recently made on these forums,
I recommend that you post a job listing here. -
shanebp replied to the topic Accept and Reject for groups Button Missing in the forum Showcase 11 years, 11 months ago
It’s probably something about how you built the theme.
So the issue appears re bp_button, but is actually due to something else. -
shanebp replied to the topic Adding xprofile data in my Activity Stream in the forum How-to & Troubleshooting 11 years, 11 months ago
> Any thoughts?
Use a service like gist to show the code that you tried.
-
shanebp replied to the topic Adding xprofile data in my Activity Stream in the forum How-to & Troubleshooting 11 years, 11 months ago
Never put code into the buddypress plugin files.
Use your theme functions.php or use bp-custom.php.
-
shanebp replied to the topic Accept and Reject for groups Button Missing in the forum Showcase 11 years, 11 months ago
Do you have debug turned on in wp-config.php ?
-
shanebp replied to the topic Adding xprofile data in my Activity Stream in the forum How-to & Troubleshooting 11 years, 11 months ago
Use the ‘xprofile_updated_profile’ hook
function josh_profile_check( $user_id, $posted_field_ids, $errors ) {[Read more]
/* check $posted_field_ids to see if one of the fields you are interested in has changed
if yes, then use bp_activity_add to add to activity stream
*/
}
add_action( 'xprofile_updated_profile', 'josh_profile_check', 10, 3… -
shanebp replied to the topic Accept and Reject for groups Button Missing in the forum Showcase 11 years, 11 months ago
Assign the button to a var, then dump it to see what is returned.
$asdf = bp_get_button( etc. )
var_dump( $asdf );Your bp_button calls look ok, afaik.
Take a look at the function
buddypressbp-corebp-core-template.php ~L. 487 -
shanebp replied to the topic Accept and Reject for groups Button Missing in the forum Showcase 11 years, 11 months ago
Use
bp_get_button -
shanebp replied to the topic add page to a group in the forum Creating & Extending 11 years, 11 months ago
You can do that with the Group Extension API.
-
shanebp replied to the topic Did I just loose 10k users? in the forum How-to & Troubleshooting 11 years, 11 months ago
Then it would seem to be a WP issue.
Or something happened during the migration. -
shanebp replied to the topic How to display all profile fileds in member list page in the forum Showcase 11 years, 11 months ago
Have you looked at this premium plugin?
BuddyProfileData -
shanebp replied to the topic [Resolved] Replace plugin-function from bp-groupblog – double output in the forum How-to & Troubleshooting 11 years, 11 months ago
You’ll probably get a better answer using the support forum for that plugin.
My guess would be that you are hooking too early and the remove_action calls fire before those add_actions exist.
Maybe try a hook other than ‘plugins_loaded’.
Have you tried ‘bp_include’. -
shanebp replied to the topic Remove add_friend button in the forum How-to & Troubleshooting 11 years, 11 months ago
function hideAddFriend($button){
$role = mika_user_has_role( bp_get_member_user_id() );if( $role )
return '';return $button;
}
add_filter( 'bp_get_add_friend_button', 'hideAddFriend');function mika_user_has_role( $id, $role = 'inactive' ){
$roles = mika_get_user_roles( $id );
if ( $roles && in_array ( $role, $roles ) )…[Read more] -
shanebp replied to the topic Remove add_friend button in the forum How-to & Troubleshooting 11 years, 11 months ago
Filters have to return something.
You’re only returning if a condition is met.
So no buttons will appear.And you aren’t passing the $arg, so you can’t return it.
Try:
function hideAddFriend($button){[Read more]
$caps = get_user_meta(bp_get_member_user_id(), 'wp_capabilities', true);
$roles = array_keys((array)$caps);
// Hide friendship… - Load More
@shanebp
Active 1 month, 3 weeks ago