coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: nacnac on January 16, 2008, 09:38:52 PM

Title: Restric upload
Post by: nacnac on January 16, 2008, 09:38:52 PM
Hello,
so, i want to restric upload of files.

I want just that the users with more than 10 post in my forum can upload pictures to the gallery.

i want to modify this function:
if (!USER_CAN_UPLOAD_PICTURES && !USER_CAN_CREATE_ALBUMS) {
   
    cpg_die(ERROR, $lang_errors['perm_denied'], __FILE__, __LINE__);
}

But i don´t find the code that execute this :(!USER_CAN_UPLOAD_PICTURES && !USER_CAN_CREATE_ALBUMS)

Thanks a lot
Sorry for my bad english.
Title: Re: Restric upload
Post by: Joachim Müller on January 17, 2008, 07:48:14 AM
The gallery is not aware how many postings your users have made on your forum. You'll have to apply a mechanism in your forum (not sure if this is possible in your forum though - it is possible in the forum software "SMF" that we use here) where users become members of a particular usergroup after having reached a certain number of postings. Then (in coppermine) you can assign permissions to upload only to that particular usergroup (as coppermine is aware of the usergroup your user is in). You don't have to hack the coppermine files to accomplish this - just specify which usergroup is allowed to upload on coppermine's groups control panel.
Title: Re: Restric upload
Post by: nacnac on January 19, 2008, 06:05:29 PM
hello,

can you say me where "coppermine" verifies !USER_CAN_UPLOAD_PICTURES ?

i want to put one more condition.

thanks
Title: Re: Restric upload
Post by: Nibbler on January 19, 2008, 06:11:17 PM
bridge/udb_base.inc.php - just search the code for it.