Change param size number bye litteral size, like s for small, m for medium ...

This commit is contained in:
Knah Tsaeb 2013-04-02 16:09:57 +02:00
parent 1dbf462108
commit 58c2d9d4e9

View file

@ -18,7 +18,7 @@ $GLOBALS['config']['defaultThumbSize'] = '120x90';
// default size for thumbnail // default size for thumbnail
$GLOBALS['config']['onlyThumb'] = TRUE; $GLOBALS['config']['onlyThumb'] = TRUE;
// generate only thumbnail or generate thumbnail + 1280x1024 image // generate only thumbnail or generate thumbnail + 1280x1024 image
$GLOBALS['config']['thumbSize'] = array(1 => '100x80', '120x90', '200x160', '300x240', '400x320', '500x400'); $GLOBALS['config']['thumbSize'] = array('s' => '120x90', 'm' => '200x160', 'l' => '300x240', 'xl' => '400x320', 'xxl' => '500x400');
// list of available size for thumb // list of available size for thumb
if (!file_exists('cache/config/genConf.php')) { if (!file_exists('cache/config/genConf.php')) {
@ -233,7 +233,7 @@ if ($_GET) {
} }
$defUrl = $ui['url']; $defUrl = $ui['url'];
if (isset($ui['s']) && (int)$ui['s']) { if (isset($ui['s']) && array_key_exists($ui['s'], $GLOBALS['config']['thumbSize'])) {
$width = $GLOBALS['config']['thumbSize'][$ui['s']]; $width = $GLOBALS['config']['thumbSize'][$ui['s']];
} else { } else {
$width = $GLOBALS['config']['defaultThumbSize']; $width = $GLOBALS['config']['defaultThumbSize'];
@ -282,7 +282,7 @@ if ($_POST) {
$defUrl = $ui['url']; $defUrl = $ui['url'];
if (isset($ui['s']) && (int)$ui['s']) { if (isset($ui['s']) && array_key_exists($ui['s'], $GLOBALS['config']['thumbSize'])) {
$width = $GLOBALS['config']['thumbSize'][$ui['s']]; $width = $GLOBALS['config']['thumbSize'][$ui['s']];
} else { } else {
$width = $GLOBALS['config']['defaultThumbSize']; $width = $GLOBALS['config']['defaultThumbSize'];