Replies
- Brajesh Singh on September 28, 2020 at 8:30 pm in reply to: Paid Memberships Pro Restrictions is not restricting the uploads #33552
Hi Quintin,
I am sorry for the inconvenience. It seems the plugin is not behaving as expected.Please do know that it does not apply any limit on file size, so first upload will always pass even if larger than allocated storage(at least in current implementation).
It should not allow the 2nd and subsequent uploads though.Can you please provide me the following details:-
1. Are you using BuddyPress or BuddyBoss Platform?
2. Which version of the BuddyPress or BuddyBoss platform?
3. Which version of MediaPress are you using?
4. is it a WordPress multisite or normal WordPress?
5. Does the user uploading the media has a PMPro membership level assigned?Please let me know and I will assist.
Regards
Brajesh - Brajesh Singh on September 28, 2020 at 8:26 pm in reply to: How get I get the total activity count of a user #33551
You need to print that using echo.
Example:-
echo "Count:" . buddydev_get_total_user_activities_count( 1, 'activity_update' );Where 1 is user id.
- Brajesh Singh on September 28, 2020 at 8:25 pm in reply to: [Resolved] Add group creation button in profil group tab. #33550
You are welcome. I am glad it worked.
Regards
Brajesh Hi Rami,
I am sorry for the delayed reply.
@ravisharma has added the changes. I will need 1-2 days to review the code before publishing. I will post back after publishing.Regards
Brajehs- Brajesh Singh on September 28, 2020 at 7:44 pm in reply to: [Resolved] BuddyPress Auto Activate Auto Login + Force Email login #33545
Hi,
Thank you for using our theme and plugins.It might be a conflict in one of the new updates of these plugin. Please allow us 48 hours to test and push an update.
Regards
Brajesh - Brajesh Singh on September 28, 2020 at 7:43 pm in reply to: [Resolved] Limit Characters in BuddyPress Activity Post #33544
Hi Steven,
Thank you for the question.I am assuming you are looking to change thee excerpt length in the activity stream(activity posts list)?
It is simple doable by 2-4 lines of code without any plugin. We are also including it in one of our upcoming plugins for a no-code solution.
Please confirm me if this is the case and I will post the code.
Regards
Brajesh Hi,
Yes, these are doable but out of scope for our forum assistance.I will suggest asking in the BP Profile Search forum or you may use our custom services.
Thank you
Brajesh- Brajesh Singh on September 28, 2020 at 7:09 pm in reply to: [Resolved] Add group creation button in profil group tab. #33542
Hi,
Thank you for the question.I have posted the code as a blog post here
https://buddydev.com/add-buddypress-create-group-button-to-user-profile-groups-page-navigation/Regards
Brajesh - Brajesh Singh on September 28, 2020 at 7:08 pm in reply to: [Resolved] Set cover image foreach single audio Mediapress #33540
You are welcome.
- Brajesh Singh on September 28, 2020 at 5:00 pm in reply to: How get I get the total activity count of a user #33536
HI,
Thank you for the question.There does not exist a function in BuddyPress API to achieve this currently.
We can create own own like this
/** * Returns total activities count for the user * * @param int $user_id user id. * @param string $type activity type. * * @return int */ function buddydev_get_total_user_activities_count( $user_id, $type = '' ) { global $wpdb; $table = buddypress()->activity->table_name; $where_conditions = array(); $where_conditions[] = $wpdb->prepare( 'user_id = %d', $user_id ); if ( $type ) { $where_conditions[] = $wpdb->prepare( "type = %s", $type ); } $whe_sql = join( ' AND ', $where_conditions ); return absint( $wpdb->get_var( "SELECT count(DISTINCT id) FROM {$table} WHERE {$whe_sql}" ) ); }and use it like
$updates_count = buddydev_get_total_user_activities_count( 1, 'activity_update' ); $all_count = buddydev_get_total_user_activities_count(1)and so on.
Regards
Brajesh