From 75fe99c37b8eac9550614f1c2ab07405c1a903a6 Mon Sep 17 00:00:00 2001 From: zero Date: Sun, 5 Aug 2007 04:31:51 +0000 Subject: [PATCH] =?UTF-8?q?=EC=B5=9C=EA=B7=BC=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EC=9C=84=EC=A0=AF=EC=9D=98=20=EA=B0=80=EB=A1=9C/?= =?UTF-8?q?=EC=84=B8=EB=A1=9C=20=EA=B0=AF=EC=88=98=20=EC=A1=B0=EC=A0=88?= =?UTF-8?q?=ED=95=98=EA=B3=A0=20=EC=98=B5=EC=85=98=20=EB=85=B8=EC=B6=9C=20?= =?UTF-8?q?=EC=97=AC=EB=B6=80=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= =?UTF-8?q?=20xe=5Fofficial=20=EC=8A=A4=ED=82=A8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/trunk@2187 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/document/document.item.php | 2 +- widgets/newest_images/conf/info.xml | 112 ++++++++++++++++-- widgets/newest_images/newest_images.class.php | 46 +++++-- .../skins/default/css/normal.css | 29 ++++- widgets/newest_images/skins/default/list.html | 68 ++++++++--- .../skins/xe_official/css/normal.css | 24 ++++ .../skins/xe_official/images/blank.gif | Bin 0 -> 43 bytes .../xe_official/images/normal/bulletD0.gif | Bin 0 -> 44 bytes .../xe_official/images/normal/lineNotice.gif | Bin 0 -> 139 bytes .../newest_images/skins/xe_official/list.html | 65 ++++++++++ .../newest_images/skins/xe_official/skin.xml | 25 ++++ 11 files changed, 323 insertions(+), 48 deletions(-) create mode 100644 widgets/newest_images/skins/xe_official/css/normal.css create mode 100644 widgets/newest_images/skins/xe_official/images/blank.gif create mode 100644 widgets/newest_images/skins/xe_official/images/normal/bulletD0.gif create mode 100644 widgets/newest_images/skins/xe_official/images/normal/lineNotice.gif create mode 100644 widgets/newest_images/skins/xe_official/list.html create mode 100644 widgets/newest_images/skins/xe_official/skin.xml diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 847d7796e..0e758edf0 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -251,7 +251,7 @@ if($modified_time > $file_created_time) unlink($thumbnail_file); } - if(file_exists($thumbnail_file)&&filesize($thumbnail_file)<1) return; + if(file_exists($thumbnail_file)&&filesize($thumbnail_file)<1) return Context::getRequestUri()."common/tpl/images/blank.gif"; // 썸네일 파일이 있으면 url return if(file_exists($thumbnail_file)) return Context::getRequestUri().$thumbnail_file; diff --git a/widgets/newest_images/conf/info.xml b/widgets/newest_images/conf/info.xml index 41fa11cd2..845410f3b 100644 --- a/widgets/newest_images/conf/info.xml +++ b/widgets/newest_images/conf/info.xml @@ -15,6 +15,28 @@ This widget will show images in articles. + + 제목 + 栏目名 + タイトル + Title + text + 최근 게시물의 제목으로 출력됩니다. + 显示为最新主题列表的标题。 + 最近の書き込みのタイトルとして表示されます。 + It will be the title of the newest articles. + + + 대상 모듈 + モジュール + 对象模块 + Target Module + mid_list + 선택하신 모듈에 등록된 글을 대상으로 합니다. + チェックされたコンテンツを対象とします。 + 把被选模块中的主题作为对象。 + Articles on chosen module will be the target. + 글 제목 길이 題名の文字数 @@ -37,27 +59,91 @@ 可以指定要显示的图片宽度。(默认为100) You can set the width of image. (100 as default) - - 이미지 수 + + 가로 이미지 수 イメージ数 图片数 Number of Images text - 출력될 이미지의 수를 정하실 수 있습니다. (기본 5개) + 출력될 가로 이미지의 수를 정하실 수 있습니다. (기본 5개) 表示されるイメージの数を指定することができます(デフォルト5個)。 可以指定要显示的图片个数。(默认为5个) You can set the number of images to display. (5 as default) - - 대상 모듈 - モジュール - 对象模块 - Target Module - mid_list - 선택하신 모듈에 등록된 글을 대상으로 합니다. - チェックされたコンテンツを対象とします。 - 把被选模块中的主题作为对象。 - Articles on chosen module will be the target. + + 세로 이미지 수 + イメージ数 + 图片数 + Number of Images + text + 출력될 세로 이미지의 수를 정하실 수 있습니다. (기본 1개) + 表示されるイメージの数を指定することができます(デフォルト5個)。 + 可以指定要显示的图片个数。(默认为5个) + You can set the number of images to display. (5 as default) + + 글쓴이 표시 + 投稿者表示 + 显示昵称 + Display Author + select + + + 표시 + Y + + + 표시하지 않음 + N + + + + 작성일 표시 + 作成日表示 + 显示发表日期 + Display Registered Date + select + + + 표시 + Y + + + 표시하지 않음 + N + + + + 조회수 표시 + 照合数表示 + 显示查看数 + Display Hit + + select + + 표시 + Y + + + 표시하지 않음 + N + + + + 추천수 표시 + 推薦数表示 + 显示推荐数 + Display Votes + + select + + 표시 + Y + + + 표시하지 않음 + N + + diff --git a/widgets/newest_images/newest_images.class.php b/widgets/newest_images/newest_images.class.php index 731c7310f..7fb11dd12 100644 --- a/widgets/newest_images/newest_images.class.php +++ b/widgets/newest_images/newest_images.class.php @@ -15,16 +15,36 @@ * 결과를 만든후 print가 아니라 return 해주어야 한다 **/ function proc($args) { - // 위젯 자체적으로 설정한 변수들을 체크 - $title_length = (int)$args->title_length; - if(!$title_length) $title_length = 10; + // 글자 제목 길이 + $widget_info->title_length = (int)$args->title_length; + if(!$widget_info->title_length) $widget_info->title_length = 10; - $thumbnail_width = (int)$args->thumbnail_width; - if(!$thumbnail_width) $thumbnail_width = 100; + // 썸네일 가로 크기 + $widget_info->thumbnail_width = (int)$args->thumbnail_width; + if(!$widget_info->thumbnail_width) $widget_info->thumbnail_width = 100; - $list_count = (int)$args->list_count; - if(!$list_count) $list_count = 5; + // 가로 이미지 수 + $widget_info->rows_list_count = (int)$args->rows_list_count; + if(!$widget_info->rows_list_count) $widget_info->rows_list_count = 5; + // 세로 이미지 수 + $widget_info->cols_list_count = (int)$args->cols_list_count; + if(!$widget_info->cols_list_count) $widget_info->cols_list_count = 1; + + // 노출 여부 체크 + if($args->display_author!='Y') $widget_info->display_author = 'N'; + else $widget_info->display_author = 'Y'; + if($args->display_regdate!='Y') $widget_info->display_regdate = 'N'; + else $widget_info->display_regdate = 'Y'; + if($args->display_readed_count!='Y') $widget_info->display_readed_count = 'N'; + else $widget_info->display_readed_count = 'Y'; + if($args->display_voted_count!='Y') $widget_info->display_voted_count = 'N'; + else $widget_info->display_voted_count = 'Y'; + + // 제목 + $widget_info->title = $args->title; + + // 대상 모듈 정리 $mid_list = explode(",",$args->mid_list); // 템플릿 파일에서 사용할 변수들을 세팅 @@ -32,12 +52,11 @@ // 변수 정리 $obj->sort_index = $order_target; - $obj->list_count = $list_count; + $obj->list_count = $widget_info->rows_list_count * $widget_info->cols_list_count; // mid에 해당하는 module_srl을 구함 $oModuleModel = &getModel('module'); $module_srl_list = $oModuleModel->getModuleSrlByMid($mid_list); - $obj->module_srls = implode(",",$module_srl_list); $obj->direct_download = 'Y'; $obj->isvalid = 'Y'; @@ -57,11 +76,12 @@ $oDocumentModel = &getModel('document'); $documents_output = $oDocumentModel->getDocuments($document_srl_list); if(!count($documents_output)) return; + + foreach($documents_output as $key => $val) { + $document_list[] = $val; + } - $widget_info->document_list = $documents_output; - $widget_info->title_length = $title_length; - $widget_info->thumbnail_width = $thumbnail_width; - $widget_info->list_count = $list_count; + $widget_info->document_list = $document_list; Context::set('widget_info', $widget_info); diff --git a/widgets/newest_images/skins/default/css/normal.css b/widgets/newest_images/skins/default/css/normal.css index d31e9f0b5..a0d0ab129 100644 --- a/widgets/newest_images/skins/default/css/normal.css +++ b/widgets/newest_images/skins/default/css/normal.css @@ -1,6 +1,23 @@ -.ni_box { border:1px solid #EEEEEE; padding:5px; } -.ni_box .ni_item { float:left; margin:3px; list-style:none; text-align:center;} -.ni_box .ni_item a { color:#444444; text-decoration:none; } -.ni_box .ni_item a:visited { color:#AAAAAA; text-decoration:none; } -.ni_box .ni_item .thumbnail { border:1px solid #DDDDDD; padding:4px; } -.ni_box .ni_item .thumbnail:hover { border:1px solid #888888; padding:4px;} +.ni_box { overflow:hidden; } +.ni_box .title_box { border:1px solid #EEEEEE; padding:5px; height:14px; overflow:hidden; } +.ni_box .title_box .title { no-repeat left; font-weight:bold; height:14px; float:left; } +.ni_box .title_box .more A { float:right; color:#AAAAAA; text-decoration:none; font-weight:bold; font-size:.75em; } + +.ni_box .thumbnail_box { width:100%; table-layout:fixed; } +.ni_box .thumbnail_box .thumbnail { margin:3px; padding:3px; border:1px solid #EFEFEF; text-align:center; } +.ni_box .thumbnail_box .thumbnail:hover { border:1px solid #888888; } +.ni_box .thumbnail_box .thumbnail img { border:none; } +.ni_box .thumbnail_box .thumbnail img:hover { border:none; } + +.ni_box .thumbnail_box a { color:#444444; text-decoration:none; } +.ni_box .thumbnail_box a:visited { color:#AAAAAA; text-decoration:none; } + +.ni_box .thumbnail_box td.bottomBorder { border-bottom:1px dashed #EEEEEE; padding-bottom:5px; } +.ni_box .thumbnail_box div strong { font-weight:bold; font-size:0.75em; color:#CCCCCC; } +.ni_box .thumbnail_box div.author { color:#AAAAAA; } +.ni_box .thumbnail_box div.author a { color:#AAAAAA; } +.ni_box .thumbnail_box div.regdate { font-size:0.75em; color:#CCCCCC; margin-top:2px;} + +.ni_box .thumbnail_box div.readAndVoted { color:#AAAAAA; font-size:0.75em; } +.ni_box .thumbnail_box div.readAndVoted span.div_block { color:#DDDDDD; font-size:0.75em; } +.ni_box .thumbnail_box div.readAndVoted strong { color:orange; } diff --git a/widgets/newest_images/skins/default/list.html b/widgets/newest_images/skins/default/list.html index baf655302..ee4745f11 100644 --- a/widgets/newest_images/skins/default/list.html +++ b/widgets/newest_images/skins/default/list.html @@ -5,23 +5,61 @@
- + + + {@ $count = 0; } + + + + {@ $oDocument = $widget_info->document_list[$i*$widget_info->cols_list_count + $j]} + + + + + +
rows_list_count>1)-->class="bottomBorder"> +
+ +
+ {$oDocument->getTitleText($widget_info->title_length)} + [{$oDocument->getCommentCount()}] +
+ +
{$oDocument->getNickName()}
+ + + +
{$oDocument->getRegdate()}
+ + + +
+ + + {$lang->readed_count} {$oDocument->get('readed_count')} + + + + + + | + + {$lang->voted_count} {$oDocument->get('voted_count')} + + +
+ + +
 
+
diff --git a/widgets/newest_images/skins/xe_official/css/normal.css b/widgets/newest_images/skins/xe_official/css/normal.css new file mode 100644 index 000000000..3dadc4a9d --- /dev/null +++ b/widgets/newest_images/skins/xe_official/css/normal.css @@ -0,0 +1,24 @@ +.ni_box { padding-bottom:5px; overflow:hidden; position:relative;} +.ni_box h2 { font-size:1em; display:block; height:21px; padding:9px 0 0 9px; margin-bottom:5px; color:#000000; background:url(../images/normal/lineNotice.gif) no-repeat left bottom;} + +.ni_box .more { position:absolute; top:12px; right:11px; color:#000000; font:.8em Tahoma;} +.ni_box a.more { text-decoration:none;} +.ni_box a.more:hover { text-decoration:underline;} + +.ni_box .thumbnail_box { width:100%; table-layout:fixed; } +.ni_box .thumbnail_box .thumbnail { margin:3px; padding:3px; border:none; text-align:center; } +.ni_box .thumbnail_box .thumbnail img { border:1px solid #DEDEDE; } +.ni_box .thumbnail_box .thumbnail img:hover { border:1px solid #54564b; } + +.ni_box .thumbnail_box a { color:#000000; text-decoration:none; } +.ni_box .thumbnail_box a:visited { color:#54564b; text-decoration:none; } + +.ni_box .thumbnail_box td.bottomBorder { border-bottom:1px dashed #EEEEEE; padding-bottom:5px; } +.ni_box .thumbnail_box div strong { font-weight:bold; font-size:0.75em; color:#ed2a32; } +.ni_box .thumbnail_box div.author { color:#54564b; } +.ni_box .thumbnail_box div.author a { color:#54564b; } +.ni_box .thumbnail_box div.regdate { font-size:0.75em; color:#AAAAAA; margin-top:2px;} + +.ni_box .thumbnail_box div.readAndVoted { color:#333333; font-size:0.75em; } +.ni_box .thumbnail_box div.readAndVoted span.div_block { color:#333333; font-size:0.75em; } +.ni_box .thumbnail_box div.readAndVoted strong { color:#ed2a32; } diff --git a/widgets/newest_images/skins/xe_official/images/blank.gif b/widgets/newest_images/skins/xe_official/images/blank.gif new file mode 100644 index 0000000000000000000000000000000000000000..35d42e808f0a8017b8d52a06be2f8fec0b466a66 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE7Dgb&paUX6G7L;iE{qJ;0LZEa`2YX_ literal 0 HcmV?d00001 diff --git a/widgets/newest_images/skins/xe_official/images/normal/bulletD0.gif b/widgets/newest_images/skins/xe_official/images/normal/bulletD0.gif new file mode 100644 index 0000000000000000000000000000000000000000..e8e17d4c63d93ac478a0a54a3abc39ad94eed969 GIT binary patch literal 44 tcmZ?wbhEHbWM*JyXkcKtaNz<21B2pE79h#MpaUX6G7L=2E%mGn)&RoU2R8r! literal 0 HcmV?d00001 diff --git a/widgets/newest_images/skins/xe_official/images/normal/lineNotice.gif b/widgets/newest_images/skins/xe_official/images/normal/lineNotice.gif new file mode 100644 index 0000000000000000000000000000000000000000..dbf2c8220a7eb9d2b007167e9e0efe70cec5b33c GIT binary patch literal 139 zcmV;60CfLHNk%w1VF(8T0DuAj{x%eRe0(AP6+?1mVRU6=Aa`kWXdqN*WgtgMO;7+V z000002nPZH00L2jkEzS;52Ku++KaQ^y!#J^;z*X}iKgnxw(bkZ@=VwEjpzE#_x=wI t3Wvm^@rX<+mrU2>35`mpl&1BH&1$#YuJ;QLi^t@$`HW7h*KAJ#06We2KUn|( literal 0 HcmV?d00001 diff --git a/widgets/newest_images/skins/xe_official/list.html b/widgets/newest_images/skins/xe_official/list.html new file mode 100644 index 000000000..d7c983429 --- /dev/null +++ b/widgets/newest_images/skins/xe_official/list.html @@ -0,0 +1,65 @@ + + + + + + +
+ +

{$widget_info->title}

+ + + +
+ + {@ $count = 0; } + + + + {@ $oDocument = $widget_info->document_list[$i*$widget_info->cols_list_count + $j]} + + + + + +
rows_list_count>1)-->class="bottomBorder"> +
+ +
+ {$oDocument->getTitleText($widget_info->title_length)} + [{$oDocument->getCommentCount()}] +
+ +
{$oDocument->getNickName()}
+ + + +
{$oDocument->getRegdate()}
+ + + +
+ + + {$lang->readed_count} {$oDocument->get('readed_count')} + + + + + + | + + {$lang->voted_count} {$oDocument->get('voted_count')} + + +
+ + +
 
+ +
+ + + more + +
diff --git a/widgets/newest_images/skins/xe_official/skin.xml b/widgets/newest_images/skins/xe_official/skin.xml new file mode 100644 index 000000000..0acac1413 --- /dev/null +++ b/widgets/newest_images/skins/xe_official/skin.xml @@ -0,0 +1,25 @@ + + + 최신 이미지 위젯 기본 스킨 + 最新イメージ表示のデフォルトスキン + 最新图片列表默认皮肤 + Newest Image Widget Default Skin + + 제로 + Zero + Zero + Zero + 최신 이미지 위젯의 기본 스킨입니다. + 最新イメージを表示するウィジェットのデフォルトスキンです。 + 最新图片列表控件的默认皮肤. + This is default skin of newest image widget. + + + + 기본 컬러 + デフォルトカラー + 默认颜色 + Default Color + + +