BuddyBoss Home – Web Support Forums General Requests and Feedback BuddyBoss Media: Limiting Albums & Photos

Viewing 15 posts - 1 through 15 (of 20 total)
  • Question

    #34468
    @mp3stevo

    I would like to request the feature to limit the amount of albums and photos a user can create/upload.

    Answers

    #34482

    Alyssa
    Participant
    @alyssa-buddyboss

    @mp3stevo Welcome to the BuddyBoss community! You can hide the upload form upon refresh of the page by replacing some code on a template file in the plugin.
    Line 32 of buddyboss-media/templates/members/single/buddyboss-media-album.php find this code:
    <?php if ( bp_is_my_profile() ) : ?>
    replace with this code:

    <?php global $buddyboss_media_albums_template;
    		$album_count = $buddyboss_media_albums_template->album->total_items;
    			if ( bp_is_my_profile() && $album_count < 21 ) : ?>

    This will only work once the page is refreshed so they could technically upload 100 photos but upon refresh they won’t be able to add more. PS this is not official so we can’t really support it further than this. I’ll see if I can do something similar with limiting albums.

    #34494
    @mp3stevo

    So with the example above it would limit the user to 20 albums. I like it. Currently, a user can upload infinite photos to an album? Thanks for the quick response!

    #34496

    Alyssa
    Participant
    @alyssa-buddyboss

    @mp3stevo this will limit the number of photos in the album, not the total number of albums.

    #34497
    @mp3stevo

    Oh ok. I can wait for the update to the plugin that will give an option to limit albums and photos within an album. 🙂 Your support is great!

    #34577

    Alyssa
    Participant
    @alyssa-buddyboss

    @mp3stevo after talking with our devs it appears this will not be on the roadmap. We tend to align with many of the features users see in mainstream social media sites and with expanding bandwidth and unlimited storage on servers these days we feel that this feature will be used by a small percentage of BuddyBoss users. If you truly need this feature I’m afraid you will need to get it custom developed.

    #34583
    @mp3stevo

    Thanks for getting back to me. I have the photos go to my AWS server so yeah bandwidth pretty limitless with a price haha.

    I don’t mind editing the code by myself. I would prefer to use hooks in my child theme to avoid core code changes. Is there an API or documentation on how to add hooks?

    #34592

    Alyssa
    Participant
    @alyssa-buddyboss

    @mp3stevo sorry no API or hooks. Editing the template file in your child theme is our only option at this time. I’m not sure why our devs don’t add hooks to the plugin.

    #38890
    @mp3stevo

    What code do I need to add to limit the total amount of albums?

    buddyboss-media/templates/members/single/buddyboss-media-albums.php around line 21. I tried:

    global $bp, $buddyboss_media_albums_template;
    $albums_count = $buddyboss_media_albums_template->albums->total_items;

    But that did not work. What’s the syntax? Thanks!

    #38902

    Alyssa
    Participant
    @alyssa-buddyboss

    @mp3stevo We do not currently have any way to limit albums, sorry. 🙁

    #41936
    @optimystic

    Is there a way to limit file size of the upload? So, not albums, or photo limits, rather a limit to the size file someone can upload. I have a technologically unconscious community and sometimes the file size is 6MB for one image.

    #41947

    Alyssa
    Participant
    @alyssa-buddyboss

    @optimystic imsanity plugin works wonder for this 🙂

    #41962
    @optimystic

    Perfect, thank you!

    #42044

    Alyssa
    Participant
    @alyssa-buddyboss

    You’re Welcome!

    #42219
    @optimystic

    SO I love the imsanity plugin, but since uploading it all my mobile images are coming in sideways. Is this a known issue or is there a setting that might change this? Or is this just an incompatibility with this plugin :(?

Viewing 15 posts - 1 through 15 (of 20 total)
  • The question ‘BuddyBoss Media: Limiting Albums & Photos’ is closed to new replies.