Replies
- Brajesh Singh on June 10, 2016 at 10:04 am in reply to: [Resolved] Get total elements count inside one gallery (by id) #4176
Hi,
Here are the methods:-1. Without considering privacy mpp_gallery_get_media_count( $gallery_id ) will give the count of all media inside the gallery
2. There is no builtin API for the count with privacy, so we will write a new function like this
function mpp_custom_get_media_count( $gallery_id ) { $gallery = mpp_get_gallery( $gallery_id ); $args = array( 'gallery_id' => $gallery->id, 'status' => mpp_get_accessible_statuses( $gallery->component, $gallery->component_id ), 'fields'=> 'ID', 'per_page' => -1, 'nopaging'=> true, ); $gq = new MPP_Media_Query( $args ); $count = $gq->post_count; return $count; }and we can use it as we wish. Please do not overuse it, it is database intensive operation.
Hope it helps. - Brajesh Singh on June 10, 2016 at 7:21 am in reply to: [Resolved] Get total elements count inside one gallery (by id) #4174
Hi Minoo,
There are multiple ways to do it. Do you want to consider the visibility of media while showing the count or not?If we do not consider the visibility of media, the count will be very efficient.
Hi Javier,
Thank you for posting. Give the user editor role and a custom capability ‘bp_moderate’ and he should be able to moderate almost all things BuddyPress.Hope that helps.
regards
Brajesh- Brajesh Singh on June 8, 2016 at 9:22 pm in reply to: Activity Comment Notifier redundant notifications? #4157
Hi Jamie,
I am sorry for the delayed reply. I have looked at it in details and the update of the plugin will take me some time. There are issues that I have noticed. For example, some of the notifications were deleted automatically. I am planning to rewrite the whole experience to use new BuddyPresss advances(like notification meta etc) in next 1-2 weeks. For the time being, Please download the updated version from here for a temporary fix(Instead of duplicate notifications, It uses individual user in the message for notifications)https://github.com/sbrajesh/bp-activity-comment-notifier
Hope that helps.
Hi Javier,
You are doing it correctly if you are using the conditional redirect to redirect users. That is the standard way in WordPress community.About the individual media url, though you can restrict it using .htaccess etc, It is not recommended. It is not scalable solution and even facebook does not restrict it. Try copying a private media url and then opening it directly in another browser from facebook. So, that is standard industry practice at the moment.
Hope that helps.
Regards
BrajeshHi Philippe,
It will need some intensive php skill as we need to use a few filter to inject the original image urls and then use js to hook it.Which lightbox plugin do you want to use?
- Brajesh Singh on June 8, 2016 at 9:23 am in reply to: [Resolved] Profile Visibility Manager Hide Friends List does not cover friends widget #4149
Hi Bjorn,
Thank you.I am glad the group request is fixed now.
I will be giving another try to the activity stream to see if I can reproduce it. If I can reproduce it, It will be super easy to fix.
Thank you
Brajesh Hi Philippe,
Thank you for asking.If I understand correctly, you are concerned about the size of uploaded file? Currently, It is limited by the setting of your webserver(php.in). We do not limit it at application level at the moment. The easy way will be to change it in php.ini.
Hope that helps.
- Brajesh Singh on June 8, 2016 at 9:13 am in reply to: Issue with MediaPress – Media only for group members #4147
Hi,
Thank you for notifying. We are looking at it and will get back to you soon with our finding.
@ravisharma, can you please look at it? - Brajesh Singh on June 7, 2016 at 10:59 pm in reply to: [Resolved] Create project based site with buddypress #4142
Hi Falona,
Apologies for the delayed reply. will be posting on your topic with details today. Closing it in favor of
https://buddydev.com/support/forums/topic/creating-entrepreneursstart-ups-and-investorsbusiness-angels-community-with-bp/Regards
Brajesh