Log in

View Full Version : Attachment Size on Usergroup


gfxhavenowner
08-26-2004, 12:31 AM
Asked about this at VB.com, they said try here.

I'm looking for a hack that would allow me to configure custom upload sizes through the ACP. For example, I want to be able to upload files up to 10 meg, but I only want admins to be able to use this option. Any thoughts?

gfxhavenowner
08-26-2004, 06:38 PM
I can't be the only person who would want this hack....

Bison
08-27-2004, 03:24 AM
I'd like to have it, but I just don't have the time to create this hack. This would certainly become the *Hack of the Month*, easily...

Logikos
08-30-2004, 03:05 AM
isn't there something like this allready in the acp?

Beermonster
08-30-2004, 07:39 AM
isn't there something like this allready in the acp?

Isn't it Usergroup Manager/Attachment Permissions

kall
08-30-2004, 11:05 AM
Isn't it Usergroup Manager/Attachment Permissions
He might be meaning 'per file/per usergroup attachment pemissions'.

At the moment, we can say that a jpg can be a maximum size, but it is a global thing, not configurable per usergroup.

It would be an ultra simple hack, if that was what he was asking for...

CarCdr
08-30-2004, 12:16 PM
The maximum size allowable will be dictated by PHP, through the .ini settings for

upload_max_filesize
post_max_size

One could retrieve these values, take the minimum of the two, and call this the "max allowable size".

Then, in the function process_upload (functions_file.php), the line:

$maxattachsize = $attachtypes["$extension"]['size'];

could be changed to use this "max allowable size" for any upload if the user is a member of one the privileged groups.

Logikos
08-30-2004, 07:23 PM
Either way, like Log sad. Would have tyo own a dedicated server to do this.

kall
08-30-2004, 07:26 PM
Either way, like Log sad. Would have tyo own a dedicated server to do this.
Err...what? Who said what where?

(Also, I am intrigued by your banner...what is Wed Design?)