Index: branches/unlabeled/unlabeled-1.1.2/core/kernel/utility/formatters/upload_formatter.php =================================================================== diff -u -r5736 -r5765 --- branches/unlabeled/unlabeled-1.1.2/core/kernel/utility/formatters/upload_formatter.php (.../upload_formatter.php) (revision 5736) +++ branches/unlabeled/unlabeled-1.1.2/core/kernel/utility/formatters/upload_formatter.php (.../upload_formatter.php) (revision 5765) @@ -104,7 +104,12 @@ if ( isset($format) ) $options['format'] = $format; $tc_value = $this->TypeCast($value, $options); if( ($tc_value === false) || ($tc_value != $value) ) return $value; // for leaving badly formatted date on the form - + + return $this->GetFormatted($tc_value, $options); + } + + function GetFormatted($tc_value, &$options) + { if (isset($options['format'])) { switch ($options['format']) { case 'full_url': @@ -150,5 +155,18 @@ $this->DestinationPath = IMAGES_PENDING_PATH; parent::kUploadFormatter(); } + + function GetFormatted($tc_value, &$options) + { + if ($options['format'] == 'img_size') { + $upload_dir = isset($options['upload_dir']) ? $options['upload_dir'] : $this->DestinationPath; + $img_path = FULL_PATH.'/'.$upload_dir.$tc_value; + + $image_info = @getimagesize($img_path); + return ' width="'.$image_info[0].'" height="'.$image_info[1].'"'; + } + + return parent::GetFormatted($tc_value, $options); + } } \ No newline at end of file