From c51b483f24936c8d04a54a6999412937ec21c49a Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 19 Nov 2011 23:13:26 -0500 Subject: uploading photos through the basic interface works now --- views/default/forms/photos/basic_upload.php | 103 +++++++++--------------- views/default/forms/photos/batch/edit.php | 32 ++++++++ views/default/forms/photos/batch/edit/image.php | 39 +++++++++ 3 files changed, 108 insertions(+), 66 deletions(-) create mode 100644 views/default/forms/photos/batch/edit.php create mode 100644 views/default/forms/photos/batch/edit/image.php (limited to 'views/default/forms/photos') diff --git a/views/default/forms/photos/basic_upload.php b/views/default/forms/photos/basic_upload.php index 55ab854a4..e4535814b 100644 --- a/views/default/forms/photos/basic_upload.php +++ b/views/default/forms/photos/basic_upload.php @@ -1,24 +1,22 @@ access_id; -$maxfilesize = (float) get_plugin_setting('maxfilesize','tidypics'); -if (!$maxfilesize) { - $maxfilesize = 5; -} - -$quota = get_plugin_setting('quota','tidypics'); +$maxfilesize = (float) elgg_get_plugin_setting('maxfilesize', 'tidypics'); +$quota = elgg_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; @@ -34,16 +32,6 @@ if ($quota) { $image_repo_size = $quota; } } - -?> -
-
- -

-
-
@@ -51,54 +39,37 @@ if ($quota) { -

-
-
...
-
-
    - ' . elgg_view("input/file",array('internalname' => "upload_$x")) . ''; - } - ?> -
-

-

- guid . '" />'; - } - if ($access_id) { - echo ''; - } - ?> - " onclick="displayProgress();" /> -

- -
- \ No newline at end of file +echo elgg_view('input/form', array( + 'body' => $form_body, + 'action' => 'action/photos/image/upload', + 'enctype' => 'multipart/form-data', +)); diff --git a/views/default/forms/photos/batch/edit.php b/views/default/forms/photos/batch/edit.php new file mode 100644 index 000000000..fa017ac96 --- /dev/null +++ b/views/default/forms/photos/batch/edit.php @@ -0,0 +1,32 @@ +getContainerEntity(); + +$images = elgg_get_entities_from_relationship(array( + 'type' => 'object', + 'subtype' => 'image', + 'relationship' => 'belongs_to_batch', + 'relationship_guid' => $batch->getGUID(), + 'inverse_relationship' => true, +)); + +echo ''; + +echo '
'; +echo elgg_view('input/submit', array('value' => elgg_echo('save'))); +echo '
'; diff --git a/views/default/forms/photos/batch/edit/image.php b/views/default/forms/photos/batch/edit/image.php new file mode 100644 index 000000000..bf982ed84 --- /dev/null +++ b/views/default/forms/photos/batch/edit/image.php @@ -0,0 +1,39 @@ +'; + +echo '
'; +echo elgg_view('output/img', array( + 'src' => $image->getSrcURL(), + 'alt' => $image->getTitle(), + 'class' => 'elgg-photo', +)); +echo '
'; + +echo '
'; +echo '
'; +echo elgg_view('input/text', array('name' => 'title[]', 'value' => $title,)); +echo '
'; + +echo '
'; +echo elgg_view('input/longtext', array('name' => 'caption[]')); +echo '
'; + +echo '
'; +echo elgg_view('input/tags', array('name' => 'tags[]')); +echo '
'; + +echo elgg_view('input/hidden', array('name' => 'guid[]', 'value' => $image->getGUID())); +echo '
'; + +echo ''; -- cgit v1.2.3