aboutsummaryrefslogtreecommitdiff
path: root/views/default/tidypics/forms
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/tidypics/forms')
-rw-r--r--views/default/tidypics/forms/edit.php111
-rw-r--r--views/default/tidypics/forms/edit_multi.php45
-rw-r--r--views/default/tidypics/forms/upload.php72
3 files changed, 0 insertions, 228 deletions
diff --git a/views/default/tidypics/forms/edit.php b/views/default/tidypics/forms/edit.php
deleted file mode 100644
index 533852413..000000000
--- a/views/default/tidypics/forms/edit.php
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
- /**
- * Tidypics images edit/add form
- * This form is used to:
- * - create albums
- * - edit albums
- * - edit images
- */
-
- //set stuff if we are editing existing album or image
- if (isset($vars['entity'])) {
- $action = "tidypics/edit";
- $title = $vars['entity']->title;
- $body = $vars['entity']->description;
- $tags = $vars['entity']->tags;
- $access_id = $vars['entity']->access_id;
- $subtype = $vars['subtype'];
-
- // if nothing is sent, create new, but only new albums are sent here
- // new images are sent to upload.php
- } else {
- $action = "tidypics/addalbum";
- $tags = "";
- $title = "";
- $body = "";
- if (defined('ACCESS_DEFAULT'))
- $access_id = ACCESS_DEFAULT;
- else
- $access_id = 1; // logged_in by default
- $subtype = 'album';
-
- $title = $_SESSION['tidypicstitle'];
- $body = $_SESSION['tidypicsbody'];
- $tags = $_SESSION['tidypicstags'];
-
- unset($_SESSION['tidypicstitle']);
- unset($_SESSION['tidypicsbody']);
- unset($_SESSION['tidypicstags']);
- }
-
- // group or individual
- $container_guid = page_owner();
-
-?>
-<div class="contentWrapper">
- <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
- <p>
- <label><?php echo elgg_echo('album:title'); ?></label>
- <?php echo elgg_view("input/text", array("internalname" => "tidypicstitle", "value" => $title,)); ?>
- </p>
-<?php
- if ($subtype == 'album') {
-?>
- <p>
- <label><?php echo elgg_echo('album:desc'); ?></label>
- <?php echo elgg_view("input/text",array("internalname" => "tidypicsbody","value" => $body,)); ?>
- </p>
-<?php
- } else {
-?>
- <p>
- <label><?php echo elgg_echo('caption'); ?></label>
- <?php echo elgg_view("input/text",array("internalname" => "tidypicsbody","value" => $body,)); ?>
- </p>
-<?php
- }
-?>
- <p>
- <label><?php echo elgg_echo("tags"); ?></label>
- <?php echo elgg_view("input/tags", array( "internalname" => "tidypicstags","value" => $tags,)); ?>
- </p>
-
-<?php
- if ($subtype == 'image') {
- // should this album be the cover for the album
-
- // try to determine if it is already the cover - the pass of this variable doesn't work - leave for next version
- $guid = $vars['entity']->guid;
- $container_guid = $vars['entity']->container_guid;
- $cover_guid = get_entity($container_guid)->cover;
- if($cover_guid == $vars['entity']->guid)
- $cover = 'yes';
-
-?>
- <p>
- <label><?php echo elgg_echo("album:cover"); ?></label>
- <?php echo elgg_view("input/cover_checkbox", array( "internalname" => "cover", "value" => $cover, 'options' => array(elgg_echo('album:cover:yes')))); ?>
- </p>
-<?php
- } else {
- // album so display access control
-?>
- <p>
- <label><?php echo elgg_echo('access'); ?></label>
- <?php echo elgg_view('input/access', array('internalname' => 'access_id','value' => $access_id)); ?>
- </p>
-
-<?php
- }
-
- if (isset($vars['entity'])) {
-?>
- <input type="hidden" name="guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
-<?php
- }
-?>
- <input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" />
- <input type="hidden" name="subtype" value="<?php echo $subtype; ?>" />
- <p><input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" /></p>
- </form>
-</div> \ No newline at end of file
diff --git a/views/default/tidypics/forms/edit_multi.php b/views/default/tidypics/forms/edit_multi.php
deleted file mode 100644
index 24755e9cf..000000000
--- a/views/default/tidypics/forms/edit_multi.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
- /**
- * form for mass editing all uploaded images
- */
-?>
-<div class="contentWrapper">
-<form action="<?php echo $vars['url']; ?>action/tidypics/edit_multi" method="post">
-<?php
-
- $file_array = $vars['file_array'];
- $album_entity = get_entity($vars['album_guid']);
- if(!$album_entity->cover) $no_cover = true;
-
- foreach($file_array as $key => $file_guid){
- $entity = get_entity($file_guid);
- $guid = $entity->guid;
- $body = $entity->description;
- $tags = $entity->tags;
- $container_guid = $entity->container_guid;
- if($no_cover && !$cover) $cover = $guid;
-
- echo '<div class="tidypics_edit_image_container">';
- echo '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $guid . '&size=small" border="0" class="tidypics_edit_images" alt="' . $title . '"/>';
- echo '<div class="tidypics_image_info">';
- echo '<p><label>' . elgg_echo('album:title') . '</label>';
- echo elgg_view("input/text", array("internalname" => "title[$key]", "value" => $title,)) . "\n";
- echo '</p>';
- echo '<p><label>' . elgg_echo('caption') . "</label>";
- echo elgg_view("input/text",array("internalname" => "caption[$key]", "value" => $body,)) . "\n";
- echo "</p>";
- echo '<p><label>' . elgg_echo("tags") . "</label>\n";
- echo elgg_view("input/tags", array( "internalname" => "tags[$key]","value" => $tags)) . "\n";
- echo '</p>';
- echo '<input type="hidden" name="image_guid[' .$key. ']" value="'. $guid .'">' . "\n";
- echo '<label>' . elgg_echo("album:cover") . '</label>';
- echo elgg_view("input/multi_radio", array( "internalname" => "cover", "value" => $guid, 'options' => array(elgg_echo('album:cover:yes')), 'set' => $cover));
- echo '</div>';
- echo '</div>';
-
- }
-?>
-<input type="hidden" name="container_guid" value="<?php echo $container_guid; ?>" />
-<p><input type="submit" name="submit" value="<?php echo elgg_echo('save'); ?>" /></p>
-</form>
-</div> \ No newline at end of file
diff --git a/views/default/tidypics/forms/upload.php b/views/default/tidypics/forms/upload.php
deleted file mode 100644
index e93d3f5ba..000000000
--- a/views/default/tidypics/forms/upload.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
- global $CONFIG;
-
- //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;
-
- if (get_plugin_setting('maxfilesize','tidypics')) {
- if (((int) get_plugin_setting('maxfilesize','tidypics')) < 1 || ((int) get_plugin_setting('maxfilesize','tidypics')) > 1048576) {
- $maxfilesize = 10240; //if file size is less than 1KB or greater than 1GB, default to 10MB
- } else {
- $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics');
- }
- } else {
- $maxfilesize = 10240; //if the file size limit is not set, default to 10MB
- }
-
-?>
-<script language="javascript">
-<!--
-
-var state = 'none';
-
-function showhide(layer_ref) {
- if (state == 'block') {
- state = 'none';
- }
- else {
- state = 'block';
- }
- if (document.all) { //IS IE 4 or 5 (or 6 beta)
- eval( "document.all." + layer_ref + ".style.display = state");
- }
- if (document.layers) { //IS NETSCAPE 4 or below
- document.layers[layer_ref].display = state;
- }
- if (document.getElementById &&!document.all) {
- hza = document.getElementById(layer_ref);
- hza.style.display = state;
- }
- return false;
-}
-//-->
-</script>
-<div class="contentWrapper">
-<form action="<?php echo $vars['url']; ?>action/tidypics/upload" enctype="multipart/form-data" method="post">
- <p style="line-height:1.6em;">
- <label><?php echo elgg_echo("images:upload"); ?></label><br />
- <i><?php echo elgg_echo("tidypics:settings:maxfilesize") . ' ' . $maxfilesize; ?></i><br />
- <div align="center" class="tidypics_loader" id="tidypics_loader" name="tidypics_loader" style="display:none;"><center><img alt="..." border="0" src="<?php echo $vars['url'].'mod/tidypics/graphics/loader.gif' ?>" /></center></div>
- <ol id="tidypics_image_upload_list">
-<?php
- for($x = 0; $x < 10; $x++){
- echo '<li>' . elgg_view("input/file",array('internalname' => "upload_$x")) . "</li>\n";
- }
-?>
- </ol>
- </p>
-
- <p>
- <?php
- if ($container_guid)
- echo '<input type="hidden" name="container_guid" value="' . $container_guid . '" />';
- if ($access_id)
- echo '<input type="hidden" name="access_id" value="' . $access_id . '" />';
- ?>
- <input type="submit" value="<?php echo elgg_echo("save"); ?>" onclick="showhide('tidypics_loader');" />
- </p>
-
-</form>
-</div> \ No newline at end of file