Forums | Mahara Community

Developers /
Tip: Profile icons & quota

anonymous profile picture
Account deleted
Posts: 117

18 July 2009, 18:36

Here's a little tip:  If you don't want profile icons to count towards a user's quota, you just need to comment out the following code in artefact/file/profileicons.php and that's it.  I personally would like it if photos counting towards the quota was a configuration option in future versions of Mahara. Since photos are usually relatively small and only 5 are allowed, I don't think it's really necessary to count them towards the quota (maybe that's just me though. :) )

Line 146:


Line 170:    

 /*if (!$USER->quota_allowed($filesize)) {
        $form->set_error('file', get_string('profileiconuploadexceedsquota', 'artefact.file', get_config('wwwroot')));

Line 198:

    /*try {
    catch (QuotaException $qe) {
        $form->json_reply(PIEFORM_ERR, array(
            'message' => get_string('profileiconuploadexceedsquota', 'artefact.file', get_config('wwwroot'))

The line numbers might vary depending on your Mahara version (I don't know since I'm only using the latest).

anonymous profile picture
Account deleted
Posts: 1643

19 July 2009, 18:25

FYI - One thing we have been thinking about is making it so you choose from files uploaded to your files area as to which is considered your profile icon. In which case the quota would apply, although this means you wouldn't be restricted to just five.
2 results