How to limit max number of images per profile?

Hi there,

Just setting up a new social photo community using rtmedia with Buddypress and trying to fine-tune some rtmedia settings. I see from previous threads that the ‘Number of media items to show in activity stream’ is now available and has an option to limit the default number of images visible, but users can still upload more and when you view a user’s profile there’s an option to show more.

So my questions are:

  1. how can I limit the total number of images each user can upload and add to their profile (eg. x 10)?
  2. once they’ve reached this total and then delete one (or more) will they then be allowed to upload another one (or more) - so the total in their profile never exceeds this maximum (eg. x 10)?
  3. if i disable albums in the rtmedia BP settings it will disable site wide; is there a way (additional code) for me to allow albums in groups but disable albums in user profiles?

So far I’ve been pleasantly surprised with how it’s all working, so am keeping my fingers crossed that there is a way to accomplish the above problems.

many thanks.

Hi @perfectp,

Answers to yours questions :

Option-1 )

If you want to limit user for uploading media, then we have this feature included with rtMedia add-on rtMedia-PRO [ https://rtcamp.com/products/rtmedia-pro/ ].

Find documentation for Per User Upload Quota here -> http://docs.rtcamp.com/rtmedia/addons/rtmedia-pro/features/per-user-upload-quota/

With rtMedia-PRO, you will also get much more useful features like -> http://docs.rtcamp.com/rtmedia/addons/rtmedia-pro/features/

Option-2)

If you also want to include payment integration, you will need to get membership plugin.

We do also have Membership add-on for rtMedia -> https://rtcamp.com/products/rtmedia-membership/

Here is the documentation for your reference -> http://docs.rtcamp.com/rtmedia/addons/membership/

Sorry to say but it is not possible. Album will be disabled site-wide only.

Thank you.

Thanks for your quick reply pranalipatel. I’ve checked out the pro feature to limit user files but not sure it will still do what I need; can you clarify this for me?..

The ‘Per User Upload Quota’ sets limits for number of uploads (storage) per day/month/lifetime + limits numbers of files per d/m/lifetime. If I use the eg in your manual (http://docs.rtcamp.com/rtmedia/addons/rtmedia-pro/features/per-user-upload-quota/) and look at the total file limit, it means that a user can upload a lifetime maximum of x600, within the daily/monthly quota, but so at any one time can have hundreds of images in their profile.

So how would i use these settings to allow a user to only ever have a maximum of 10 images showing on their profile at any one time, but be allowed to change these 10 images whenever they want? (ie. no lifetime maximum).

Cheers.

Hello @perfectp,

You only want a user to have maximum of 10 images in their profile which means you want that users can only upload maximum of 10 images.

If you set lifetime upload limit to 10 then your user will only be able to upload 10 images, not a single more.

If user want to change any of the image, he will need to remove previous uploads and add new ones.

Let us know if you have any doubt.

Thank you.

Thanks, OK I think I’m getting it… So, to confirm the settings I’d use to set a maximum of x10 image files per user (with a max of say 1MB per file), at any one time, yet to allow them to change the images whenever they want (by deleting one and then replacing it) the settings would look something like this:-

  1. max storage a user can use (in MB): 10 per day/10 per month/10 per lifetime
  2. max no. of files a user can use: 10 per day/10 per month/10 per lifetime

OR, more like this below? - to allow for people to make any changes they wanted at any time, yet still keeping it to a maximum of 10 image files up in their user profile at any one time…

  1. max storage a user can use (in MB): 10 per day/10 per month/10 per lifetime
  2. max no. of files a user can use: 100 per day/100 per month/10 per lifetime

Your comments much appreciated.

Hello @perfectp,

Settings would look like:

  1. max storage a user can use (in MB): 0 per day / 0 per month / 0 per lifetime
  2. max no. of files a user can use: 0 per day / 0 per month / 10 per lifetime

That means till user reach upto max limit ( max no. of files 10) he can allowed to do upload.

If you want to set total allowed file size, you can set ‘max no. of files a user can use’ and If you want limit individual file size then you need to set another upload limit in file type setting.

Attaching the screen-shot for the same.

Thank you.

Thanks pranelipatel - very clear now! It will definitely do what I need it to do. Cheers.

Hi pranalipatel,

As you’ve been so helpful and seem to know this plugin well (and are one of the plugin authors??), could I ask a small favour? Could you have a quick review of an issue I’ve reported in this forum, which I think might be a rtmedia style problem/bug but which is getting nowhere? It’s here: http://community.easyengine.io/t/bug-report-upload-button-half-hidden-on-image-upload-plugin-conflict/

Many thanks.

Hello @perfectp,

Glad to know that you got clear idea about the feature now. You are welcome !

Yes, we have replied at link you have provided.

Thank you.

Thanks heaps for that - it had become a circular discussion and was getting nowhere. Cheers.

Hi @pranalipatel,

I’ve now purchased the pro version and just working through the settings… Just want to double check that with a max number set to 10 (as in the eg above) in the media types settings, it will still allow users to upload to groups once they’ve reached their personal limit?- ie. it only restricts the number of files that they upload to their profiles?

Cheers.

Hello @perfectp,

No, this setting will keep this check globally. That is if you set ‘Maximum number of files a user can upload’ to 10 let say in daily limit, it will restrict user to upload media from profile as well as from group too. User will not be allowed to upload more than 10 medias per day. This setting is not Profile specific.

Let us know if you have any other doubts.

Thanks.

oh, that’s not what I understood. Would there be an easy work-around for this? What I thought it did was to limit the number of media uploads, as per the settings, to their profile only, but not to other Buddypress features.

We’ll be running a photo group, so I want to limit each user to 10 images in their profile in total, BUT they also need to be able to upload images to groups and for feedback and from photo tasks etc. So over a long period of time they may have hundreds of images uploaded into various groups and site galleries, so it would be very difficult for them to track these down and delete them in order to upload more.

Is there any way of setting this limit for their profile only? Though I’d still need to limit all other file uploads to a maximum file size (for eg. 1mb) and for only jpgs file types too.

Would appreciate your thoughts on this.

(…just had a thought - could i limit the no. of media shown by setting the settings > List media view > no. of media per page: to 10 and then remove the ‘load more’ icon using css in the user’s profile media page?? I realise this is a ‘hack’ and I’m not even sure this is possible, but I’m not up enough on php to change it ‘properly’.)

Just had another idea for a work-around for this problem - if I set an Album for a user to use in their profile, I can maybe limit the number of images in that album?

From what i see i think I’m correct in thinking that the default album is the one that will show up first in the user profile? If so, I could make the settings so that users can’t create albums, but can add to unlimited albums (ie. other global albums). If this is how it works then I’d just need to limit the number of media in that default album - can you suggest how I’d do this??

Looking forward to your ideas.

Hello @perfectp,

Sorry to say but what you want is not possible.

  • If you hide ‘loadmore’ , user still can upload as many pics as they want.
  • It is not possible to restrict number of media upload to default album either.

Thank you.

Hi @pranalipatel,

Thanks for your help - a real pity it doesn’t have this functionality. [quote=“pranalipatel, post:15, topic:3943”] It is not possible to restrict number of media upload to default album either. [/quote] Could this option for albums be added to a future update? as it seems quite a useful feature that others may wish to use too. Ideally be able to adjust the max number of images in each album, rather than globally.

Many thanks again.

Hi @perfectp,

We kindly suggest you to add your ideas at rtMedia https://rtcamp.com/products/rtmedia-pro/ that way we can collect such ideas from our customer and provide features in our plugins.

Thanks.

Done!

Hello @perfectp,

Thank you !