Page 1 of 1
[Finding] Space limits & period time limits
Posted: Wed Jul 12, 2006 5:34 pm
by goodgbb
I want the plugin that able to
- specify the space size for public users
- specify the user expiration time
Yes, it's for multiple public users.
Please give me some advice~
Thank you so much!!!

Re: [Finding] Space limits & period time limits
Posted: Wed Jul 12, 2006 5:41 pm
by garvinhicking
Hi!
Uhm, what "space size" do you mean? For uploaded pictures? IF so, you can use the plugin API hook "backend_media_makethumb" or "backend_image_add". There you can check for the currently used user, check the disk space requirements and report an error message, for example.
The user expiration time could be checked onn execution of the "backend_auth" and/or "backend_configure" hooks. This is fired for each login. s9y does not store the time where a user account was created, so you would need to keep track of that individually by storing the timestamp of the first login (using that same hook)
This would be not so terribly hard to do, but definitely some work is involved. I can try to help you if you have specific questions or want to show me some code of what you're trying if you face problems.
Best regards,
Garvin
Posted: Wed Jul 12, 2006 6:20 pm
by goodgbb
Sorry about my English.
Thank you for super fast reply
About "space size"
I mean that the storage size of all media files that 1 user can upload to the server. Such as 1 user can keep files on server only 10MB.
Posted: Wed Jul 12, 2006 10:11 pm
by judebert
Do you want users to expire after some time since the account was created, or some period without logging in? We probably don't want to remove users from the database, since then someone else could take over their user name and spoof their comments; do you want some way for a user to unexpire himself?
Posted: Thu Jul 13, 2006 6:19 am
by goodgbb
Dear judebert,
Example:
- All users get 10MB after signup.
- We can specify a user to get 100MB for 1 month
- All users will not get remove
Posted: Thu Jul 13, 2006 1:13 pm
by garvinhicking
Hi!
Yes, you can do that space limitation with a plugin hooking on the hooks/events I mentioned. You can then simply block upload once the space is used up.
Of course some individual coding is involved, but since your service sounds a tad commercial I'm guessing you can do that coding?
Best regards,
Garvin
Posted: Thu Jul 13, 2006 4:12 pm
by judebert
This does sound specific to commercial sites. Then again, perhaps it could be useful to some open-source or peer-to-peer style site.
So the "expire" is to expire the quota. I assume that the user must then delete files until he's below quota, or get his quota expanded again?
Posted: Fri Jul 14, 2006 11:49 am
by goodgbb
Thank you for your posting, garvinhicking & judebert
I think that I have found what I am looking for.
It should be useful for someone who finding it.
Just go to this website then try it.
http://drupal.org/
Why?
1. It's awesome and not too hard to install.
2. It's great to manage multiple public users.
3. Easy to manage them without messy things.
Posted: Fri Jul 14, 2006 11:57 am
by garvinhicking
Hi!
Yes, for community sites like you intend to run, Drupal might be more suitable. However it lacks other things that s9y has, like a decent media database, good blogging capabilities and a nicer interface and not so cluttered extensions.
Have fun,
Garvin