From d29d357c60532330c3de8f2df122d1d2cbcb3eb9 Mon Sep 17 00:00:00 2001 From: zero Date: Mon, 2 Apr 2007 04:03:50 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@877 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- .../image_gallery/image_gallery.class.php | 13 ++++++++----- .../components/image_gallery/tpl/list_gallery.html | 2 +- .../editor/components/image_gallery/tpl/popup.js | 12 +++++++----- .../components/image_gallery/tpl/slide_gallery.html | 3 +-- modules/editor/components/naver_map/tpl/popup.js | 2 +- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/modules/editor/components/image_gallery/image_gallery.class.php b/modules/editor/components/image_gallery/image_gallery.class.php index 63dae031c..52555f059 100644 --- a/modules/editor/components/image_gallery/image_gallery.class.php +++ b/modules/editor/components/image_gallery/image_gallery.class.php @@ -49,11 +49,14 @@ $gallery_info->bg_color = $xml_obj->attrs->bg_color; $gallery_info->gallery_align = $xml_obj->attrs->gallery_align; - preg_match_all("/([^\"]){0,1}http([a-zA-Z0-9\_\-\:\/\.\~]*)([^\.]*)\.(gif|jpg|jpeg|png)/i",trim($xml_obj->body),$matches); - $image_list = $matches[0]; - $image_count = count($image_list); - for($i=0;$i<$image_count;$i++) $image_list[$i] = preg_replace('/^(\>|\s)/','', $image_list[$i]); - $gallery_info->image_list = $image_list; + $images_list = $xml_obj->attrs->images_list; + $images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list); + $gallery_info->images_list = explode("\n",trim($images_list)); + + if(!$gallery_info->width) { + preg_match_all('/([0-9]+)/i',$xml_obj->attrs->style,$matches); + $gallery_info->width = $matches[0][0]; + } Context::set('gallery_info', $gallery_info); diff --git a/modules/editor/components/image_gallery/tpl/list_gallery.html b/modules/editor/components/image_gallery/tpl/list_gallery.html index 54df67a0c..8d159d4ad 100644 --- a/modules/editor/components/image_gallery/tpl/list_gallery.html +++ b/modules/editor/components/image_gallery/tpl/list_gallery.html @@ -1,7 +1,7 @@