From 029ae9fcba086a1cce25e496c9de2593df212bdb Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 22 May 2009 12:14:27 +0000 Subject: loading plugin settings on admin settings page --- views/default/tidypics/forms/admin.php | 36 ++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'views/default/tidypics/forms/admin.php') diff --git a/views/default/tidypics/forms/admin.php b/views/default/tidypics/forms/admin.php index 32e08b561..8006cc69f 100644 --- a/views/default/tidypics/forms/admin.php +++ b/views/default/tidypics/forms/admin.php @@ -5,16 +5,19 @@ // to do // 1. set action and code it - // 2. figure out how to load all values since they won't be available in $vars[] by default + // 2. add language strings + // 3. clean up and organize $action = $vars['url'];// . "action/"; - $image_lib = $vars['entity']->image_lib; + $plugin = find_plugin_settings('tidypics'); + + $image_lib = $plugin->image_lib; if (!$image_lib) $image_lib = 'GD'; - $form_body = 'Not functional!!!!!!!

' . elgg_echo('tidypics:image_lib'); - + // Image Library + $form_body = 'Not functional!!!!!!!

' . elgg_echo('tidypics:settings:image_lib'); $form_body .= elgg_view('input/pulldown', array( 'internalname' => 'params[image_lib]', 'options_values' => array( @@ -24,17 +27,24 @@ ), 'value' => $image_lib )); - $form_body .= '

'; - - - $form_body .= "

" . elgg_view("input/checkboxes", array('options' => array('Enable Tagging' => true), 'internalname' => 'tagging', 'value' => ($vars['config']->tagging ? true : false) )) . "

"; - - $form_body .= "

" . elgg_view("input/checkboxes", array('options' => array('Enable Download Link' => true), 'internalname' => 'download', 'value' => ($vars['config']->download ? true : false) )) . "

"; - - $form_body .= "

" . elgg_echo('watermark') . "
"; - $form_body .= elgg_view("input/text",array('internalname' => 'watermark', 'value' => $watermark)) . "

"; + // Tagging + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:tagging') => true), 'internalname' => 'tagging', 'value' => ($plugin->tagging ? true : false) )) . "

"; + + // Download Link + $form_body .= '

' . elgg_view("input/checkboxes", array('options' => array(elgg_echo('tidypics:settings:download') => true), 'internalname' => 'download_link', 'value' => ($plugin->download_link ? true : false) )) . "

"; + + // Watermark Text + $form_body .= "

" . elgg_echo('tidypics:settings:watermark') . "
"; + $form_body .= elgg_view("input/text",array('internalname' => 'watermark_text', 'value' => $plugin->$watermark_text)) . "

"; + + // Max Image Size + $form_body .= "

" . elgg_echo('tidypics:settings:img_size') . "
"; + $form_body .= elgg_view("input/text",array('internalname' => 'maxfilesize', 'value' => $plugin->$maxfilesize)) . "

"; + + // Thumbnail sizes + $form_body .= elgg_view('input/submit', array('value' => elgg_echo("save"))); -- cgit v1.2.3