Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: rd on June 29, 2009, 09:25:56 AM

Title: Download Quota
Post by: rd on June 29, 2009, 09:25:56 AM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1897)

Download Quota






Previously Written by: Arantor (http://www.simplemachines.org/community/index.php?action=profile;u=53626)   
Current version: 1.3
Updates: Mod support topic (http://www.simplemachines.org/community/index.php?topic=320988.0)
Suitable for: SMF 1.1.11, 2.0 RC2, 2.0 RC3Supported languages: (https://www.simplemachines.org/site_images/lang/english.gif) (https://www.simplemachines.org/site_images/lang/english_british.gif)

Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1897) | Mod support topic (http://www.simplemachines.org/community/index.php?topic=320988.0) |





Summary

This mod allows you to set download quotas per day for your users, instead of uncapped download ability (the default SMF behaviour)

Mod Defaults

Administrators = No quota
Global Moderators = No quota
Moderators = 10 MB

Other Groups = 0 MB

In other words, most user groups will have to have to values modified.


Any download that would put a user over their quota is not allowed - this adds a note to the forum error log.

Quotas are in KB rather than bytes as of version 1.2 of the mod.


Installation

Package Manager
should work in most cases.  Manual edits may be needed for themes that modify the Admin Panel / Manage Membergroups area; all other edits are generic (language files) or core source files.

Useful links
Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)

Support

Questions should be address to the mod support topic (http://www.simplemachines.org/community/index.php?topic=320988.0). Anything that is a bug or feature request can posted on the mod support topic.

Updating

Please uninstall this mod before updating.

Changelog

1.3 - March 15, 2010 Updated for RC3

1.2 - December 29, 2009
Updated for 1.1.11 and 2.0 RC2
Also added support for displaying quota on user profiles
Quotas now measured in KB not bytes, meaning the maximum file that can be tracked is theoretically 4TB

1.1 - July 30, 2009
Updated for 1.1.10

1.0 - June 26, 2009
Initial release

Files modified by Download Quota

Sources/Display.php (where the download is handled)
Themes/themedir/languages/Modifications.english.php (for the text in the Admin panel)
Themes/themedir/languages/Errors.english.php (for the 'You have exceeded your quota' error)
Themes/themedir/ManageMembergroups.template.php (for the control panel)
Sources/ManageMembergroups.php (for managing the DB changes)
Sources/Profile.php (1.1.x, when viewing the profile, for getting quota)
Sources/Profile-View.php (2.0, when viewing the profile, for getting quota)
Themes/themedir/Profile.template.php (for showing the quota)
Title: Re: Download Quota
Post by: Afro on June 29, 2009, 06:49:33 PM
no link to mod
Title: Re: Download Quota
Post by: qtime on July 05, 2009, 11:31:16 AM
wow many thanks, I was waiting for this mod for a long time, even bought vB for this function.
But like to see this working on smf2, any change??
Title: Re: Download Quota
Post by: ceewee on July 07, 2009, 01:42:22 PM
I have the "old" version, is it just uininstall, install new version?
Title: Re: Download Quota
Post by: MF30 on July 07, 2009, 08:01:35 PM
good work. ;)
Title: Re: Download Quota
Post by: aED on July 07, 2009, 09:22:34 PM
Arantor you have now 2 requests for you to port this to smf 2.0 :)
Title: Re: Download Quota
Post by: qtime on July 24, 2009, 04:52:41 PM
Good you consider it (smf 2 version)
Title: Re: Download Quota
Post by: qtime on August 12, 2009, 06:13:04 PM
Is there a way to display the actual download of a member that day in kb? or %?
Title: Re: Download Quota
Post by: qtime on August 12, 2009, 06:36:36 PM
Quote from: Arantor on August 12, 2009, 06:35:19 PM
qtime: no. It is on the to-do list though.
ok thanks for your fast reply, so you still working on this mod?
Title: Re: Download Quota
Post by: qtime on August 15, 2009, 02:22:49 PM
the max limit is 4294967295 (4,2 gig), I need it as 10 gig, is that possible?

Is it correct 4,2 gig?
Title: Re: Download Quota
Post by: qtime on August 15, 2009, 02:54:40 PM
Quote from: Arantor on August 15, 2009, 02:51:18 PM
Yes, the limit is 4.2GB.

You're allowing 10GB per day a limit? That's some serious bandwidth you have if multiple users can each download > 10 GB of attachments in a day.

Off the top of my head, you should just be able to modify the column in MySQL to a bigint.
thanks for fast reply
I was searching in the smf_membergroups table, where to search/find?
Title: Re: Download Quota
Post by: qtime on August 15, 2009, 04:49:23 PM
GREAT, for now it's perfect!!! 4 gig is a lot. I use this to avoid password sharing and giving the content.

This is a great job. I don't see many replies, it's much used in VB as a plugin.
Title: Re: Download Quota
Post by: qtime on September 01, 2009, 04:06:33 PM
Any idea when updating for smf 2?
Title: Re: Download Quota
Post by: qtime on September 01, 2009, 04:23:09 PM
ok thanks for your quick reply, the 4 gig is less important for me, but smf2 will be much appreciated / donated :).
Title: Re: Download Quota
Post by: Metal_13 on September 16, 2009, 11:48:32 PM
Please make an smf2 version... this mod is a must have for me... my forum has 120GB+ attachments... i really need this... pls pls pls...
Title: Re: Download Quota
Post by: motomaniacs on November 28, 2009, 10:20:27 AM
how to manage other membergroups? i mean to setting the quota... i used non default themes
Title: Re: Download Quota
Post by: diegolyanky on December 08, 2009, 09:22:24 AM
Hi Arantor:

Nice MOD, and very usefull. I think will be better if you put in the top below welcome message the download limits.

Example:

Hi, Admin. You have X messages and X are new.
You have 5000 Kb. remaining for downloads of a total of 10000 per day.

That's will be GREAT ... ;)

I have a similar MOD on my web and it's very usefull for members, so they can administrate their downloads.

Thanks a lot for reading :)
Title: Re: Download Quota
Post by: qtime on December 08, 2009, 09:24:13 AM
@ diegolyanky what kind of mod you are using at your site? (if it's smf).
Title: Re: Download Quota
Post by: diegolyanky on December 08, 2009, 10:02:26 AM
QTIME:

Yes, is SMF ... It's a mod developed specially for me. Like this mod, but with some more features.

Arantor:

Thanks a lot for your reply. I understand you, but if you make a MOD you must make time to maintain that mod. If you have not time, then make it !! ... ( it's just a joke ;) ) ...

Only was a comment, I know you will do it when you have time. :)
Title: Re: Download Quota
Post by: diegolyanky on December 08, 2009, 12:19:29 PM
 ;)

I also need a "Personal MOD Developer" ( paid ;) )

Let me know trought PM if are you interested :)

Title: Re: Download Quota
Post by: raelpsf on January 03, 2010, 10:01:30 PM
Have any possible to change MB for number of files?

For exemple:

You can download 3 files per day.. it does not matter the files size..

Because in my forum i have lite files (100kb) and big files (10mb).. and if i set 10mb quota, 1 user can download 1 file only, and other can download (maybe) 100 files..
Title: Re: Download Quota
Post by: raelpsf on January 04, 2010, 12:07:10 AM
is a big modification? or is simple? i dont have a idea.. but, anyway, i love this mod.. tks.. maybe in the next future, anyone made this changes.. :P

Tks guys, and sorry for bad english....

:D

Happy new year!!!  8)
Title: Re: Download Quota
Post by: mikungfu on January 12, 2010, 09:39:40 PM
I uploaded the mod to the packages folder but... Strangely enough I don't see any [Apply Mod] link. Just [ List Files ] [ Delete ]... Any ideas about why that is?

Thanks in advance!
Title: Re: Download Quota
Post by: mikungfu on January 12, 2010, 10:59:23 PM
Thanks for the quick reply! :)

Mod version 1.2 (latest) and SMF 1.1.10.
Title: Re: Download Quota
Post by: rd on January 13, 2010, 12:20:07 AM
This mod only supports 2.0RC2 and 1.1.11 and it will only be updated when the next release of SMF comes out(I hope in the summer).

Title: Re: Download Quota
Post by: mikungfu on January 13, 2010, 01:28:27 AM
Does that mean that by updating the Mod to fit SMF 1.1.11 it stops working with the previous version of SMF? Isn't the mode backwards compatible? Not even to the previous version? Why aren't earlier Mod versions available?

One shouldn't be forced to update SMF... If an older version od the Mod existed and was compatible with 1.1.10, then it should still be available IMHO.

Title: Re: Download Quota
Post by: mikungfu on January 13, 2010, 08:55:00 AM
Thanks for pointing out this solution! :)

It's not like I won't be upgrading to 1.1.11... I should be doing that in a near future. I even have tried to do so already but bumped into several obstacles. The upgrade failed for the already well known error in Subs.php and I have several Mods that use Subs.php.

Therefore I believe I will have to wait untill I have time (maybe a whole day) just to perform this update and overcome all the predictable obstacles. I have a live website with more than 3000 members and considerable activity... I can't afford to jam my website and have to leave it jammed for a long period.
Title: Re: Download Quota
Post by: ceewee on February 20, 2010, 09:04:19 AM
Quote from: mikungfu on January 13, 2010, 01:28:27 AM
Does that mean that by updating the Mod to fit SMF 1.1.11 it stops working with the previous version of SMF? Isn't the mode backwards compatible? Not even to the previous version? Why aren't earlier Mod versions available?

One shouldn't be forced to update SMF... If an older version od the Mod existed and was compatible with 1.1.10, then it should still be available IMHO.


I have the orginal version 1.0 for 1.1.9 (paid arantor for it) that works also on 1.10. Because board has problems updating to 1.11 I just wait, don't want smf 2.0 and losing my mods I appriciate more then the changes made to smf, which are often conflicting with mods.
Title: Re: Download Quota [Updated For RC3]
Post by: rd on March 14, 2010, 05:53:57 PM
This modification has been updated to version 1.3, now working in SMF 2.0 RC3!
Title: Re: Download Quota [Updated For RC3]
Post by: fantasydirtracing on March 14, 2010, 05:55:23 PM
I upgraded to the latest version of this mod, it is working on my homepage but I am receiving this error when I try to access it in the admin
Fatal error: Cannot redeclare modifysitemapsettings() (previously declared in /home/fantasy1/public_html/forum/Sources/ManageSettings.php:2042) in /home/fantasy1/public_html/forum/Sources/ManageSettings.php on line 2104
Title: Re: Download Quota [Updated For RC3]
Post by: rd on March 14, 2010, 06:25:19 PM
That's a problem with Sitemap (I think). I think you should ask for support there.

You can also uninstall this mod and try to log in again.

What version of SMF are you running?
Title: Re: Download Quota [Updated For RC3]
Post by: ~Dragon~ on March 14, 2010, 06:31:03 PM
I have problem something wrong happened. I wonder update RC3 is better. who help me someone fix on website problem, I don't know how fix on something wrong problem. I am struggle on someting wrong RC3 I need update I have who is specialist to help me let know me solve my update RC3 I am consider?
Title: Re: Download Quota [Updated For RC3]
Post by: rd on March 14, 2010, 06:33:29 PM
@smithtr: Can you explain your problem? Are you getting any errors? Did the mod install correctly?
Title: Re: Download Quota [Updated For RC3]
Post by: ~Dragon~ on March 14, 2010, 07:55:26 PM
I have old, can I install to RC3?
;D
Title: Re: Download Quota [Updated For RC3]
Post by: rd on March 14, 2010, 08:06:15 PM
Quote from: smithtr on March 14, 2010, 07:55:26 PM
I have old, can I install to RC3?
;D

Yes, this mod works in SMF 2.0 RC3. You can install and it should work flawlessly.
Title: Re: Download Quota [Updated For RC3]
Post by: ~Dragon~ on March 14, 2010, 08:47:52 PM
I have trouble on update somethig not work?
Title: Re: Download Quota [Updated For RC3]
Post by: rd on March 14, 2010, 09:00:27 PM
What's the problem? What's your forum URL?
Title: Re: Download Quota [Updated For RC3]
Post by: ~Dragon~ on March 15, 2010, 12:32:46 AM
my website is http://www.deafhardhearing.smfnew.com is that is why check development Deaf and hard hearing Support. I don't know try fix on install how do you know I am not sure what is do nothing I have try help someone join me fix support.. I need to install RC3 smooth I let know you help me fix thank..
Title: Re: Download Quota [Updated For RC3]
Post by: steve51184 on March 19, 2010, 09:56:45 PM
i'm curious what is this for and why would anyone need it?
Title: Re: Download Quota [Updated For RC3]
Post by: steve51184 on May 30, 2010, 07:23:21 PM
Quote from: Arantor on March 19, 2010, 09:58:12 PM
To stop people downloading your attachments to converse your bandwidth?

To be able to host lots of big files but make people wait to be able to download them to pace out bandwidth usage?

/me doesn't really know, doesn't care, wrote it last year as a paid request.

how much do you change for paid requests?
Title: Re: Download Quota [Updated For RC3]
Post by: aw06 on February 10, 2011, 10:40:02 AM
Will this install on 1.1.12
Title: Re: Download Quota [Updated For RC3]
Post by: aw06 on February 10, 2011, 11:13:22 AM
So in the package-info

Change
<install for="1.1.11">

To
<install for="1.1.12">

Quote from: Arantor on February 10, 2011, 11:03:15 AM
IIRC I used a generic version number in this one originally that should work on any 1.1.x version.

How do i do that ?
Title: Re: Download Quota [Updated For RC3]
Post by: aw06 on February 10, 2011, 11:16:50 AM
ok, will give it a go .. thanks...
Title: Re: Download Quota [Updated For RC3]
Post by: aw06 on February 10, 2011, 12:34:56 PM
Quote from: Arantor on March 19, 2010, 09:58:12 PM
To stop people downloading your attachments to converse your bandwidth?

To be able to host lots of big files but make people wait to be able to download them to pace out bandwidth usage?

/me doesn't really know, doesn't care, wrote it last year as a paid request.

I have another Ques  :-\ With regards to download quota that this mod can limit, are they talking the overall loading of images/attachments ??? or is it specifically dealing with people using right click, save image as ???
Title: Re: Download Quota [Updated For RC3]
Post by: aw06 on February 10, 2011, 06:45:06 PM
Hmm... ok, not gonna be of much use to me then .. will just prevent guest from viewing attachments which should also present hot-linking to posted pics
Title: Re: Download Quota [Updated For RC3]
Post by: aw06 on February 10, 2011, 06:52:48 PM
Quote from: Arantor on February 10, 2011, 06:45:43 PM
*shrug* I wrote this because someone asked me to, not because it was useful to anyone else.

O ok, never realized you were the original author, well it has good use, just that limited registered members on my site would be kinda unfair, but i definitely see the uses in many other situations.

Ad the option to let it detect save file as and this would be money :O)
Title: Re: Download Quota [Updated For RC3]
Post by: aw06 on February 10, 2011, 06:58:35 PM
Quote from: Arantor on February 10, 2011, 06:56:15 PM
QuoteAd the option to let it detect save file as and this would be money :O)

Not possible to do reliably.

Owell ... kool
Title: Re: Download Quota [Updated For RC3]
Post by: qtime on February 14, 2011, 11:42:00 AM
How to deal with settings for guests? They are not in the list of membergroups
Title: Re: Download Quota [Updated For RC3]
Post by: qtime on February 14, 2011, 12:14:05 PM
Quote from: Arantor on February 14, 2011, 11:53:20 AM
There's no way to give guests a quota since there's no good way to track them.
ok, maybe the same way as this modification http://custom.simplemachines.org/mods/index.php?mod=1290

but I understand the problem.
Title: Re: Download Quota [Updated For RC3]
Post by: solfegio on June 16, 2011, 11:00:36 AM
waiting for SMF 2 gold
Title: Re: Download Quota [Updated For RC3]
Post by: ceewee on June 25, 2011, 06:12:37 PM
Quote from: aw06 on February 10, 2011, 06:52:48 PM
Quote from: Arantor on February 10, 2011, 06:45:43 PM
*shrug* I wrote this because someone asked me to, not because it was useful to anyone else.

O ok, never realized you were the original author, well it has good use, just that limited registered members on my site would be kinda unfair, but i definitely see the uses in many other situations.

Ad the option to let it detect save file as and this would be money :O)

He wrote it for me, now I'm in the process of updating to rc3 and forgot to uninstall the old version (manually because it had no uninstall), and get modification parse errror when installing your package.

Have to check what old settings it used, delete those and see if your package works....grrrrr
Title: Re: Download Quota [Updated For RC3]
Post by: musicus on March 03, 2012, 06:01:30 AM
Please update it vor 2.02 or later
Title: Re: Download Quota [Updated For RC3]
Post by: hardcorps on November 05, 2012, 11:06:21 AM
Just a note, I realise this mod is old and unsupported.

Downloaders should know there's a bug that took a while to surface: any member with 0 download quota, such as guests or new members, will eventually start seeing forum Avatars disappear.

EDIT: Ignore me, I've just figured out the prob. This happens because Avatars are stored in the attachments folder by default, which is where the quota limit reads from. Doh!

I've just gone into attachement settings and created a new URL path for avatars to be stored in, and reuploaded. So far so good. Apologies for bumping an old thread, hopefully this will help someone who encounters the same prob.
Title: Re: Download Quota [Updated For RC3]
Post by: painkiller5758 on February 10, 2013, 07:45:16 AM
how can we change the daily limit to monthly limit.. can anyone help. :)
Title: Re: Download Quota [Updated For RC3]
Post by: Arantor on February 11, 2013, 12:32:31 AM
Not without some fairly nasty changes. It's all designed around a daily limit.
Title: Re: Download Quota [Updated For RC3]
Post by: painkiller5758 on June 09, 2013, 04:22:38 AM
Any one successful in making daily limit to monthly limit 8), anyone have an idea regarding this which you could share with me to make it to monthly limit ??  :)
Title: Re: Download Quota [Updated For RC3]
Post by: Biology Forums on March 18, 2014, 06:31:47 PM
Let's say we choose 1000 kb. What if the upload it 1200 kb, does that mean they will never be able to download that file?
Title: Re: Download Quota
Post by: diegolyanky on April 07, 2020, 11:36:08 AM
Hi Arantor:

I need to disable download quota from an specific boards ...

How can I do it? I am using SMF 2.0RC3 version.

Thanks a lot!


Title: Re: Download Quota
Post by: Diego Andrés on April 07, 2020, 09:04:58 PM
The mod works per user, not per board. Or at least that says on the description.
Title: Re: Download Quota
Post by: Arantor on April 22, 2020, 12:09:55 PM
You'd have to completely rewrite it to do that.