diff --git a/e107_core/shortcodes/single/imagepreview.php b/e107_core/shortcodes/single/imagepreview.php index 8c95c8d92..5a5bc4c72 100644 --- a/e107_core/shortcodes/single/imagepreview.php +++ b/e107_core/shortcodes/single/imagepreview.php @@ -1,37 +1,37 @@ -replaceConstants($posted, 'full'); } else $path = (varset($_POST[$name])/* && deftrue('e_AJAX_REQUEST')*/) ? e107::getParser()->replaceConstants($_POST[$name], 'full') : ''; $hide = ''; - - if(!$path) + + if(!$path) { - $path = e_IMAGE_ABS."generic/blank.gif"; + $path = '#'; + $thpath = e_IMAGE_ABS."generic/blank.gif"; $hide = ' style="display: none;"'; } - return "\"\""; + else + { + $thpath = !varset($nothumb) ? e107::getParser()->thumbUrl($path, 'w='.$width.'h='.$height, true) : $path; + } + return "\"\""; } \ No newline at end of file diff --git a/e107_core/shortcodes/single/imageselector.sc b/e107_core/shortcodes/single/imageselector.sc index e9ad91e20..15a97de28 100644 --- a/e107_core/shortcodes/single/imageselector.sc +++ b/e107_core/shortcodes/single/imageselector.sc @@ -1,7 +1,9 @@ // $Id$ //FIXME - full rewrite, backward compatible -global $sql,$parm,$tp; + +$sql = e107::getDb(); +$tp = e107::getParser(); if(strstr($parm,"=")) { // query style parms. @@ -120,15 +122,16 @@ if(varset($click_target)) { $pre = varset($click_prefix); $post = varset($click_postfix); - $text .= ""; + $text .= ""; } else { - $text .= ""; + $text .= ""; } -if(vartrue($height)) $height = "height:{$height};"; -if(vartrue($width)) $width = "width:{$width}; "; -$text .= ""; +if(vartrue($height)) $height = intval($height); +if(vartrue($width)) $width = intval($width); +$thpath = isset($parms['nothumb']) ? $pvw_default : $tp->thumbUrl($pvw_default, 'w='.$width.'h='.$height, true); +$text .= "$pvw_default"; $text .= "\n"; diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php index 443a96eb1..f551a91e8 100644 --- a/e107_handlers/form_handler.php +++ b/e107_handlers/form_handler.php @@ -177,7 +177,7 @@ class e_form $parms .= "&multiple=FALSE"; $parms .= "&label=-- ".$label." --"; $parms .= "&subdirs=".varset($sc_parameters['subdirs'], 1); - $parms .= '&width='.vartrue($sc_parameters['width'], 150).'px'; + $parms .= '&width='.vartrue($sc_parameters['width'], 150); if(vartrue($sc_parameters['height'])) $parms .= '&height='.$sc_parameters['height'].'px'; //$parms .= "&tabindex=".$this->getNext(); //$parms .= "&click_target=data";