git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-12 03:59:52 +00:00
commit 8326004cb2
2773 changed files with 91485 additions and 0 deletions

View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<widget version="0.1">
<title xml:lang="ko">최근 댓글 출력</title>
<title xml:lang="zh-CN">评论列表</title>
<title xml:lang="jp">最近のコメント表示</title>
<title xml:lang="en">Display Newest Comments</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="zh-CN">zero</name>
<name xml:lang="jp">Zero</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">최근 댓글 (comment)를 출력하는 위젯입니다.</description>
<description xml:lang="zh-CN">显示最新评论列表的控件。</description>
<description xml:lang="jp">最近のコメントcommentを表示させるウィジェットです。</description>
<description xml:lang="en">This widget displays newest comments.</description>
</author>
<extra_vars>
<var id="title">
<name xml:lang="ko">제목</name>
<name xml:lang="zh-CN">栏目名</name>
<name xml:lang="jp">タイトル</name>
<name xml:lang="en">Title</name>
<type>text</type>
<description xml:lang="ko">최근 댓글의 제목으로 출력됩니다.</description>
<description xml:lang="zh-CN">显示为最新评论列表的输入的标题。</description>
<description xml:lang="jp">最近のコメント書き込みのタイトルとして表示されます。</description>
<description xml:lang="en">This will be the title of lnewest comments.</description>
</var>
<var id="list_count">
<name xml:lang="ko">목록수</name>
<name xml:lang="zh-CN">目录数</name>
<name xml:lang="jp">リスト数</name>
<name xml:lang="en">The Number of List</name>
<type>text</type>
<description xml:lang="ko">출력될 목록의 수를 정하실 수 있습니다. (기본 5개)</description>
<description xml:lang="zh-CN">可设置要显示的目录数。 (默认为5个)</description>
<description xml:lang="jp">出力されるリストの数が指定できます(デフォルト5個)</description>
<description xml:lang="en">You can set the number of list(default is 5).</description>
</var>
<var id="mid_list">
<name xml:lang="ko">대상 모듈</name>
<name xml:lang="zh-CN">模块对象</name>
<name xml:lang="jp">モジュール</name>
<name xml:lang="en">Target Module</name>
<type>mid_list</type>
<description xml:lang="ko">선택하신 모듈에 등록된 글을 대상으로 합니다.</description>
<description xml:lang="zh-CN">将把被选模块当中的主题作为对象。</description>
<description xml:lang="jp">チェックされたモジュールに登録されたコンテンツ(書き込み)を対象とします。</description>
<description xml:lang="en">The target articles for the newest comments will be the ones submitted in the selected module.</description>
</var>
</extra_vars>
</widget>

View file

@ -0,0 +1,55 @@
<?php
/**
* @class newest_comment
* @author zero (zero@nzeo.com)
* @brief 최근 댓글을 출력하는 위젯
* @version 0.1
**/
class newest_comment extends WidgetHandler {
/**
* @brief 위젯의 실행 부분
*
* ./widgets/위젯/conf/info.xml 선언한 extra_vars를 args로 받는다
* 결과를 만든후 print가 아니라 return 해주어야 한다
**/
function proc($args) {
// 위젯 자체적으로 설정한 변수들을 체크
$title = $args->title;
$order_target = $args->order_target;
$order_type = $args->order_type;
$list_count = (int)$args->list_count;
if(!$list_count) $list_count = 5;
$mid_list = explode(",",$args->mid_list);
// CommentModel::getCommentList()를 이용하기 위한 변수 정리
$obj->mid = $mid_list;
$obj->sort_index = $order_target;
$obj->list_count = $list_count;
// comment 모듈의 model 객체를 받아서 getCommentList() method를 실행
$oCommentModel = &getModel('comment');
$output = $oCommentModel->getNewestCommentList($obj);
// 템플릿 파일에서 사용할 변수들을 세팅
if(count($mid_list)==1) $widget_info->module_name = $mid_list[0];
$widget_info->title = $title;
$widget_info->comment_list = $output->data;
Context::set('widget_info', $widget_info);
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
Context::set('colorset', $args->colorset);
// 템플릿 파일을 지정
$tpl_file = 'list';
// 템플릿 컴파일
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>

View file

@ -0,0 +1,6 @@
.newestComment { position:relative; border:1px solid #e0e1db; background:url(../images/cyan/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; }
.newestComment h2 { position:relative; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; font-family:Tahoma;}
/*:first-child+html .boxTypeB h2 { height:20px;} */
.newestComment .commentList { padding:1.2em; overflow:hidden;}
.newestComment .commentList li { display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; }
.newestComment .commentList li a { color:#a4a4a4; line-height:1.5em;}

View file

@ -0,0 +1,6 @@
.newestComment { position:relative; border:1px solid #e0e1db; background:url(../images/green/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; }
.newestComment h2 { position:relative; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; font-family:Tahoma;}
/*:first-child+html .boxTypeB h2 { height:20px;} */
.newestComment .commentList { padding:1.2em; overflow:hidden;}
.newestComment .commentList li { display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; }
.newestComment .commentList li a { color:#a4a4a4; line-height:1.5em;}

View file

@ -0,0 +1,6 @@
.newestComment { position:relative; border:1px solid #e0e1db; background:url(../images/normal/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; }
.newestComment h2 { position:relative; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; font-family:Tahoma;}
/*:first-child+html .boxTypeB h2 { height:20px;} */
.newestComment .commentList { padding:1.2em; overflow:hidden;}
.newestComment .commentList li { display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; }
.newestComment .commentList li a { color:#a4a4a4; line-height:1.5em;}

View file

@ -0,0 +1,6 @@
.newestComment { position:relative; border:1px solid #e0e1db; background:url(../images/purple/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; }
.newestComment h2 { position:relative; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; font-family:Tahoma;}
/*:first-child+html .boxTypeB h2 { height:20px;} */
.newestComment .commentList { padding:1.2em; overflow:hidden;}
.newestComment .commentList li { display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; }
.newestComment .commentList li a { color:#a4a4a4; line-height:1.5em;}

View file

@ -0,0 +1,6 @@
.newestComment { position:relative; border:1px solid #e0e1db; background:url(../images/red/bgBoxTypeB.gif) repeat-x left top; margin-bottom:.7em; }
.newestComment h2 { position:relative; border-left:1px solid #ffffff; border-right:1px solid #ffffff; padding:7px 0 0 12px; height:21px; _height:20px; font-size:1em; color:#54564b; font-family:Tahoma;}
/*:first-child+html .boxTypeB h2 { height:20px;} */
.newestComment .commentList { padding:1.2em; overflow:hidden;}
.newestComment .commentList li { display:block; color:#a4a4a4; margin-right:.1em; overflow:hidden; }
.newestComment .commentList li a { color:#a4a4a4; line-height:1.5em;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

View file

@ -0,0 +1,29 @@
<!-- 설정된 컬러셋의 종류에 따라서 css파일을 import 합니다 -->
<!--@if($colorset=="cyan")-->
<!--%import("css/cyan.css")-->
<!--@elseif($colorset=="green")-->
<!--%import("css/green.css")-->
<!--@elseif($colorset=="red")-->
<!--%import("css/red.css")-->
<!--@elseif($colorset=="purple")-->
<!--%import("css/purple.css")-->
<!--@else-->
<!--%import("css/normal.css")-->
<!--@end-->
<div class="newestComment">
<div class="header">
<!--@if($widget_info->title)-->
<h2>{$widget_info->title}</h2>
<!--@else-->
<h2>newest comments</h2>
<!--@end-->
</div>
<ul class="commentList">
<!--@foreach($widget_info->comment_list as $val)-->
<li><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}">{htmlspecialchars(cut_str($val->content,20,'...'))}</a></li>
<!--@end-->
</ul>
</div>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<skin>
<title xml:lang="ko">블로그 스타일의 최신 댓글 목록</title>
<title xml:lang="jp">ブログスタイルの最新コメントリスト</title>
<title xml:lang="zh-CN">博客式最新评论列表</title>
<title xml:lang="en">Newest Comments List of Blog Style</title>
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="jp">Zero</name>
<name xml:lang="zh-CN">zero</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">블로그 스타일로 최신 댓글을 출력합니다.</description>
<description xml:lang="jp">ブログスタイルで最新のコメントを表示します。</description>
<description xml:lang="zh-CN">显示为博客式的最新评论。</description>
<description xml:lang="en">It displays newest comments with blog style.</description>
</maker>
<colorset>
<color name="normal">
<title xml:lang="ko">기본 컬러</title>
<title xml:lang="jp">デフォルトカラー</title>
<title xml:lang="zh-CN">默认颜色</title>
<title xml:lang="en">Default color</title>
</color>
<color name="cyan">
<title xml:lang="ko">청록색</title>
<title xml:lang="jp">青緑</title>
<title xml:lang="zh-CN">青绿色</title>
<title xml:lang="en">Cyan</title>
</color>
<color name="green">
<title xml:lang="ko">초록색</title>
<title xml:lang="jp"></title>
<title xml:lang="zh-CN">绿色</title>
<title xml:lang="en">Green</title>
</color>
<color name="red">
<title xml:lang="ko">빨간색</title>
<title xml:lang="jp"></title>
<title xml:lang="zh-CN">红色</title>
<title xml:lang="en">Red</title>
</color>
<color name="purple">
<title xml:lang="ko">보라색</title>
<title xml:lang="jp"></title>
<title xml:lang="zh-CN">紫色</title>
<title xml:lang="en">Purple</title>
</color>
</colorset>
</skin>

View file

@ -0,0 +1 @@
div.commentBox .header h2 { font-size:1em; color:#1187d8;}

View file

@ -0,0 +1 @@
div.commentBox .header h2 { font-size:1em; color:#9ab09f;}

View file

@ -0,0 +1,7 @@
div.commentBox { padding-bottom:1em;}
div.commentBox .header { padding:7px 0 0 12px; height:21px; _height:20px; background:#f5f5f5; }
*:first-child+html div.commentBox .header { height:20px; color:#ef2121;}
div.commentBox ul { padding:.5em; overflow:hidden;}
div.commentBox ul li { color:#a4a4a4; margin-right:.1em; line-height:1.5em;}
div.commentBox ul li a { color:#a4a4a4;}

View file

@ -0,0 +1 @@
div.commentBox .header h2 { font-size:1em; color:#8dc63f;}

View file

@ -0,0 +1 @@
div.commentBox .header h2 { font-size:1em; color:#f70795;}

View file

@ -0,0 +1 @@
div.commentBox .header h2 { font-size:1em; color:#ef2121;}

View file

@ -0,0 +1,29 @@
<!-- 설정된 컬러셋의 종류에 따라서 css파일을 import 합니다 -->
<!--%import("css/common.css")-->
<!--@if($colorset=="bluish_green")-->
<!--%import("css/bluish_green.css")-->
<!--@elseif($colorset=="green")-->
<!--%import("css/green.css")-->
<!--@elseif($colorset=="pink")-->
<!--%import("css/pink.css")-->
<!--@elseif($colorset=="blue")-->
<!--%import("css/blue.css")-->
<!--@else-->
<!--%import("css/red.css")-->
<!--@end-->
<div class="commentBox">
<div class="header">
<!--@if($widget_info->title)-->
<h2>{$widget_info->title}</h2>
<!--@else-->
<h2>newest comments</h2>
<!--@end-->
</div>
<ul>
<!--@foreach($widget_info->comment_list as $val)-->
<li><a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}">{htmlspecialchars(cut_str(strip_tags($val->content),20,'...'))}</a></li>
<!--@end-->
</ul>
</div>

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<skin>
<title xml:lang="ko">cozy simple</title>
<title xml:lang="jp">Cozyシンプル</title>
<title xml:lang="en">cozy simple skin</title>
<title xml:lang="zh-CN">Cozy样式皮肤</title>
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="jp">Zero</name>
<name xml:lang="en">zero</name>
<name xml:lang="zh-CN">제로</name>
<description xml:lang="ko">
cozy simple 위젯입니다.
디자인 : 서기정 (http://blog.naver.com/addcozy)
HTML/CSS : 소지훈
</description>
<description xml:lang="jp">
cozy simple 위젯입니다.
デザインソギジョンhttp://blog.naver.com/addcozy
HTML/CSSソジフン
</description>
<description xml:lang="en">
This is cozy simple widget.
Design : Ki-Jeong Seo (http://blog.naver.com/addcozy)
HTML/CSS : Ji-Hun So
</description>
<description xml:lang="zh-CN">
Cozy样式皮肤。
设计 : Ki-Jeong Seo (http://blog.naver.com/addcozy)
HTML/CSS : Ji-Hun So
</description>
</maker>
<colorset>
<color name="red">
<title xml:lang="ko">빨간색</title>
<title xml:lang="jp"></title>
<title xml:lang="en">Red</title>
<title xml:lang="zh-CN">红色</title>
</color>
<color name="green">
<title xml:lang="ko">초록색</title>
<title xml:lang="jp"></title>
<title xml:lang="en">Green</title>
<title xml:lang="zh-CN">绿色</title>
</color>
<color name="blue">
<title xml:lang="ko">파란색</title>
<title xml:lang="jp"></title>
<title xml:lang="en">Blue</title>
<title xml:lang="zh-CN">蓝色</title>
</color>
<color name="pink">
<title xml:lang="ko">분홍색</title>
<title xml:lang="jp">ピンク</title>
<title xml:lang="en">Pink</title>
<title xml:lang="zh-CN">粉红色</title>
</color>
<color name="bluish_green">
<title xml:lang="ko">청록색</title>
<title xml:lang="jp">青緑</title>
<title xml:lang="en">Cyan</title>
<title xml:lang="zh-CN">青绿色</title>
</color>
</colorset>
</skin>