css 및 js 호출순서 조정기능 추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2009-03-06 05:33:56 +00:00
parent 4f380d9c48
commit 61851f1dfe
2149 changed files with 109090 additions and 18689 deletions

View file

@ -15,18 +15,23 @@
* 결과를 만든후 print가 아니라 return 해주어야 한다
**/
function proc($args) {
$oModuleModel = &getModel('module');
// 대상 모듈 (mid_list는 기존 위젯의 호환을 위해서 처리하는 루틴을 유지. module_srl로 위젯에서 변경)
if($args->mid_list) {
$tmp_mid = explode(",",$args->mid_list);
$mid = $tmp_mid[0];
} else {
$mid = $args->mid;
}
$args->mid = $tmp_mid[0];
}
// 위젯 자체적으로 설정한 변수들을 체크
$title = $args->title;
if($args->mid) $args->srl = $oModuleModel->getModuleSrlByMid($args->mid);
// DocumentModel::getDailyArchivedList()를 이용하기 위한 변수 정리
$obj->mid = $mid;
$obj->module_srl = $args->srl;
// 선택된 모듈이 없으면 실행 취소
if(!$obj->module_srl) return Context::getLang('msg_not_founded');
// 모듈의 정보를 구함
$module_info = $oModuleModel->getModuleInfoByModuleSrl($obj->module_srl);
if(Context::get('search_target')=='regdate') {
$regdate = Context::get('search_keyword');
@ -38,6 +43,9 @@
$oDocumentModel = &getModel('document');
$output = $oDocumentModel->getDailyArchivedList($obj);
// 위젯 자체적으로 설정한 변수들을 체크
$title = $args->title;
// 템플릿 파일에서 사용할 변수들을 세팅
$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'));
@ -45,15 +53,26 @@
$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->prev_year = date('Y', mktime(1,0,0,1,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);
$widget_info->next_year = date('Y', mktime(1,0,0,12,$widget_info->last_day,zdate($obj->regdate,'Y'))+60*60*24);
$widget_info->mid = $widget_info->module_name = $mid;
$widget_info->title = $title;
if(count($output->data)) {
foreach($output->data as $key => $val) $widget_info->calendar[$val->month] = $val->count;
}
if($module_info->site_srl) {
$site_module_info = Context::get('site_module_info');
if($site_module_info->site_srl == $module_info->site_srl) $widget_info->domain = $site_module_info->domain;
else {
$site_info = $oModuleModel->getSiteInfo($module_info->site_srl);
$widget_info->domain = $site_info->domain;
}
} else $widget_info->domain = Context::getDefaultUrl();
$widget_info->module_info = $module_info;
$widget_info->mid = $module_info->mid;
Context::set('widget_info', $widget_info);
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)

View file

@ -28,7 +28,7 @@
</author>
<extra_vars>
<var id="mid">
<var id="srl">
<type>mid</type>
<name xml:lang="ko">대상 모듈</name>
<name xml:lang="zh-CN">模块对象</name>
@ -38,7 +38,7 @@
<name xml:lang="zh-TW">目標模組</name>
<name xml:lang="ru">Модуль назначения</name>
<description xml:lang="ko">선택하신 모듈에 등록된 글을 대상으로 합니다.</description>
<description xml:lang="zh-CN">将把选模块作为关联对象。</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>
<description xml:lang="es">Los documentos del módulo seleccionado serán objetivos.</description>
@ -46,4 +46,4 @@
<description xml:lang="zh-TW">將所選擇的模組當做連結目標。</description>
</var>
</extra_vars>
</widget>
</widget>

View file

@ -7,7 +7,6 @@
<div class="widget_calendar">
<table cellspacing="0">
<caption>
<a href="{getUrl('search_target','regdate','search_keyword',$widget_info->prev_month)}" class="back"><img src="./images/blank.gif" alt="" /></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)}" class="next"><img src="./images/blank.gif" alt="next" /></a>
</caption>
@ -35,11 +34,7 @@
<!--@if($widget_info->calendar[$cur_date])-->
{@ $item_class_name = "posted"}
<!--@if($layout_info->mid)-->
{@ $day_link = getUrl('','mid',$widget_info->module_name?$widget_info->module_name:$layout_info->mid,'search_target','regdate','search_keyword',$cur_date) }
<!--@else-->
{@ $day_link = getUrl('','mid',$widget_info->module_name?$widget_info->module_name:$mid,'search_target','regdate','search_keyword',$cur_date) }
<!--@end-->
{@ $day_link = getSiteUrl($widget_info->domain,'mid',$widget_info->module_info->mid,'search_target','regdate','search_keyword',$cur_date) }
<!--@else-->
{@ $item_class_name = ""}
{@ $day_link = ''}

View file

@ -38,4 +38,4 @@
<title xml:lang="zh-TW">隨版面</title>
</color>
</colorset>
</skin>
</skin>

View file

@ -0,0 +1,68 @@
<!--@if($colorset=="black")-->
<!--%import("css/black.css")-->
<!--@elseif($colorset=="white"||$colorset=="normal")-->
<!--%import("css/white.css")-->
<!--@end-->
<div class="widgetContainer">
<div class="widgetCalendarNavigation">
<button type="button" class="prevYear" onclick="location.href='{getUrl('search_target','regdate','search_keyword',$widget_info->prev_year)}'">&lt;&lt;</button> <button type="button" class="prevMonth" onclick="location.href='{getUrl('search_target','regdate','search_keyword',$widget_info->prev_month)}'">&lt;</button>
<button type="button" class="nextMonth" onclick="location.href='{getUrl('search_target','regdate','search_keyword',$widget_info->next_month)}'">&gt;</button> <button type="button" class="nextYear" onclick="location.href='{getUrl('search_target','regdate','search_keyword',$widget_info->next_year)}'">&gt;&gt;</button>
</div>
<table border="1" cellspacing="0" class="widgetCalendar">
<caption>{zdate($widget_info->cur_date,"Y.m")}</caption>
<thead>
<tr>
<th scope="col" class="sun">{$lang->unit_week['Sunday']}</th>
<th scope="col">{$lang->unit_week['Monday']}</th>
<th scope="col">{$lang->unit_week['Tuesday']}</th>
<th scope="col">{$lang->unit_week['Wednesday']}</th>
<th scope="col">{$lang->unit_week['Thursday']}</th>
<th scope="col">{$lang->unit_week['Friday']}</th>
<th scope="col">{$lang->unit_week['Saturday']}</th>
</tr>
</thead>
<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($widget_info->calendar[$cur_date])-->
{@ $item_class_name = "posted"}
{@ $day_link = getSiteUrl($widget_info->domain,'mid',$widget_info->module_info->mid,'search_target','regdate','search_keyword',$cur_date) }
<!--@else-->
{@ $item_class_name = ""}
{@ $day_link = ''}
<!--@end-->
<td class="<!--@if($j==0)-->sun<!--@end-->{$today_class} {$cell_class_name} {$item_class_name}">
<!--@if($day <= $widget_info->last_day)-->
<!--@if($day_link)-->
<a href="{$day_link}"><strong>{$day}</strong></a>
<!--@else-->
{$day}
<!--@end-->
<!--@else-->
&nbsp;
<!--@end-->
</td>
<!--@end-->
</tr>
<!--@end-->
<!--@end-->
</tbody>
</table>
</div>

View file

@ -0,0 +1,32 @@
@charset "utf-8";
.widgetContainer a{ text-decoration:none;}
.widgetContainer a:hover,
.widgetContainer a:active,
.widgetContainer a:focus{ text-decoration:underline;} .widgetContainer img{ border:0;}
.widgetContainer sup{ position:relative; line-height:1; display:inline-block; margin:-5px 0; *padding:0 1px;}
.widgetContainer form{ margin:0; padding:0;}
.widgetContainer fieldset{ border:0; margin:0; padding:0;}
.widgetCalendarNavigation{ position:relative; height:15px; margin-bottom:-15px; z-index:10;}
.widgetCalendarNavigation button{ position:absolute; top:0; font-size:10px; font-family:Tahoma; background:none; border:0; padding:0; cursor:pointer;}
.widgetCalendarNavigation button.prevYear{ left:0;}
.widgetCalendarNavigation button.prevMonth{ left:25px;}
.widgetCalendarNavigation button.nextYear{ right:0;}
.widgetCalendarNavigation button.nextMonth{ right:25px;}
.widgetCalendar{ position:relative; border:0; width:100%;}
.widgetCalendar caption { position:relative; padding-bottom:5px; text-align:center; font-size:12px; font-weight:bold; font-family:Tahoma;}
.widgetCalendar th,
.widgetCalendar td{ border:0; text-align:center; padding:5px 0;}
.widgetCalendar th{ font-size:12px; font-family:Tahoma; font-weight:normal;}
.widgetCalendar td,
.widgetCalendar td a{ font-size:11px; font-family:Tahoma;}
.widgetCalendar td em{ font-style:normal;}
.widgetCalendarNavigation button{ color:#999;}
.widgetCalendar caption{ color:#999;}
.widgetCalendar th{ background:#333; color:#fff;}
.widgetCalendar th.sun,
.widgetCalendar td.sun,
.widgetCalendar td em{ color:#ff1a1a;}
.widgetCalendar td,
.widgetCalendar td a{ color:#999;}
.widgetCalendar td.sun a{ color:#ff1a1a;}

View file

@ -0,0 +1,32 @@
@charset "utf-8";
.widgetContainer a{ text-decoration:none;}
.widgetContainer a:hover,
.widgetContainer a:active,
.widgetContainer a:focus{ text-decoration:underline;} .widgetContainer img{ border:0;}
.widgetContainer sup{ position:relative; line-height:1; display:inline-block; margin:-5px 0; *padding:0 1px;}
.widgetContainer form{ margin:0; padding:0;}
.widgetContainer fieldset{ border:0; margin:0; padding:0;}
.widgetCalendarNavigation{ position:relative; height:15px; margin-bottom:-15px; z-index:10;}
.widgetCalendarNavigation button{ position:absolute; top:0; font-size:10px; font-family:Tahoma; background:none; border:0; padding:0; cursor:pointer;}
.widgetCalendarNavigation button.prevYear{ left:0;}
.widgetCalendarNavigation button.prevMonth{ left:25px;}
.widgetCalendarNavigation button.nextYear{ right:0;}
.widgetCalendarNavigation button.nextMonth{ right:25px;}
.widgetCalendar{ position:relative; border:0; width:100%;}
.widgetCalendar caption { position:relative; padding-bottom:5px; text-align:center; font-size:12px; font-weight:bold; font-family:Tahoma;}
.widgetCalendar th,
.widgetCalendar td{ border:0; text-align:center; padding:5px 0;}
.widgetCalendar th{ font-size:12px; font-family:Tahoma; font-weight:normal;}
.widgetCalendar td,
.widgetCalendar td a{ font-size:11px; font-family:Tahoma;}
.widgetCalendar td em{ font-style:normal;}
.widgetCalendarNavigation button{ color:#333;}
.widgetCalendar caption{ color:#333;}
.widgetCalendar th{ background:#eee; color:#333;}
.widgetCalendar th.sun,
.widgetCalendar td.sun,
.widgetCalendar td em{ color:#ff1a1a;}
.widgetCalendar td,
.widgetCalendar td a{ color:#666;}
.widgetCalendar td.sun a{ color:#ff1a1a;}

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<skin version="0.2">
<title xml:lang="ko">기본 달력 및 글 현황 표시</title>
<title xml:lang="jp">Default カレンダーと書き込みリンク表示</title>
<title xml:lang="zh-CN">模块联动日历默认皮肤</title>
<title xml:lang="en">Default Display Calendar and Article Status</title>
<title xml:lang="zh-TW">Default 日曆預設面板</title>
<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>
<description xml:lang="zh-TW">適用於部落格的日曆預設面板。</description>
<version>0.1</version>
<date>2009-02-17</date>
<link>http://www.zeroboard.com</link>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com">
<name xml:lang="ko">제로</name>
<name xml:lang="jp">Zero</name>
<name xml:lang="zh-CN">zero</name>
<name xml:lang="en">zero</name>
<name xml:lang="zh-TW">zero</name>
</author>
<colorset>
<color name="layout">
<title xml:lang="ko">레이아웃에 맞춤</title>
<title xml:lang="jp">レイアウトに合わせる</title>
<title xml:lang="zh-CN">随布局</title>
<title xml:lang="en">레이아웃에 맞춤</title>
<title xml:lang="zh-TW">隨版面</title>
</color>
<color name="white">
<title xml:lang="ko">하얀색(기본)</title>
<title xml:lang="jp">白(デフォルト)</title>
<title xml:lang="zh-CN">白色(默认)</title>
<title xml:lang="en">White (default)</title>
<title xml:lang="zh-TW">白色(預設)</title>
</color>
<color name="black">
<title xml:lang="ko">검은색</title>
<title xml:lang="jp"></title>
<title xml:lang="en">Black</title>
<title xml:lang="zh-CN">黑色</title>
<title xml:lang="zh-TW">黑色</title>
</color>
</colorset>
</skin>