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: Users Daily upload Limit  (Read 4272 times)

0 Members and 1 Guest are viewing this topic.

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Users Daily upload Limit
« 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.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Users Daily upload Limit
« Reply #1 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

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Re: Users Daily upload Limit
« Reply #2 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)
Logged

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Re: Users Daily upload Limit
« Reply #3 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
Logged

Nibbler

  • Guest
Re: Users Daily upload Limit
« Reply #4 on: November 08, 2006, 03:46:54 pm »

Code: [Select]
$result = cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_PICTURES']} WHERE owner_id = " . USER_ID . " AND ctime > UNIX_TIMESTAMP() - 86400");
Logged

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Re: Users Daily upload Limit
« Reply #5 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
Logged

ibanez

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 47
  • Thanks Coppermine
    • Foto Kafe
Re: Users Daily upload Limit
« Reply #6 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
Logged

Nibbler

  • Guest
Re: Users Daily upload Limit
« Reply #7 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
MOVED: not admin
« Reply #8 on: November 12, 2006, 09:40:06 am »

Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 21 queries.