From 5cc8de829c0a7b86c8df27293f4825d0e340d592 Mon Sep 17 00:00:00 2001 From: Brett Profitt Date: Fri, 16 Mar 2012 22:51:12 -0700 Subject: Fixes #14. Fixed uploadify. --- views/default/forms/photos/ajax_upload.php | 66 ++++++----- views/default/js/photos/uploading.php | 85 +++++++++++++-- views/default/photos/css.php | 169 ++++++++++++++--------------- 3 files changed, 190 insertions(+), 130 deletions(-) (limited to 'views') diff --git a/views/default/forms/photos/ajax_upload.php b/views/default/forms/photos/ajax_upload.php index f0738994a..be25d628e 100644 --- a/views/default/forms/photos/ajax_upload.php +++ b/views/default/forms/photos/ajax_upload.php @@ -2,26 +2,22 @@ /** * Tidypics ajax upload form body * - * @uses $vars['album'] + * @uses $vars['entity'] */ -$album = $vars['album']; +$album = $vars['entity']; $ts = time(); -$token = generate_action_token($ts); $batch = time(); -$tidypics_token = md5(session_id() . get_site_secret() . $ts . get_loggedin_user()->salt); - +$tidypics_token = md5(session_id() . get_site_secret() . $ts . elgg_get_logged_in_user_entity()->salt); $basic_uploader_url = current_page_url() . '/basic'; -$upload_endpoint_url = "{$vars['url']}action/tidypics/ajax_upload/"; -$upload_complete_url = "{$vars['url']}action/tidypics/ajax_upload_complete/"; -$maxfilesize = (float) get_plugin_setting('maxfilesize','tidypics'); +$maxfilesize = (float) elgg_get_plugin_setting('maxfilesize', 'tidypics'); if (!$maxfilesize) { $maxfilesize = 5; } -$quota = get_plugin_setting('quota','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; @@ -40,30 +36,32 @@ if ($quota) { ?> -
- -

+

-
+
+ + + + + + +
+ + +
  • + + 2. + +
  • +
  • + + 3. + +
  • + diff --git a/views/default/js/photos/uploading.php b/views/default/js/photos/uploading.php index 59448dd46..cb79dc77c 100644 --- a/views/default/js/photos/uploading.php +++ b/views/default/js/photos/uploading.php @@ -1,27 +1,92 @@ +//