News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

User Attachment Quota

Started by CiQ, October 16, 2008, 08:16:23 AM

Previous topic - Next topic

[SiNaN]

I just realized that the query is in Profile.php. This should get the maximum quota:

$groups = (!empty($user_profile[$memID]['additionalGroups']) ? $user_profile[$memID]['additionalGroups'] . ',' : '') . $user_profile[$memID]['ID_GROUP'];

$getquota = db_query("
   SELECT attquota
   FROM {$db_prefix}membergroups
   WHERE ID_GROUP IN ($groups)
   ", __FILE__, __LINE__);
while ($row2 = mysql_fetch_assoc($getquota))
      $quotas[] = (int) $row2['attquota'];
$context['attquota'] = max($quotas);
mysql_free_result($getquota);
Former SMF Core Developer | My Mods | SimplePortal

CiQ

#21
thank you! This is been in next version of mod.

wt..?? i find bug in 1.11 version :(
sorry pls.

Coyote Keith

Once a user reaches their quota, can the remove items to get their space back?

CiQ

#23
Quote from: Coyote Keith on November 04, 2008, 06:44:42 PM
Once a user reaches their quota, can the remove items to get their space back?
yes. edit post and delete attachment.

2[SiNaN]:
one moment:
Should be:
$groups = (!empty($user_profile[$memID]['additionalGroups']) ? $user_profile[$memID]['additionalGroups'] . ',' : '') . (!empty($user_profile[$memID]['ID_POST_GROUP']) ? $user_profile[$memID]['ID_POST_GROUP'] . ',' : '') . $user_profile[$memID]['ID_GROUP'];
right?

well, i upload good 1.11 version with good installer (I hope)
pls test install/uninstall/upgrade this mod. if no errors, i made 1.2 version with "select the highest quota".

[SiNaN]

Quote from: CiQ on November 05, 2008, 12:03:09 AM
2[SiNaN]:
one moment:
Should be:
$groups = (!empty($user_profile[$memID]['additionalGroups']) ? $user_profile[$memID]['additionalGroups'] . ',' : '') . (!empty($user_profile[$memID]['ID_POST_GROUP']) ? $user_profile[$memID]['ID_POST_GROUP'] . ',' : '') . $user_profile[$memID]['ID_GROUP'];
right?

well, i upload good 1.11 version with good installer (I hope)
pls test install/uninstall/upgrade this mod. if no errors, i made 1.2 version with "select the highest quota".

Yeah, that would be okay.
Former SMF Core Developer | My Mods | SimplePortal

CiQ

1.2 version released (thanks to [SiNaN])

i test this mod on my web-site. I hope that it completely works.

qtime

This is a good feature to the smf software, but this will remind me to a wish I had some time ago (and still have it).
Is it possible to have this mod as an oppositte, not an upload limit, but a download limit a membergroup a day for example.

CiQ

Quote from: qtime on November 06, 2008, 03:27:52 PM
Is it possible to have this mod as an oppositte, not an upload limit, but a download limit a membergroup a day for example.
Probably, this will be other mod...
---> http://www.simplemachines.org/community/index.php?board=79.0

CiQ

Yahoo!
1.3 version coming soon! With attachments browser in profile о_О (like ?action=manageattachments;sa=browse)!


CiQ

#30
No. Only 1.1.x. support.

upd:
1.3 Released

CiQ

#31
1.3.1 - traditional bug-fix =_=

Dazza0101

Hi,

Thank you for creating and sharing this mod, it was mentioned earlier and I am also in need of this feature, is to be able to control the file size limit for a particular user or user group.

Any help is greatly appreciated,

Dazza0101. :)
My new electronics forum.
http://www.silicontronics.com
For the electronic engineer to anyone who has an interest in electronics.

qtime

I hope this will also be available for smf 2

CiQ

I hope too. But it will not be fast.

nopity4u

I'd like to second the request for download limits added to this mod :)

I used to know of an quota type mod but it has somehow seemed to have disappeared.

ceewee

The admin is excluded I see, would like to see on profilepage what the 2 admins of my board have uploaded compared to other membergroups , is that easy to change in the code?

Couldn't enter data in the fields of membergroup.

CiQ

Quote from: ceewee on June 27, 2009, 08:25:20 AM
The admin is excluded I see, would like to see on profilepage what the 2 admins of my board have uploaded compared to other membergroups , is that easy to change in the code?

Couldn't enter data in the fields of membergroup.
try comment this code in Profile.template.php:
if ($context['show_attachment_quota'])
get
//if ($context['show_attachment_quota'])
Now you will see attachment statistics in admin's profile.

ceewee

Quote from: CiQ on June 27, 2009, 04:18:38 PM
Quote from: ceewee on June 27, 2009, 08:25:20 AM
The admin is excluded I see, would like to see on profilepage what the 2 admins of my board have uploaded compared to other membergroups , is that easy to change in the code?

Couldn't enter data in the fields of membergroup.
try comment this code in Profile.template.php:
if ($context['show_attachment_quota'])
get
//if ($context['show_attachment_quota'])
Now you will see attachment statistics in admin's profile.

Nice THX

CiQ

QuoteNow you will see attachment statistics in admin's profile.
Now all users will see attachment statistics in all profiles.  :P

Advertisement: