[ class tree: plugins ] [ index: plugins ] [ all elements ]

Procedural File: quota_manager.php

Source Location: /zp-extensions/quota_manager.php

Page Details

A quota management system to limit the sum of sizes of uploaded images.

Set the default quota on the plugin options page. You can change the quota for individual users on the Admin tab. Users with ADMIN_RIGHTS or MANAGE_ALL_ALBUM_RIGHTS are not subject to quotas and will not be assigned ownership of an image.

Images uploaded by a user will be marked as his and will count toward his quota. Images uploaded via FTP will not necessarily have an owner assigned. If there is one assiged, it is the logged on user when the image is discovered by Zenphoto.

You may also assign the complete set of images in an albums to a user. (Just the images in the album. If you want to assign images from subalbums, you need to do that for each subalbum.)

A user who exceeds his quota will not be allowed to upload files.

Because of the difficulty of policing quotas when ZIP files are uploaded this plugin has an option to diable ZIP file upload.

Author:  Stephen Billard (sbillard)
Classes
Class Description
Quota_management Option handler class
Functions
quota_admin_list  [line 146]

Returns an option list of administrators who do not have ADMIN_RIGHTS or MANAGE_ALL_ALBUM_RIGHTS

Parameters:
string   $owner: 


string quota_admin_list( string $owner  )

[ Top ]
quota_checkQuota  [line 290]

Checks if upload should be allowed

Parameters:
int   $error: 
string   $image: 


int quota_checkQuota( int $error, string $image  )

[ Top ]
quota_edit_admin  [line 107]

Returns table row(s) for edit of an admin user's custom data

Parameters:
string   $html:  always empty
string   $i:  prefix for the admin
string   $background:  background color for the admin row
bool   $current:  true if this admin row is the logged in admin
$userobj   $userobj:  Admin user object
   $local_alterrights: 


string quota_edit_admin( string $html, $userobj $userobj, string $i, string $background, bool $current, $local_alterrights  )

[ Top ]
quota_edit_album  [line 203]

Returns a table entry for image assignment

Parameters:
string   $discard: 
object   $album: 
string   $prefix: 


string quota_edit_album( string $discard, object $album, string $prefix  )

[ Top ]
quota_edit_image  [line 168]

Returns table row(s) for the edit of an image custom data field

Parameters:
string   $discard:  always empty
int   $currentimage:  prefix for the image being edited
object   $image:  the image object


string quota_edit_image( string $discard, object $image, int $currentimage  )

[ Top ]
quota_getCurrentUse  [line 131]

Returns curren image useage

Parameters:
$userobj   $userobj:  Admin user object


int quota_getCurrentUse( $userobj $userobj  )

[ Top ]
quota_getUploadLimit  [line 277]

Returns the upload limit

Parameters:
int   $uploadlimit: 


int quota_getUploadLimit( int $uploadlimit  )

[ Top ]
quota_getUploadQuota  [line 262]

Returns the user's quota

Parameters:
int   $quota: 


int quota_getUploadQuota( int $quota  )

[ Top ]
quota_get_header  [line 313]

Returns quota text for header, etc.

Parameters:
string   $default: 


string quota_get_header( string $default  )

[ Top ]
quota_image_refresh  [line 251]

checks to see if the filesize is set and sets it if not

Parameters:
unknown_type   $image: 


object quota_image_refresh( unknown_type $image  )

[ Top ]
quota_new_image  [line 236]

Assigns owner to new image

Parameters:
string   $image: 


object quota_new_image( string $image  )

[ Top ]
quota_save_admin  [line 91]

Saves admin custom data Called when an admin is saved

Parameters:
string   $discard:  always empty
object   $userobj:  admin user object
string   $i:  prefix for the admin


string quota_save_admin( string $discard, object $userobj, string $i  )

[ Top ]
quota_save_album  [line 222]

Assigns images within the album to an owner.

Parameters:
object   $album: 
string   $prefix: 


void quota_save_album( object $album, string $prefix  )

[ Top ]
quota_save_image  [line 190]

Option save handler for the filter

Parameters:
object   $object:  object being rated
string   $prefix:  indicator if admin is processing multiple objects
   $image: 


void quota_save_image( $image, string $prefix, object $object  )

[ Top ]
quota_upload_filetypes  [line 352]

Removes ZIP from list of upload suffixes

Parameters:
array   $types: 


array quota_upload_filetypes( array $types  )

[ Top ]
quota_upload_helper_js  [line 333]

Returns Javascript needed to support quota system

Parameters:
string   $defaultJS: 


string quota_upload_helper_js( string $defaultJS  )

[ Top ]


Documentation generated on Mon, 09 Aug 2010 17:24:09 +0200 by phpDocumentor 1.4.1