From fef76848f2e6f52d5f4941b9b519aadf996070cf Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sun, 21 Jun 2009 13:26:48 +0000 Subject: added quota message --- languages/en.php | 6 ++---- views/default/tidypics/forms/upload.php | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/languages/en.php b/languages/en.php index 9d39c64c6..e0201dc46 100644 --- a/languages/en.php +++ b/languages/en.php @@ -80,8 +80,7 @@ 'album:desc' => "Description", 'album:tags' => "Tags", 'album:cover' => "Make image album cover?", - 'album:cover:yes' => "Yes", - 'image:access:note' => "(view access is inherited from the album)", + 'tidypics:quota' => "Quota usage:", //views @@ -144,10 +143,9 @@ 'images:edited' => "Your images were successfully updated.", 'album:edited' => "Your album was successfully updated.", 'album:saved' => "Your album was successfully saved.", - 'album:deleted' => "Your album was successfully deleted.", + 'album:deleted' => "Your album was successfully deleted.", 'album:delete:confirm' => "Are you sure you want to delete this album?", 'album:created' => "Your new album has been created.", - 'tidypics:status:processing' => "Please wait while we process your picture....", 'tidypics:settings:save:ok' => 'Successfully saved the Tidypics plugin settings', //Error messages diff --git a/views/default/tidypics/forms/upload.php b/views/default/tidypics/forms/upload.php index a8f3c8386..c4313bf40 100644 --- a/views/default/tidypics/forms/upload.php +++ b/views/default/tidypics/forms/upload.php @@ -4,11 +4,21 @@ //this is for image uploads only. Image edits are handled by edit.php form $container_guid = get_input('container_guid'); - $access_id = get_entity($vars['album'])->access_id; + $album = get_entity($vars['album']); + $access_id = $album->access_id; $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics'); if (!$maxfilesize) $maxfilesize = 5; + + $quota = get_plugin_setting('quota','tidypics'); + if ($quota) { + $image_repo_size_md = get_metadata_byname($album->container_guid, "image_repo_size"); + $image_repo_size = (int)$image_repo_size_md->value; + $image_repo_size = round($image_repo_size / 1024 / 1024); + if ($image_repo_size > $quota) + $image_repo_size = $quota; + } ?>
@@ -19,6 +29,13 @@



+ +
+

Uploading images
...
-- cgit v1.2.3