Replies
- 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 - Brajesh Singh on September 28, 2020 at 4:40 pm in reply to: How can I display ads between buddypress activity #33535
You will most probably want to keep all the banners as array entry and use a random value in the range to avoid a specif c pattern/repetition.
Regards
Brajesh Hi Ankit,
It might be possible but there does not exist any such solution. By adding song, I am assuming you want to use audio+cover as avatar.Regards
Brajesh- Brajesh Singh on September 28, 2020 at 10:20 am in reply to: How can I display ads between buddypress activity #33525
Do you plan to use ads like google ads, then there is no solution(due to their policy). But if you plan to put banners, then there are solutions.
You may want to take a look at this
https://buddydev.com/inject-content-into-buddypress-activity-stream-after-a-certain-number-of-activities/Regards
Brajesh - Brajesh Singh on September 28, 2020 at 10:18 am in reply to: Paid Memberships Pro Restrictions is not restricting the uploads #33524
Hi Quintin,
Thank you for using the plugin.Is there any chance you are logged in as site administrator? The plugin does not stop site administrators.
Please let me know if that is not the case.
Regards
Brajesh - Brajesh Singh on September 28, 2020 at 1:45 am in reply to: BP xProfile Custom field types, about From/To Values… #33521
Hi,
Thank you for reporting.Please post em a screenshot or link me to a page showing the issue? Do you want to replace the ‘-‘ character with comma?
Regards
Brajesh - Brajesh Singh on September 28, 2020 at 1:44 am in reply to: Activity Plus Reloaded : Showing error while posting Youtube links #33520
Thank you.
- Brajesh Singh on September 28, 2020 at 1:43 am in reply to: [Resolved] buddypress user notification dropdown #33519
Hi Adam,
That menu is built by extracting the node of WordPress Adminbar Account menu.We fetch the child of ‘my-account-buddypress’ node and show it there.
To add/remove from it, Please alter the admin tool bar menu.
You may find this tutorial useful.
https://www.sitepoint.com/customize-wordpress-toolbar/Regards
Brajesh