Limiting Uploads per day Limiting Uploads per day
 

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]

Main Menu

Limiting Uploads per day

Started by glazzaro, February 05, 2007, 07:24:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

glazzaro

I would like to limit the number of uploads per day per user.  I read one thread here that pertained to that very question but the thread was long and a lot of changes made to the code in the thread.  Is there any that can assist me with configuring the software to limit the number of pic uploads daily?  Thank you.

Greg

Joachim Müller

Such a feature doesn't exist out-of-the-box, so you'd need to perform code changes. If there is a thread that explains it, do as suggested there, or at least post a link to the thread you're refering to.


Joachim Müller

As Nibbler suggested, the thread you're refering to deals with cpg1.3.x
Quote from: Nibbler on August 12, 2006, 12:42:47 PM
If you have 1.4 then don't apply code changes posted to the 1.3 board unless you are a coder and can understand the changes between Coppermine  versions.

Bottom line: the feature you're looking for doesn't exist. If you need it, then code it, or try to modify the hack for cpg1.3.x to make it work for cpg1.4.x. However, it goes unsupported.

RadioErewan

Changed query style from CPG 1.3 solution, and it works:

$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = ".USER_ID." AND ctime > ".time()." - (72*60*60)");
if (mysql_num_rows($result) > 0) {
cpg_die(INFORMATION, "Some information for user (now the limit is set to 72 hrs and 1 upload).<br />Experimental.");
}