[Finding] Space limits & period time limits

Creating and modifying plugins.
Post Reply
goodgbb
Posts: 4
Joined: Wed Jul 12, 2006 5:23 pm

[Finding] Space limits & period time limits

Post 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!!! :D
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: [Finding] Space limits & period time limits

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
goodgbb
Posts: 4
Joined: Wed Jul 12, 2006 5:23 pm

Post 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.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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?
Judebert
---
Website | Wishlist | PayPal
goodgbb
Posts: 4
Joined: Wed Jul 12, 2006 5:23 pm

Post 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
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post 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?
Judebert
---
Website | Wishlist | PayPal
goodgbb
Posts: 4
Joined: Wed Jul 12, 2006 5:23 pm

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply