Shape the future of Social networking with WordPress: Join Project Midnight Sun! The next generation platform for community building with WordPress!

BuddyDev

Search

Replies

  • Keymaster
    (BuddyDev Team)
    Posts: 25273

    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.

  • Keymaster
    (BuddyDev Team)
    Posts: 25273

    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.

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: [Resolved] BuddyPress 'Super User' #4168

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 25273

    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.

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: [Resolved] Restrict Site Access #4156

    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
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: Lightbox #4150

    Hi 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?

  • Keymaster
    (BuddyDev Team)
    Posts: 25273

    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

  • Keymaster
    (BuddyDev Team)
    Posts: 25273
    Brajesh Singh on in reply to: Size of uploaded files #4148

    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.

  • Keymaster
    (BuddyDev Team)
    Posts: 25273

    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?

  • Keymaster
    (BuddyDev Team)
    Posts: 25273

    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