From 76d0f767eb42cb2c4bf20b5db63c6722c64fa28c Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 1 May 2010 19:35:28 +0000 Subject: switched order of image library and main settings on the admin settings page --- views/default/tidypics/forms/settings.php | 63 +++++++++++++++++-------------- 1 file changed, 34 insertions(+), 29 deletions(-) (limited to 'views/default') diff --git a/views/default/tidypics/forms/settings.php b/views/default/tidypics/forms/settings.php index 21b85b83f..0729b536b 100644 --- a/views/default/tidypics/forms/settings.php +++ b/views/default/tidypics/forms/settings.php @@ -15,38 +15,11 @@ 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 - $form_body = '

' . elgg_echo('tidypics:settings:heading:img_lib') . '

'; - $image_lib = $plugin->image_lib; - if (!$image_lib) $image_lib = 'GD'; - $form_body .= '

' . 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 .= '
Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.

'; - - 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 .= "

" . elgg_echo('tidypics:settings:im_path') . "
"; - $form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "

"; - } + // Main settings + $form_body = '

' . elgg_echo('tidypics:settings:heading:main') . '

'; // Tagging - $form_body .= '

' . elgg_echo('tidypics:settings:heading:main') . '

'; $tagging = $plugin->tagging; if(!$tagging) $tagging = "enabled"; $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => 'enabled'), 'internalname' => 'tagging', 'value' => $tagging )) . "

"; @@ -87,6 +60,38 @@ $form_body .= "

" . elgg_echo('tidypics:settings:quota') . "
"; $form_body .= elgg_view("input/text",array('internalname' => 'params[quota]', 'value' => $quota)) . "

"; + // Image Library + 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'; + + $form_body .= '

' . elgg_echo('tidypics:settings:heading:img_lib') . '

'; + $image_lib = $plugin->image_lib; + if (!$image_lib) $image_lib = 'GD'; + $form_body .= '

' . 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 .= '
Note: If you want to select ImageMagick Command Line, first confirm that it is installed on your server.

'; + + 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 .= "

" . elgg_echo('tidypics:settings:im_path') . "
"; + $form_body .= elgg_view("input/text",array('internalname' => 'params[im_path]', 'value' => $im_path)) . "

"; + } + + // River Image options $form_body .= '

' . elgg_echo('tidypics:settings:heading:river') . '

'; $img_river_view = $plugin->img_river_view; -- cgit v1.2.3