Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Restric upload  (Read 2857 times)

0 Members and 1 Guest are viewing this topic.

nacnac

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Restric upload
« 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Restric upload
« Reply #1 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.
Logged

nacnac

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Restric upload
« Reply #2 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
Logged

Nibbler

  • Guest
Re: Restric upload
« Reply #3 on: January 19, 2008, 06:11:17 pm »

bridge/udb_base.inc.php - just search the code for it.
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 15 queries.