1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Image-resize options fix.

This commit is contained in:
Cameron
2012-12-12 19:28:39 -08:00
parent ac741b4d71
commit 971c4fd8b1
3 changed files with 11 additions and 11 deletions

View File

@@ -472,17 +472,18 @@ class media_form_ui extends e_admin_form_ui
if(vartrue($pref['e_imageresize']) && is_array($pref['e_imageresize'])) 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[$k] = ucfirst($k). " [img] bbcode";
} }
} }
$options = $pref['resize_dimensions'];
foreach($options as $key=>$title) foreach($options as $key=>$title)
{ {
$title = ucwords(str_replace("-"," ",$key));
$valW = vartrue($curval[$key]['w']); $valW = vartrue($curval[$key]['w']);
$valH = vartrue($curval[$key]['h']); $valH = vartrue($curval[$key]['h']);

View File

@@ -1780,21 +1780,21 @@ class e107plugin
case 'install': // Probably best to leave well alone case 'install': // Probably best to leave well alone
if(vartrue($tag['bbcodes']['@attributes']['imgResize'])) if(vartrue($tag['bbcodes']['@attributes']['imgResize']))
{ {
e107::getConfig('core')->add("e_imageresize",$tag['folder']); //FIXME - should be saved as an array; e107::getConfig('core')->setPref('resize_dimensions/'.$this->plugFolder."-bbcode", array('w'=>300,'h'=>300));
$mes->debug('Adding imageResize for: '.$tag['folder']); $mes->debug('Adding imageResize for: '.$this->plugFolder);
} }
break; break;
case 'uninstall': // Probably best to leave well alone case 'uninstall': // Probably best to leave well alone
if(vartrue($tag['bbcodes']['@attributes']['imgResize'])) 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;
} }

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- $Id: plugin.xml,v 1.1 2009-11-09 12:57:34 e107coders Exp $ -->
<e107Plugin name="FAQs" lan="LAN_PLUGIN_FAQS_NAME" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true"> <e107Plugin name="FAQs" lan="LAN_PLUGIN_FAQS_NAME" version="1.0" date="2012-08-01" compatibility="2.0" installRequired="true">
<author name="e107 Inc" url="http://www.e107.org" email="security@e107.org" /> <author name="e107 Inc" url="http://www.e107.org" email="security@e107.org" />
<description lan="LAN_PLUGIN_FAQS_DESCRIPTION">A simple plugin to add Frequently Asked Questions to your website.</description> <description lan="LAN_PLUGIN_FAQS_DESCRIPTION">A simple plugin to add Frequently Asked Questions to your website.</description>