diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index 163177b44..85f235a34 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -220,8 +220,21 @@ if(!is_array($options)) $options = array($options); $options_count = count($options); - for($j=0;$j<$options_count;$j++) { - $buff .= sprintf('$layout_info->extra_var->%s->options["%s"] = "%s";', $var->attrs->name, $options[$j]->attrs->value, $options[$j]->title->body); + $thumbnail_exist = false; + for($j=0; $j < $options_count; $j++) { + $thumbnail = $options[$j]->attrs->src; + if($thumbnail) { + $thumbnail = $layout_path.$thumbnail; + if(file_exists($thumbnail)) { + $buff .= sprintf('$layout_info->extra_var->%s->options["%s"]->thumbnail = "%s";', $var->attrs->name, $options[$j]->attrs->value, $thumbnail); + if(!$thumbnail_exist) { + $buff .= sprintf('$layout_info->extra_var->%s->thumbnail_exist = true;', $var->attrs->name); + $thumbnail_exist = true; + } + } + } + $buff .= sprintf('$layout_info->extra_var->%s->options["%s"]->val = "%s";', $var->attrs->name, $options[$j]->attrs->value, $options[$j]->title->body); + } } } diff --git a/modules/layout/tpl/layout_modify.html b/modules/layout/tpl/layout_modify.html index aa87ce900..9e4cb4a08 100644 --- a/modules/layout/tpl/layout_modify.html +++ b/modules/layout/tpl/layout_modify.html @@ -97,11 +97,36 @@ - -

{$var->description}

+ + + + + {@ $_img_info = getImageSize($val->thumbnail); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; } + + {@ $_width = 200; $_height = 20; $_talign = "left"; } + + + +
+ + + + + +
+ + + +

{$var->description}