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,65 @@
<?php
/**
* @class calendar
* @author zero (zero@nzeo.com)
* @brief 보관현황 목록 출력
* @version 0.1
**/
class calendar extends WidgetHandler {
/**
* @brief 위젯의 실행 부분
*
* ./widgets/위젯/conf/info.xml 선언한 extra_vars를 args로 받는다
* 결과를 만든후 print가 아니라 return 해주어야 한다
**/
function proc($args) {
// 위젯 자체적으로 설정한 변수들을 체크
$title = $args->title;
$mid_list = explode(",",$args->mid_list);
// DocumentModel::getDailyArchivedList()를 이용하기 위한 변수 정리
$obj->mid = $mid_list;
if(Context::get('search_target')=='regdate') {
$regdate = Context::get('search_keyword');
if($regdate) $obj->regdate = zdate($regdate, 'Ym');
}
if(!$obj->regdate) $obj->regdate = date('Ym');
// document 모듈의 model 객체를 받아서 getDailyArchivedList() method를 실행
$oDocumentModel = &getModel('document');
$output = $oDocumentModel->getDailyArchivedList($obj);
// 템플릿 파일에서 사용할 변수들을 세팅
$widget_info->cur_date = $obj->regdate;
$widget_info->today_str = sprintf('%4d%s %2d%s',zdate($obj->regdate, 'Y'), Context::getLang('unit_year'), zdate($obj->regdate,'m'), Context::getLang('unit_month'));
$widget_info->last_day = date('t', ztime($obj->regdate));
$widget_info->start_week= date('w', ztime($obj->regdate));
$widget_info->prev_month = date('Ym', mktime(1,0,0,zdate($obj->regdate,'m'),1,zdate($obj->regdate,'Y'))-60*60*24);
$widget_info->next_month = date('Ym', mktime(1,0,0,zdate($obj->regdate,'m'),$widget_info->last_day,zdate($obj->regdate,'Y'))+60*60*24);
if(count($mid_list)==1) $widget_info->module_name = $mid_list[0];
$widget_info->title = $title;
if(count($output->data)) {
foreach($output->data as $key => $val) $widget_info->calendar[$val->month] = $val->count;
}
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 = 'calendar';
// 템플릿 컴파일
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>

View file

@ -0,0 +1,30 @@
<?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 Calendar</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">달력을 표시하고 등록된 글이 있는 날에 표시와 링크를 해줍니다.</description>
<description xml:lang="zh-CN">显示日历,发表主题日期将跟日历相关联。</description>
<description xml:lang="jp">カレンダーを表示して書き込みがあった日にリンクを張ります。</description>
<description xml:lang="en">This widget displays a calendar, and if there is an article submitted, the date will be highlighted with its url link.</description>
</author>
<extra_vars>
<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 will be the ones submitted in the selected module.</description>
</var>
</extra_vars>
</widget>

View file

@ -0,0 +1,60 @@
<!-- 설정된 컬러셋의 종류에 따라서 css파일을 import 합니다 -->
<!--%import("css/normal.css")-->
<div id="calendar">
<table cellspacing="0">
<caption>
<a href="{getUrl('search_target','regdate','search_keyword',$widget_info->prev_month)}"><img src="./images/buttonArrowCalendarLeft.gif" alt="prev" height="13" width="13"></a>{zdate($widget_info->cur_date,"Y")}.<span class="mm">{zdate($widget_info->cur_date,"m")}</span><a href="{getUrl('search_target','regdate','search_keyword',$widget_info->next_month)}"><img src="./images/buttonArrowCalendarRight.gif" alt="next" height="13" width="13"></a>
</caption>
{@ $day = ''}
<tbody>
<!--@for($i=0;$i<6;$i++)-->
<!--@if($day < $widget_info->last_day)-->
<tr>
<!--@for($j=0;$j<7;$j++)-->
{@ $num = $i*7 + $j}
<!--@if(!$started && $num >= $widget_info->start_week)-->
{@ $started = true}
{@ $day = 1}
{@ $cur_date = $widget_info->cur_date.sprintf('%02d',$day) }
<!--@elseif($started)-->
{@ $day++}
{@ $cur_date = $widget_info->cur_date.sprintf('%02d',$day) }
<!--@end-->
<!--@if($cur_date == date("Ymd"))-->{@ $today_class = "today"}<!--@else-->{@ $today_class = ""}<!--@end-->
<!--@if($j==0)-->{@ $cell_class_name = "sun"}<!--@else-->{@ $cell_class_name = ""}<!--@end-->
<!--@if($widget_info->calendar[$cur_date])-->
{@ $item_class_name = "posted"}
<!--@if($layout_info->mid)-->
{@ $day_link = getUrl('','mid',$layout_info->mid,'search_target','regdate','search_keyword',$cur_date) }
<!--@else-->
{@ $day_link = getUrl('','mid',$mid,'search_target','regdate','search_keyword',$cur_date) }
<!--@end-->
<!--@else-->
{@ $item_class_name = ""}
{@ $day_link = ''}
<!--@end-->
<td class="{$today_class} {$cell_class_name} {$item_class_name}">
<!--@if($day <= $widget_info->last_day)-->
<!--@if($day_link)-->
<a href="{$day_link}">{$day}</a>
<!--@else-->
{$day}
<!--@end-->
<!--@end-->
</td>
<!--@end-->
</tr>
<!--@end-->
<!--@end-->
</tbody>
</table>
</div>

View file

@ -0,0 +1,18 @@
/* Calendar */
div#calendar { padding:1.2em .8em; position:relative; border:1px solid #e0e1db; margin-bottom:.7em;}
div#calendar table { width:100%;}
div#calendar table caption { font:bold 1.5em Tahoma; color:#9a9a9a; padding-bottom:.6em;}
div#calendar table caption .mm { font:bold 1em Tahoma; color:#54564b;}
div#calendar table caption a { padding:.2em;}
div#calendar table caption a img { vertical-align:middle;}
div#calendar table th,
div#calendar table td { padding:.25em 0;}
div#calendar table th { font-weight:normal; font-size:.9em; color:#9a9a9a;}
div#calendar table th.sun { color:#fe3614;}
div#calendar table td { text-align:center;}
div#calendar table td a { font:.9em Tahoma; color:#9a9a9a;}
div#calendar table td.sun { color:#fe3614;}
div#calendar table td.sun a { color:#fe3614;}
div#calendar table td.today { font-weight:bold; color:#54564b;}
div#calendar table td.today a { font-weight:bold; color:#54564b;}
div#calendar table td.posted a { text-decoration:underline;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

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">Display Calendar and Article Status</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">calendar위젯의 블로그에 어울리는 기본 스킨입니다.</description>
<description xml:lang="jp">カレンダーcalendarウィジェットのブログに適したデフォルトスキンです。</description>
<description xml:lang="zh-CN">适合用于博客的日历默认皮肤。</description>
<description xml:lang="en">It is a default skin which matches with calendar widget's blog well.</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">cyan</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">green</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">red</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">purple</title>
<title xml:lang="zh-CN">紫色</title>
<title xml:lang="en">purple</title>
</color>
</colorset>
</skin>

View file

@ -0,0 +1,84 @@
<!-- 설정된 컬러셋의 종류에 따라서 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-->
{@ $colorset = "red" }
<!--%import("css/red.css")-->
<!--@end-->
<div class="calendarBox">
<table cellspacing="0">
<caption>
<span class="fl">{zdate($widget_info->cur_date,"Y")}.<span class="mm">{zdate($widget_info->cur_date,"m")}</span></span>
<span class="fr"><a href="{getUrl('search_target','regdate','search_keyword',$widget_info->prev_month)}"><img src="./images/{$colorset}/buttonArrowCalendarLeft.gif" alt="prev"></a><a href="{getUrl('search_target','regdate','search_keyword',$widget_info->next_month)}"><img src="./images/{$colorset}/buttonArrowCalendarRight.gif" alt="next"></a></span>
</caption>
<thead>
<tr>
<th class="sun" scope="col">S</th>
<th scope="col">M</th>
<th scope="col">T</th>
<th scope="col">W</th>
<th scope="col">T</th>
<th scope="col">F</th>
<th scope="col">S</th>
</tr>
</thead>
{@ $day = ''}
<tbody>
<!--@for($i=0;$i<6;$i++)-->
<!--@if($day < $widget_info->last_day)-->
<tr>
<!--@for($j=0;$j<7;$j++)-->
{@ $num = $i*7 + $j}
<!--@if(!$started && $num >= $widget_info->start_week)-->
{@ $started = true}
{@ $day = 1}
{@ $cur_date = $widget_info->cur_date.sprintf('%02d',$day) }
<!--@elseif($started)-->
{@ $day++}
{@ $cur_date = $widget_info->cur_date.sprintf('%02d',$day) }
<!--@end-->
<!--@if($cur_date == date("Ymd"))-->{@ $today_class = "today"}<!--@else-->{@ $today_class = ""}<!--@end-->
<!--@if($j==0)-->{@ $cell_class_name = "sun"}<!--@else-->{@ $cell_class_name = ""}<!--@end-->
<!--@if($widget_info->calendar[$cur_date])-->
{@ $item_class_name = "posted"}
<!--@if($layout_info->mid)-->
{@ $day_link = getUrl('','mid',$layout_info->mid,'search_target','regdate','search_keyword',$cur_date) }
<!--@else-->
{@ $day_link = getUrl('','mid',$mid,'search_target','regdate','search_keyword',$cur_date) }
<!--@end-->
<!--@else-->
{@ $item_class_name = ""}
{@ $day_link = ''}
<!--@end-->
<td class="{$today_class} {$cell_class_name} {$item_class_name}">
<!--@if($day <= $widget_info->last_day)-->
<!--@if($day_link)-->
<a href="{$day_link}">{$day}</a>
<!--@else-->
{$day}
<!--@end-->
<!--@end-->
</td>
<!--@end-->
</tr>
<!--@end-->
<!--@end-->
</tbody>
</table>
</div>

View file

@ -0,0 +1 @@
div.calendarBox table caption { font:bold 1em ; color:#1187d8; padding:1em;}

View file

@ -0,0 +1 @@
div.calendarBox table caption { font:bold 1em ; color:#9ab09f; padding:1em;}

View file

@ -0,0 +1,17 @@
div.calendarBox {}
div.calendarBox table { width:100%; background:url(../images/bg_line_dot_x.gif) repeat-x left top;}
div.calendarBox table caption .mm { font:bold 1em ; color:#555650;}
div.calendarBox table caption a { padding:.2em;}
div.calendarBox table caption a img { vertical-align:middle;}
div.calendarBox table th { padding:.6em 0;}
div.calendarBox table td { padding:.25em 0;}
div.calendarBox table th { font:bold .7em tahoma; color:#717171;}
div.calendarBox table th.sun { color:#000000;}
div.calendarBox table td { text-align:center; font:.8em Tahoma; color:#9a9a9a;}
div.calendarBox table td a { font:.7em Tahoma; color:#9a9a9a;}
div.calendarBox table td.sun { color:#000000;}
div.calendarBox table td.sun a { color:#000000;}
div.calendarBox table td.today a { font-weight:bold; color:#54564b;}
div.calendarBox table td.posted a { text-decoration:underline;}

View file

@ -0,0 +1 @@
div.calendarBox table caption { font:bold 1em ; color:#8dc63f; padding:1em;}

View file

@ -0,0 +1 @@
div.calendarBox table caption { font:bold 1em ; color:#f70795; padding:1em;}

View file

@ -0,0 +1 @@
div.calendarBox table caption { font:bold 1em ; color:#ec1a25; padding:1em;}

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 B

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">Zero</name>
<description xml:lang="ko">
cozy simple 위젯입니다.
디자인 : 서기정 (http://blog.naver.com/addcozy)
HTML/CSS : 소지훈
</description>
<description xml:lang="jp">
Cozyシンプルウィジェットです。
デザインソギジョン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>