coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 upload => Topic started by: ibanez on November 02, 2006, 02:14:27 PM

Title: Users Daily upload Limit
Post by: ibanez on November 02, 2006, 02:14:27 PM
Hi ;

At first I read all quota topics in forum about users.But i have a different queston about users limitation.How can i set for all user's upload limit per a day.For example i want to set as  " all users would send a only 1 photo per a day  (not depend on a file size) "..I would like to explain that I try to set all  1.3 version codes to solve this problem..But it didnt work and given an error.

How can I solve this problem..Is it possible to make like this quota?

Thanks for all interest.
Title: Re: Users Daily upload Limit
Post by: Stramm on November 02, 2006, 03:03:58 PM
here's interesting reading for you... you'd need to modify the query to include the timestamp. Shouldn't be a problem

http://forum.coppermine-gallery.net/index.php?topic=32016.20
Title: Re: Users Daily upload Limit
Post by: ibanez on November 08, 2006, 12:58:08 AM
Thank you for interests,
But I don't no mysql,php code.Please help me step by step
Thanks.

(my english not good sory)
Title: Re: Users Daily upload Limit
Post by: ibanez on November 08, 2006, 02:55:00 PM
How can I modify the query to include the timestamp? Cause I want to say that I am not a proffesional on the Php and MSQL...I read topic which is sent by link from your side but I seen that users can upload only one photo...But I want to set my site as daily upload limit is one photo per all users.FOR EXAMLPE:One user can be upload a photo today..If he wants to upload a photo again during the same day.System must doesnt give permission to this user.But he (same user) can upload second photo tomorrow..
Please tell me, how can I set the system like that description on the above.
Best regards
Title: Re: Users Daily upload Limit
Post by: Nibbler on November 08, 2006, 03:46:54 PM
$result = cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = " . USER_ID . " AND ctime > UNIX_TIMESTAMP() - 86400");
Title: Re: Users Daily upload Limit
Post by: ibanez on November 08, 2006, 04:15:30 PM
Thank you for your reply but where can I put this code in the coppermine..and whats the difference in the MYSQL table.
King regards
Title: Re: Users Daily upload Limit
Post by: ibanez on November 12, 2006, 01:23:53 AM
Thank you for your reply but where can I put this code in the coppermine..and whats the difference in the MYSQL table.
King regards
Title: Re: Users Daily upload Limit
Post by: Nibbler on November 12, 2006, 02:53:55 AM
Read the mod referred to above and use the code I gave you instead of the $result = ... in the original code.
Title: MOVED: not admin
Post by: Joachim Müller on November 12, 2006, 09:40:06 AM
Unrelated reply split and moved to http://forum.coppermine-gallery.net/index.php?topic=38366.0 (http://forum.coppermine-gallery.net/index.php?topic=38366.0)