[sql]ALTER TABLE user ADD downloadcount INT (5) DEFAULT '0' NOT NULL[/sql]
[high]attachment_start[/high]
PHP Code:
$downloadlimit = 10;
if ($vbulletin->userinfo['downloadcount'] > $downloadlimit) {
eval(standard_error(fetch_error('dlquotareached')));
exit;
} else {
$db->query_write("UPDATE user SET downloadcount = downloadcount + 1 WHERE userid = $vbulletin->userinfo['userid']");
}
Untested but should work - Then create a cron job to reset downloadcount = 0
[high]dlquotareached[/high]
Code:
You have already downloaded the maximum number of attachments for today. Please try again tomorrow!
Chris