diff --git a/e107_admin/image.php b/e107_admin/image.php index 3d997711a..5700600a2 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -472,17 +472,18 @@ class media_form_ui extends e_admin_form_ui if(vartrue($pref['e_imageresize']) && is_array($pref['e_imageresize'])) { - foreach($pref['e_imageresize'] as $val) + foreach($pref['e_imageresize'] as $k=>$val) { $options[$k] = ucfirst($k). " [img] bbcode"; } } - + $options = $pref['resize_dimensions']; foreach($options as $key=>$title) { + $title = ucwords(str_replace("-"," ",$key)); $valW = vartrue($curval[$key]['w']); $valH = vartrue($curval[$key]['h']); diff --git a/e107_handlers/plugin_class.php b/e107_handlers/plugin_class.php index 127be4d97..4169167a6 100644 --- a/e107_handlers/plugin_class.php +++ b/e107_handlers/plugin_class.php @@ -1780,21 +1780,21 @@ class e107plugin case 'install': // Probably best to leave well alone if(vartrue($tag['bbcodes']['@attributes']['imgResize'])) { - e107::getConfig('core')->add("e_imageresize",$tag['folder']); //FIXME - should be saved as an array; - $mes->debug('Adding imageResize for: '.$tag['folder']); - } - + e107::getConfig('core')->setPref('resize_dimensions/'.$this->plugFolder."-bbcode", array('w'=>300,'h'=>300)); + $mes->debug('Adding imageResize for: '.$this->plugFolder); + } break; case 'uninstall': // Probably best to leave well alone if(vartrue($tag['bbcodes']['@attributes']['imgResize'])) { - // e107::getConfig('core')->add("e_imageresize",$tag['folder']); + //e107::getConfig('core')->removePref('resize_dimensions/'.$this->plugFolder); + //e107::getConfig('core')->removePref('e_imageresize/'.$this->plugFolder); + e107::getConfig('core')->removePref('resize_dimensions/'.$this->plugFolder."-bbcode"); + $mes->debug('Removing imageResize for: '.$this->plugFolder."-bbcode"); } - break; - - + break; } diff --git a/e107_plugins/faqs/plugin.xml b/e107_plugins/faqs/plugin.xml index 2055ca61b..1e9da870b 100644 --- a/e107_plugins/faqs/plugin.xml +++ b/e107_plugins/faqs/plugin.xml @@ -1,5 +1,4 @@ - A simple plugin to add Frequently Asked Questions to your website.