Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
sonny  
#1 Posted : Wednesday, March 14, 2007 9:07:43 PM(UTC)
sonny

Rank: Member

Groups: Member
Joined: 9/9/2006(UTC)
Posts: 22

Hi,

I have modified the index.php to do the following.

Ive set the user quota to 20 images for a particular user. To do this ive created a DB table (mysql) which holds the user quota value and the images and number of images a particular user has uploaded. The first time this works great, because there arent any pics and the user can select 20 images. It gives a warning and doesnt allow the user to add any more images.

With the above , i uploaded 20 images. At the this point the user quota has been met. Now for this user, before he can upload any more pics, i get all the values from the database and take the number he has uploaded and the max number subtract and that is now the user quota. So say i uploaded 15. I should have 5 left. Again this bit works and stops the user after he has selected 5 images.

What i cant get working is if the user already uploaded 20. His user quota now is 0. So i set the value for MaxFileCount =0. But this doesnt stop the user from selecting images. In fact he can select as many as he wants. i tried '0' and '-1' but they seem to allow the user to continue selecting images. Is there a way to stop this from happening?

thanks Sonny

thanks in advance,

Sonny

philduhs  
#2 Posted : Thursday, March 15, 2007 3:58:58 AM(UTC)
philduhs

Rank: Member

Groups: Member
Joined: 1/21/2007(UTC)
Posts: 6

Could you just use the knowledge that the user isn't allowed to upload any more images to disable image uploading altogether (with an appropriate message on the page), ie. not even show the ImageUploader?

Phil

Alex Makhov  
#3 Posted : Thursday, March 15, 2007 3:19:19 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Zero value is the default value for this parameter which means no restriction. I think you should replace Image Uploader insertion code with some another content if the user is not allowed to upload any more photos.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.