forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: laughtrey on October 02, 2006, 12:56:35 am

Title: Max quota to upload?
Post by: laughtrey on October 02, 2006, 12:56:35 am
Is there a way to set a maximum amount of KB to a group, not per picture? For instance, I only want users to be able to upload 1.5mb of files total, not just 1.5mb files. Is this possible?
Title: Re: Max quota to upload?
Post by: Sami on October 02, 2006, 06:29:09 am
Exist feature , take a look at group manager , below the name of each group you have Quota box
- Next time please read the documentation first ;)
Title: Re: Max quota to upload?
Post by: laughtrey on October 02, 2006, 09:23:50 pm
(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv296%2Flaughtrey%2Fquota.jpg&hash=156c4a37ab5a2d161cafd337b6ecfded54406862)

That's what's bugging me.
Title: Re: Max quota to upload?
Post by: Nibbler on October 02, 2006, 10:10:58 pm
The quota only applies to files uploaded within user galleries. The 'Space used' column displays the size of all files.
Title: Re: Max quota to upload?
Post by: laughtrey on October 03, 2006, 05:09:19 am
So is there a way to make a quota for uploading to public gallerys?
Title: Re: Max quota to upload?
Post by: Nibbler on October 03, 2006, 10:03:04 am
include/picmgmt.inc.php

Code: [Select]
$result = cpg_db_query("SELECT sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']}, {$CONFIG['TABLE_ALBUMS']} WHERE  {$CONFIG['TABLE_PICTURES']}.aid = {$CONFIG['TABLE_ALBUMS']}.aid AND category = '" . (FIRST_USER_CAT + USER_ID) . "'");
change to

Code: [Select]
$result = cpg_db_query("SELECT sum(total_filesize) FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = " . USER_ID);
Title: Re: Max quota to upload?
Post by: laughtrey on October 04, 2006, 05:55:16 am
Ok, now what?
Title: Re: Max quota to upload?
Post by: Nibbler on October 04, 2006, 12:31:42 pm
Now the quota applies to files uploaded everywhere.