Download Quota

Started by rd, June 29, 2009, 09:25:56 AM

Previous topic - Next topic


Link to Mod

Download Quota

Previously Written by: Arantor   
Current version: 1.3
Updates: Mod support topic
Suitable for: SMF 1.1.11, 2.0 RC2, 2.0 RC3Supported languages:

Link to Mod | Mod support topic |


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.


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
How Do I Modify Files?


Questions should be address to the mod support topic. Anything that is a bug or feature request can posted on the mod support topic.


Please uninstall this mod before updating.


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)



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??


I have the "old" version, is it just uininstall, install new version?



Arantor you have now 2 requests for you to port this to smf 2.0 :)


Good you consider it (smf 2 version)


Is there a way to display the actual download of a member that day in kb? or %?


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?


the max limit is 4294967295 (4,2 gig), I need it as 10 gig, is that possible?

Is it correct 4,2 gig?


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?


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.


Any idea when updating for smf 2?


ok thanks for your quick reply, the 4 gig is less important for me, but smf2 will be much appreciated / donated :).


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...


how to manage other membergroups? i mean to setting the quota... i used non default themes


Hi Arantor:

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


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 :)
SMF ... SimpleMachines ... Simple, but complete if you want it ;)


@ diegolyanky what kind of mod you are using at your site? (if it's smf).



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


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. :)
SMF ... SimpleMachines ... Simple, but complete if you want it ;)



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

Let me know trought PM if are you interested :)

SMF ... SimpleMachines ... Simple, but complete if you want it ;)