BuddyBoss Home – Web › Support Forums › General › Requests and Feedback › BuddyBoss Media: Limiting Albums & Photos
Tagged: buddyboss media
- This topic has 19 replies, 3 contibutors, and was last updated 9 years, 4 months ago by Lauren.
Question
January 7, 2015 at 2:37 pm #34468@mp3stevoI would like to request the feature to limit the amount of albums and photos a user can create/upload.
Answers
January 7, 2015 at 10:41 pm #34482@alyssa-buddyboss
AlyssaParticipant@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.
January 8, 2015 at 8:06 am #34494@mp3stevoSo 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!
January 8, 2015 at 10:06 am #34496@alyssa-buddyboss
AlyssaParticipant@mp3stevo this will limit the number of photos in the album, not the total number of albums.
January 8, 2015 at 10:15 am #34497@mp3stevoOh 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!
January 10, 2015 at 9:26 am #34577@alyssa-buddyboss
AlyssaParticipant@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.
January 10, 2015 at 10:06 am #34583@mp3stevoThanks 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?
January 10, 2015 at 12:02 pm #34592@alyssa-buddyboss
AlyssaParticipant@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.
April 13, 2015 at 9:09 pm #38890@mp3stevoWhat 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!
April 14, 2015 at 8:19 am #38902@alyssa-buddyboss
AlyssaParticipant@mp3stevo We do not currently have any way to limit albums, sorry. 🙁
June 30, 2015 at 9:14 am #41936@optimysticIs 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.
June 30, 2015 at 12:23 pm #41947@alyssa-buddyboss
AlyssaParticipant@optimystic imsanity plugin works wonder for this 🙂
June 30, 2015 at 4:26 pm #41962@optimysticPerfect, thank you!
July 2, 2015 at 6:44 pm #42044@alyssa-buddyboss
AlyssaParticipantYou’re Welcome!
July 6, 2015 at 10:10 am #42219@optimysticSO 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 :(?
- The question ‘BuddyBoss Media: Limiting Albums & Photos’ is closed to new replies.