diff options
Diffstat (limited to 'views/default/tidypics/forms')
-rw-r--r-- | views/default/tidypics/forms/edit.php | 234 | ||||
-rw-r--r-- | views/default/tidypics/forms/edit_multi.php | 114 | ||||
-rw-r--r-- | views/default/tidypics/forms/settings.php | 288 |
3 files changed, 318 insertions, 318 deletions
diff --git a/views/default/tidypics/forms/edit.php b/views/default/tidypics/forms/edit.php index cec1945f0..342ac8822 100644 --- a/views/default/tidypics/forms/edit.php +++ b/views/default/tidypics/forms/edit.php @@ -1,118 +1,118 @@ -<?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/longtext",array("internalname" => "tidypicsbody","value" => $body,)); ?>
- </p>
-<?php
- } else {
-?>
- <p>
- <label><?php echo elgg_echo('caption'); ?></label>
- <?php echo elgg_view("input/longtext",array("internalname" => "tidypicsbody","value" => $body,"class" => 'tidypics_caption_input')); ?>
- </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') {
- $container_guid = $vars['entity']->container_guid;
-
- // should this image be the cover for the album - only ask for non-cover photos
- // determine if it is already the cover
- $img_guid = $vars['entity']->guid;
- $album = get_entity($container_guid);
- $cover_guid = $album->cover;
-
- if ($cover_guid != $img_guid) {
-
-?>
- <p>
-<?php echo elgg_view('input/checkboxes', array('internalname' => "cover",
- 'options' => array(elgg_echo("album:cover")),
- ));
-?>
- </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
- }
-
- echo elgg_view('input/securitytoken');
-?>
- <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>
+<?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/longtext",array("internalname" => "tidypicsbody","value" => $body,)); ?> + </p> +<?php + } else { +?> + <p> + <label><?php echo elgg_echo('caption'); ?></label> + <?php echo elgg_view("input/longtext",array("internalname" => "tidypicsbody","value" => $body,"class" => 'tidypics_caption_input')); ?> + </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') { + $container_guid = $vars['entity']->container_guid; + + // should this image be the cover for the album - only ask for non-cover photos + // determine if it is already the cover + $img_guid = $vars['entity']->guid; + $album = get_entity($container_guid); + $cover_guid = $album->cover; + + if ($cover_guid != $img_guid) { + +?> + <p> +<?php echo elgg_view('input/checkboxes', array('internalname' => "cover", + 'options' => array(elgg_echo("album:cover")), + )); +?> + </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 + } + + echo elgg_view('input/securitytoken'); +?> + <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 index 4c4a111f5..4031b7968 100644 --- a/views/default/tidypics/forms/edit_multi.php +++ b/views/default/tidypics/forms/edit_multi.php @@ -1,58 +1,58 @@ -<?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'];
-
- // make sure one of the images becomes the cover if there isn't one already
- $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;
- $title = $entity->title;
- $tags = $entity->tags;
- $container_guid = $entity->container_guid;
-
- // first one is default cover if there isn't one already
- if ($no_cover) {
- $val = $guid;
- $no_cover = false;
- }
-
- echo '<div class="tidypics_edit_image_container">';
- echo '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $guid . '&size=small" 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/longtext",array("internalname" => "caption[$key]", "value" => $body, "class" => 'tidypics_caption_input',)) . "\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 elgg_view('input/securitytoken');
-
- echo elgg_view("input/radio", array("internalname" => "cover",
- "value" => $val,
- 'options' => array( elgg_echo('album:cover') => $guid,
- ),
- ));
- 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>
+<?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']; + + // make sure one of the images becomes the cover if there isn't one already + $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; + $title = $entity->title; + $tags = $entity->tags; + $container_guid = $entity->container_guid; + + // first one is default cover if there isn't one already + if ($no_cover) { + $val = $guid; + $no_cover = false; + } + + echo '<div class="tidypics_edit_image_container">'; + echo '<img src="' . $vars['url'] . 'mod/tidypics/thumbnail.php?file_guid=' . $guid . '&size=small" 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/longtext",array("internalname" => "caption[$key]", "value" => $body, "class" => 'tidypics_caption_input',)) . "\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 elgg_view('input/securitytoken'); + + echo elgg_view("input/radio", array("internalname" => "cover", + "value" => $val, + 'options' => array( elgg_echo('album:cover') => $guid, + ), + )); + 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/settings.php b/views/default/tidypics/forms/settings.php index 6ab9dfcc9..6cfed661f 100644 --- a/views/default/tidypics/forms/settings.php +++ b/views/default/tidypics/forms/settings.php @@ -1,145 +1,145 @@ -<?php
- /**
- * Tidypics admin settings form
- */
-
-
-
- $action = $vars['url'] . 'action/tidypics/settings';
-
- $plugin = find_plugin_settings('tidypics');
-
-
- // bootstrap the plugin version here for now
- if (!$plugin->version) {
- set_plugin_setting('version', 1.62, 'tidypics');
- }
-
- if (extension_loaded('imagick'))
- $img_lib_options['ImageMagickPHP'] = 'imagick PHP extension';
-
- $disablefunc = explode(',', ini_get('disable_functions'));
- if (is_callable('exec') && !in_array('exec',$disablefunc))
- $img_lib_options['ImageMagick'] = 'ImageMagick Cmdline';
-
- $img_lib_options['GD'] = 'GD';
-
-
- // Image Library
- $image_lib = $plugin->image_lib;
- if (!$image_lib) $image_lib = 'GD';
- $form_body = '<p>' . elgg_echo('tidypics:settings:image_lib') . ': ';
- $form_body .= elgg_view('input/pulldown', array(
- 'internalname' => 'params[image_lib]',
- 'options_values' => $img_lib_options,
- 'value' => $image_lib
- ));
- $form_body .= '<br/>Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.</p>';
-
- if (is_callable('exec') && !in_array('exec',$disablefunc)) {
- // Image Magick Path
- $im_path = $plugin->im_path;
- if(!$im_path) $im_path = "/usr/bin/";
- $form_body .= "<p>" . elgg_echo('tidypics:settings:im_path') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "</p>";
- }
-
- // Tagging
- $tagging = $plugin->tagging;
- if(!$tagging) $tagging = "enabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => 'enabled'), 'internalname' => 'tagging', 'value' => $tagging )) . "</p>";
-
- // Download Link
- $download_link = $plugin->download_link;
- if(!$download_link) $download_link = "enabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "</p>";
-
- // Ratings
- $photo_ratings = $plugin->photo_ratings;
- if(!$photo_ratings) $photo_ratings = "disabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:photo_ratings') => 'enabled'), 'internalname' => 'photo_ratings', 'value' => $photo_ratings )) . "</p>";
-
- // Show EXIF
- $exif = $plugin->exif;
- if(!$exif) $exif = "disabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:exif') => 'enabled'), 'internalname' => 'exif', 'value' => $exif )) . "</p>";
-
- // Show View count
- $view_count = $plugin->view_count;
- if(!$view_count) $view_count = "enabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "</p>";
- - // Watermark Text
- $form_body .= "<p>" . elgg_echo('tidypics:settings:watermark') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "</p>";
- - // Max Image Size
- $maxfilesize = $plugin->maxfilesize;
- if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB
- $form_body .= "<p>" . elgg_echo('tidypics:settings:maxfilesize') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $maxfilesize)) . "</p>";
-
- // Quota Size
- $quota = $plugin->quota;
- if (!$quota) $quota = 0;
- $form_body .= "<p>" . elgg_echo('tidypics:settings:quota') . "<br />";
- $form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "</p>";
-
- // River Image options
- $img_river_view = $plugin->img_river_view;
- if (!$img_river_view) $img_river_view = '1';
- $form_body .= '<p>' . elgg_echo('tidypics:settings:img_river_view');
- $form_body .= elgg_view('input/pulldown', array(
- 'internalname' => 'params[img_river_view]',
- 'options_values' => array(
- 'all' => 'all',
- '1' => '1',
- 'none' => 'none',
- ),
- 'value' => $img_river_view
- ));
- $form_body .= '</p>';
-
- // River Album options
- $album_river_view = $plugin->album_river_view;
- if (!$album_river_view) $album_river_view = 'set';
- $form_body .= '<p>' . elgg_echo('tidypics:settings:album_river_view');
- $form_body .= elgg_view('input/pulldown', array(
- 'internalname' => 'params[album_river_view]',
- 'options_values' => array(
- 'cover' => 'cover',
- 'set' => 'set',
- ),
- 'value' => $album_river_view
- ));
- $form_body .= '</p>';
-
- // Thumbnail sizes
- $image_sizes = $plugin->image_sizes;
- if(!$image_sizes) {
- $image_sizes = array(); // set default values
- $image_sizes['large_image_width'] = $image_sizes['large_image_height'] = 600;
- $image_sizes['small_image_width'] = $image_sizes['small_image_height'] = 153;
- $image_sizes['thumb_image_width'] = $image_sizes['thumb_image_height'] = 60;
- } else {
- $image_sizes = unserialize($image_sizes);
- }
- $form_body .= "<p>" . elgg_echo('tidypics:settings:largesize') . "<br />";
- $form_body .= 'width: <input style="width: 20%;" type="text" name="large_thumb_width" value=' . "\"{$image_sizes['large_image_width']}\"" . ' class="input-text" /> ';
- $form_body .= 'height: <input style="width: 20%;" type="text" name="large_thumb_height" value=' . "\"{$image_sizes['large_image_height']}\"" . ' class="input-text" /></p>';
- $form_body .= "<p>" . elgg_echo('tidypics:settings:smallsize') . "<br />";
- $form_body .= 'width: <input style="width: 20%;" type="text" name="small_thumb_width" value=' . "\"{$image_sizes['small_image_width']}\"" . ' class="input-text" /> ';
- $form_body .= 'height: <input style="width: 20%;" type="text" name="small_thumb_height" value=' . "\"{$image_sizes['small_image_height']}\"" . ' class="input-text" /></p>';
- $form_body .= "<p>" . elgg_echo('tidypics:settings:thumbsize') . "<br />";
- $form_body .= 'width: <input style="width: 20%;" type="text" name="thumb_width" value=' . "\"{$image_sizes['thumb_image_width']}\"" . ' class="input-text" /> ';
- $form_body .= 'height: <input style="width: 20%;" type="text" name="thumb_height" value=' . "\"{$image_sizes['thumb_image_height']}\"" . ' class="input-text" /></p>';
-
-
- // Group permission override
- $grp_perm_override = $plugin->grp_perm_override;
- if(!$grp_perm_override) $grp_perm_override = "enabled";
- $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:grp_perm_override') => 'enabled'), 'internalname' => 'grp_perm_override', 'value' => $grp_perm_override )) . "</p>";
-
- $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save")));
-
+<?php + /** + * Tidypics admin settings form + */ + + + + $action = $vars['url'] . 'action/tidypics/settings'; + + $plugin = find_plugin_settings('tidypics'); + + + // bootstrap the plugin version here for now + if (!$plugin->version) { + set_plugin_setting('version', 1.62, 'tidypics'); + } + + if (extension_loaded('imagick')) + $img_lib_options['ImageMagickPHP'] = 'imagick PHP extension'; + + $disablefunc = explode(',', ini_get('disable_functions')); + if (is_callable('exec') && !in_array('exec',$disablefunc)) + $img_lib_options['ImageMagick'] = 'ImageMagick Cmdline'; + + $img_lib_options['GD'] = 'GD'; + + + // Image Library + $image_lib = $plugin->image_lib; + if (!$image_lib) $image_lib = 'GD'; + $form_body = '<p>' . elgg_echo('tidypics:settings:image_lib') . ': '; + $form_body .= elgg_view('input/pulldown', array( + 'internalname' => 'params[image_lib]', + 'options_values' => $img_lib_options, + 'value' => $image_lib + )); + $form_body .= '<br/>Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.</p>'; + + if (is_callable('exec') && !in_array('exec',$disablefunc)) { + // Image Magick Path + $im_path = $plugin->im_path; + if(!$im_path) $im_path = "/usr/bin/"; + $form_body .= "<p>" . elgg_echo('tidypics:settings:im_path') . "<br />"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "</p>"; + } + + // Tagging + $tagging = $plugin->tagging; + if(!$tagging) $tagging = "enabled"; + $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => 'enabled'), 'internalname' => 'tagging', 'value' => $tagging )) . "</p>"; + + // Download Link + $download_link = $plugin->download_link; + if(!$download_link) $download_link = "enabled"; + $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download_link') => 'enabled'), 'internalname' => 'download_link', 'value' => $download_link )) . "</p>"; + + // Ratings + $photo_ratings = $plugin->photo_ratings; + if(!$photo_ratings) $photo_ratings = "disabled"; + $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:photo_ratings') => 'enabled'), 'internalname' => 'photo_ratings', 'value' => $photo_ratings )) . "</p>"; + + // Show EXIF + $exif = $plugin->exif; + if(!$exif) $exif = "disabled"; + $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:exif') => 'enabled'), 'internalname' => 'exif', 'value' => $exif )) . "</p>"; + + // Show View count + $view_count = $plugin->view_count; + if(!$view_count) $view_count = "enabled"; + $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:view_count') => 'enabled'), 'internalname' => 'view_count', 'value' => $view_count )) . "</p>"; + + // Watermark Text + $form_body .= "<p>" . elgg_echo('tidypics:settings:watermark') . "<br />"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[watermark_text]', 'value' => $plugin->watermark_text)) . "</p>"; + + // Max Image Size + $maxfilesize = $plugin->maxfilesize; + if (!$maxfilesize) $maxfilesize = (int)5; // 5 MB + $form_body .= "<p>" . elgg_echo('tidypics:settings:maxfilesize') . "<br />"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[maxfilesize]', 'value' => $maxfilesize)) . "</p>"; + + // Quota Size + $quota = $plugin->quota; + if (!$quota) $quota = 0; + $form_body .= "<p>" . elgg_echo('tidypics:settings:quota') . "<br />"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "</p>"; + + // River Image options + $img_river_view = $plugin->img_river_view; + if (!$img_river_view) $img_river_view = '1'; + $form_body .= '<p>' . elgg_echo('tidypics:settings:img_river_view'); + $form_body .= elgg_view('input/pulldown', array( + 'internalname' => 'params[img_river_view]', + 'options_values' => array( + 'all' => 'all', + '1' => '1', + 'none' => 'none', + ), + 'value' => $img_river_view + )); + $form_body .= '</p>'; + + // River Album options + $album_river_view = $plugin->album_river_view; + if (!$album_river_view) $album_river_view = 'set'; + $form_body .= '<p>' . elgg_echo('tidypics:settings:album_river_view'); + $form_body .= elgg_view('input/pulldown', array( + 'internalname' => 'params[album_river_view]', + 'options_values' => array( + 'cover' => 'cover', + 'set' => 'set', + ), + 'value' => $album_river_view + )); + $form_body .= '</p>'; + + // Thumbnail sizes + $image_sizes = $plugin->image_sizes; + if(!$image_sizes) { + $image_sizes = array(); // set default values + $image_sizes['large_image_width'] = $image_sizes['large_image_height'] = 600; + $image_sizes['small_image_width'] = $image_sizes['small_image_height'] = 153; + $image_sizes['thumb_image_width'] = $image_sizes['thumb_image_height'] = 60; + } else { + $image_sizes = unserialize($image_sizes); + } + $form_body .= "<p>" . elgg_echo('tidypics:settings:largesize') . "<br />"; + $form_body .= 'width: <input style="width: 20%;" type="text" name="large_thumb_width" value=' . "\"{$image_sizes['large_image_width']}\"" . ' class="input-text" /> '; + $form_body .= 'height: <input style="width: 20%;" type="text" name="large_thumb_height" value=' . "\"{$image_sizes['large_image_height']}\"" . ' class="input-text" /></p>'; + $form_body .= "<p>" . elgg_echo('tidypics:settings:smallsize') . "<br />"; + $form_body .= 'width: <input style="width: 20%;" type="text" name="small_thumb_width" value=' . "\"{$image_sizes['small_image_width']}\"" . ' class="input-text" /> '; + $form_body .= 'height: <input style="width: 20%;" type="text" name="small_thumb_height" value=' . "\"{$image_sizes['small_image_height']}\"" . ' class="input-text" /></p>'; + $form_body .= "<p>" . elgg_echo('tidypics:settings:thumbsize') . "<br />"; + $form_body .= 'width: <input style="width: 20%;" type="text" name="thumb_width" value=' . "\"{$image_sizes['thumb_image_width']}\"" . ' class="input-text" /> '; + $form_body .= 'height: <input style="width: 20%;" type="text" name="thumb_height" value=' . "\"{$image_sizes['thumb_image_height']}\"" . ' class="input-text" /></p>'; + + + // Group permission override + $grp_perm_override = $plugin->grp_perm_override; + if(!$grp_perm_override) $grp_perm_override = "enabled"; + $form_body .= '<p class="admin_debug">' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:grp_perm_override') => 'enabled'), 'internalname' => 'grp_perm_override', 'value' => $grp_perm_override )) . "</p>"; + + $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); + echo elgg_view('input/form', array('action' => $action, 'body' => $form_body)); |