BuddyDev

Search

MediaPress – Display Media Count on BP Profile page

  • Participant
    Level: Enlightened
    Posts: 56
    John B on #26524

    When using RTMedia I was able to display the number of photos a user has uploaded.

    https://rtmedia.io/docs/developers/add-media-count-media-gallery/

    I looked through the shortcodes but couldn’t find a way to output the total number of uploads. Is this possible with MediaPress? If so can you please point me in the right direction?

    Thank you.

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #26545

    Hi John,
    I am sorry the plugin does not store the total media count for users/groups. The MediaPress does store media count for galleries though.

    In one of our upcoming plugins, we did count media for users. The code is not shareable as it needs to be used with transient to avoid any slow query.

    Please remind me next week and I will make a clean copy and share with you.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 5
    arnotzon on #27021

    Hi Brajesh,

    I would also be interested in displaying media count on profile header. Can you please share this code?

    Thank you

  • Participant
    Level: Enlightened
    Posts: 42
    Shannon Belletti on #29017

    I’d like to see this too!

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #29038

    Hi Shannon,
    The problem is count is relative to who is viewing the profile or gallery.

    For example, a user might have media with various privacies(example friends only media). It will be visible to the friends but not others.

    I am unable to find a proper and efficient way to handle the media count. Storing media count for each privacy level is a deal breaker for me. Also calculating it on each page load is not efficient in current schema.

    We are working on to move the schema to a flat table which will resolve this issue in future.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 42
    Shannon Belletti on #29094

    Ah, that makes sense.

    Is there a way for admins to see how many images each member has in their galleries?

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #29106

    Hi Shannon,
    Yes, we have a function that lists number of media in current gallery.

    
    mpp_gallery_get_media_count( $gallery_id )
    
    

    If you want, I can help with code to show how to append count in the title of the gallery.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 42
    Shannon Belletti on #29118

    Where would the shown? Only in gallery titles throughout pages?

    As an admin, I’d like to have a list of all members with a total count of galleries & images and storage. I need to see who is taking up lots of storage space and who isn’t, etc. Is that possible?

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #29136

    We can show it as part of the gallery title on gallery list.

    Currently, You will need to write your own script for listing users with storage. The functionality for calculating storage per user is there but we do not have any functionality for sorting by storage etc.,

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved