git-svn-id: http://xe-core.googlecode.com/svn/trunk@1562 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-06-07 03:33:26 +00:00
parent 3f7c013fa7
commit 9a5c68a5e9
6 changed files with 123 additions and 21 deletions

View file

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin version="0.1">
<title xml:lang="ko">플래시 시계</title>
<author email_address="styx@bystyx.com" link="http://www.bystyx.com" date="2007. 2. 28">
<name xml:lang="ko">스틱스 </name>
<description xml:lang="ko">플래쉬로 된 시계를 출력합니다.</description>
</author>
<extra_vars>
<var id="best">
<name xml:lang="ko">제목</name>
<type>text</type>
<description xml:lang="ko">시계내의 제목을 바꿀 수 있습니다. (공백으로 하면 나타나지 않습니다)</description>
</var>
<var id="width">
<name xml:lang="ko">가로길이</name>
<type>text</type>
<description xml:lang="ko">가로길이를 지정하실 수 있습니다. (기본 200)</description>
</var>
<var id="theme">
<name xml:lang="ko">테마</name>
<type>select</type>
<description xml:lang="ko">흰색/검은색 배경색에 따라 조절하시면 됩니다.</description>
<options>
<name xml:lang="ko">흰색 배경</name>
<value>white</value>
</options>
<options>
<name xml:lang="ko">검은색 배경</name>
<value>black</value>
</options>
</var>
<var id="day">
<name xml:lang="ko">일자 표시</name>
<type>select</type>
<description xml:lang="ko">시계내에 일자를 표시하는 기능을 끄거나 캬실 수 있습니다.</description>
<options>
<name xml:lang="ko">나타냄</name>
<value></value>
</options>
<options>
<name xml:lang="ko">숨김</name>
<value>false</value>
</options>
</var>
</extra_vars>
</plugin>

View file

@ -0,0 +1,3 @@
<script type="text/javascript">
displayMultimedia("{$plugin_info->src}", {$plugin_info->width}, {$plugin_info->width});
</script>

Binary file not shown.

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<skin>
<title xml:lang="ko">플래시 시계 기본 컬러셋</title>
<maker email_address="styx@bystyx.com" link="http://www.bystyx.com" date="2007. 2. 28">
<name xml:lang="ko">styx</name>
<description xml:lang="ko">플래시 시계를 출력합니다.</description>
</maker>
<colorset>
<color name="normal">
<title xml:lang="ko">기본</title>
</color>
</colorset>
</skin>

View file

@ -0,0 +1,47 @@
<?php
/**
* @class styx_clock
* @author styx (styx@bystyx.com)
* @brief 플래시 시계 출력
* @version 0.1
**/
class styx_clock extends PluginHandler {
/**
* @brief 플러그인의 실행 부분
*
* ./plugins/플러그인/conf/info.xml 선언한 extra_vars를 args로 받는다
* 결과를 만든후 print가 아니라 return 해주어야 한다
**/
function proc($args) {
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
$tpl_path = sprintf('%sskins/%s', $this->plugin_path, $args->skin);
Context::set('colorset', $args->colorset);
// 템플릿 파일을 지정
$tpl_file = 'clock';
// 플러그인 자체적으로 설정한 변수들을 체크
$best = $args->best;
$theme = $args->theme;
if($theme != "white") $theme = "black";
$day = $args->day;
if($day != "false") $day = "true";
$width = $args->width;
if(!$width) $width = 200;
$plugin_info->width = $width;
$plugin_info->src = sprintf("%s/clock.swf?best=%s&theme=%s&day=%s", $tpl_path, $best, $theme, $day);
Context::set('plugin_info', $plugin_info);
// 템플릿 컴파일
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>