forum.coppermine-gallery.net

Support => Older/other versions => cpg1.3.x Support => Topic started by: InovaAngel on August 25, 2004, 11:16:55 am

Title: Different membergroups with different max filesize?
Post by: InovaAngel on August 25, 2004, 11:16:55 am
I'm in the process of installing and setting up Coppermine for the first time, and there was something I would like to do, but haven't found the how for, or even if it's possible. I've searched around the boards in several forums, but I can't find anyone asking the same thing.


Is it possible to have the maximum filesize for uploading be different for different members/groups?

(For instance, have members who can only upload files for regular avatars, and others who have the right to upload fullscale pictures.)

If it's not something that can be done from within the program, is there a way to change the code to make this work?


I admit I don't know much about php, but a lot can be learned from trial and error, and since I don't have much uploaded yet, I won't be ruining for anyone else if I experiment now rather than later. ^_^ Can anyone help?
Title: Re: Different membergroups with different max filesize?
Post by: Joachim Müller on August 25, 2004, 06:53:49 pm
No need to learn PHP for this - you can set all this using the coppermine user interface. Quota is handled in coppermine using group permissions. You can create as many groups as you need in groups manager (admin menu) and assign quotas to those groups. I recommend you set the quota to a very low value for the built-in group "Registered" and create an additional group "Privileged", assigning them a higher quota. Then put those users who are meant to have more webspace into the privileged group.

GauGau
Title: Re: Different membergroups with different max filesize?
Post by: InovaAngel on August 25, 2004, 07:13:21 pm
I see I may have misunderstood the use of the Quota - I believed that was for how much space total the users of that group was allowed, not the individual filesizes. Problem solved, then. Thanks. ^^

I'm still waiting for the switchover of my domain-name to go through, so I can't install and start fiddling around hands-on with Coppermine just yet, only read up in the documentation on how it works. I can hardly wait! ^__^
Title: Re: Different membergroups with different max filesize?
Post by: Nibbler on August 25, 2004, 09:16:19 pm
Quota refers to total file space. There is no way to limit the size of a pic that can be uploaded on a group by group basis, but it shouldn't be too hard to code it in.
Title: Re: Different membergroups with different max filesize?
Post by: InovaAngel on August 26, 2004, 10:18:34 am
Aah, so I didn't misunderstand then. I suppose I need to find someone who knows enough to be able to do that coding - is there anyplace else I should post that request?

Thanks both of you for helping!
Title: Re: Different membergroups with different max filesize?
Post by: Joachim Müller on August 26, 2004, 10:27:50 am
If nobody agrees to do this for free, the place to look for paid help is http://forum.coppermine-gallery.net/index.php?board=30.0

GauGau
Title: Re: Different membergroups with different max filesize?
Post by: InovaAngel on August 27, 2004, 09:23:27 am
Oh well, the only pay I could provide at the moment is making a drawing, so I guess that's out of the question. ^^;; If nothing else, I'll just have to have two installations of Coppermine and have people join each separately.

But being hopeful, (and you didn't say where to else to do it, so profuse apologies beforehand if I'm out of line by this), I guess I'll make the request here:

Is there anyone who can do the coding for what I described in the first post?
Quote
Is it possible to have the maximum filesize for uploading be different for different members/groups?

(For instance, have members who can only upload files for regular avatars, and others who have the right to upload fullscale pictures.)

If it's not something that can be done from within the program, is there a way to change the code to make this work?
Title: Re: Different membergroups with different max filesize?
Post by: kegobeer on September 02, 2004, 02:22:00 am
I just completed this mod for Coppermine 1.3.2.  The max file size is now controlled in the groups panel, and each group can have it's own max file size.

I'm still doing some testing to make sure I have all the bugs ironed out.  Once it's done, I'll post the mod in the mods/hacks board.
Title: Re: Different membergroups with different max filesize?
Post by: kegobeer on September 02, 2004, 07:50:54 am
I revised the mod a bit to include max width and height in the groups panel also, since your post indicated you'd like to restrict to things like avatars, which are typically small.

Should be posted and available soon.

[edit]
It's available and posted on the Mods/Hacks board.
[/edit]
Title: Re: Different membergroups with different max filesize?
Post by: InovaAngel on September 02, 2004, 09:41:59 pm
Thank you so much! I've added it to my install of Coppermine, and so far no problems in sight. The height/width function is a great bonus, and matches exactly what I'm after. Again, thanks!

(Just in case anyone should do a search for the same thing and come across this thread instead of the other one, I thought I'd link it:
http://forum.coppermine-gallery.net/index.php?topic=9578.0)