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

This commit is contained in:
zero 2007-03-27 09:05:25 +00:00
parent 191848e302
commit 743d913aed
11 changed files with 55 additions and 248 deletions

View file

@ -1,68 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin version="0.1">
<title xml:lang="ko">최근 문서 출력</title>
<title xml:lang="en">newest document printer</title>
<title xml:lang="ko">로그인 정보 출력</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">최근 문서 (document)를 출력하는 플러그인입니다.</description>
<description xml:lang="en">display newest document</description>
<description xml:lang="ko">로그인 폼이나 로그인 정보를 출력합니다</description>
</author>
<extra_vars>
<var id="title">
<name xml:lang="ko">제목</name>
<name xml:lang="en">title</name>
<type>text</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
</var>
<var id="order_target">
<name xml:lang="ko">정렬 대상</name>
<name xml:lang="en">order target</name>
<type>select</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
<options>
<name xml:lang="ko">시간순</name>
<name xml:lang="en">regdate</name>
<value>list_order</value>
</options>
<options>
<name xml:lang="ko">업데이트순</name>
<name xml:lang="en">last update</name>
<value>update_order</value>
</options>
</var>
<var id="order_type">
<name xml:lang="ko">정렬 방법</name>
<name xml:lang="en">order type</name>
<type>select</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
<options>
<name xml:lang="ko">내림차순</name>
<name xml:lang="en">desc</name>
<value>desc</value>
</options>
<options>
<name xml:lang="ko">올림차순</name>
<name xml:lang="en">asc</name>
<value>asc</value>
</options>
</var>
<var id="list_count">
<name xml:lang="ko">목록수</name>
<name xml:lang="en">list_count</name>
<type>text</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
</var>
<var id="mid_list">
<name xml:lang="ko">대상 모듈</name>
<name xml:lang="en">target modules</name>
<type>mid_list</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
</var>
</extra_vars>
<extra_vars />
</plugin>

View file

@ -0,0 +1,37 @@
<?php
/**
* @class login_info
* @author zero (zero@nzeo.com)
* @version 0.1
* @brief 로그인 폼을 출력하는 플러그인
*
* $logged_info를 이용하며 이는 미리 설정되어 있음
**/
class login_info extends PluginHandler {
/**
* @brief 플러그인의 실행 부분
* ./plugins/플러그인/conf/info.xml에 선언한 extra_vars를 args로 받는다
* 결과를 만든후 return 해주어야 한다
**/
function proc($args) {
// 변수 설정
Context::set('style', $args->style);
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
$tpl_path = sprintf('%sskins/%s', $this->plugin_path, $args->skin);
Context::set('colorset', $args->colorset);
// 템플릿 파일을 지정
$tpl_file = 'login_info';
// 템플릿 컴파일
$oTemplate = new TemplateHandler();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>

View file

@ -1,54 +0,0 @@
<?php
/**
* @class newest_document
* @author zero (zero@nzeo.com)
* @brief 최근 게시물을 출력하는 플러그인
* @version 0.1
**/
class newest_document extends PluginHandler {
/**
* @brief 플러그인의 실행 부분
* ./plugins/플러그인/conf/info.xml에 선언한 extra_vars를 args로 받는다
* 결과를 만든후 return 해주어야 한다
**/
function proc($args) {
// 플러그인 자체적으로 설정한 변수들을 체크
$title = $args->title;
$order_target = $args->order_target;
$order_type = $args->order_type;
$list_count = (int)$args->list_order;
if(!$list_count) $list_count = 5;
$mid_list = explode(",",$args->mid_list);
// DocumentModel::getDocumentList()를 이용하기 위한 변수 정리
$obj->mid = $mid_list;
$obj->sort_index = $order_target;
$obj->list_count = $list_count;
$oDocumentModel = &getModel('document');
$output = $oDocumentModel->getDocumentList($obj);
// 템플릿 파일에서 사용할 변수들을 세팅
if(count($mid_list)==1) Context::set('module_name', $mid_list[0]);
Context::set('title', $title);
Context::set('style', $args->style);
Context::set('document_list', $output->data);
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
$tpl_path = sprintf('%sskins/%s', $this->plugin_path, $args->skin);
Context::set('colorset', $args->colorset);
// 템플릿 파일을 지정
$tpl_file = 'list';
// 템플릿 컴파일
$oTemplate = new TemplateHandler();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

View file

@ -1,79 +0,0 @@
.newest_document_default_blue {
}
.newest_document_default_blue .newest_document_default_box {
padding:5px;
}
.newest_document_default_blue .newest_document_default_box .title_box {
border:1px solid #EEEEEE;
padding:5px;
height:14px;
overflow:hidden;
}
.newest_document_default_blue .newest_document_default_box .title_box .title {
background:url(./title_bullet.gif) no-repeat left;
font-weight:bold;
height:16px;
padding-left:20px;
float:left;
}
.newest_document_default_blue .newest_document_default_box .title_box .more A {
float:right;
color:#AAAAAA;
text-decoration:none;
font-family:tahoma;
font-weight:bold;
}
.newest_document_default_blue .newest_document_default_box .document_box {
padding:3px 3px 3px 20px;
clear:both;
border-bottom:1px solid #EEEEEE;
height:16px;
margin:0px 0px 2px 0px;
overflow:hidden;
}
.newest_document_default_blue .newest_document_default_box .document {
padding:0px 0px 5px 20px;
background:url(./document_bullet.gif) no-repeat left;
float:left;
}
.newest_document_default_blue .newest_document_default_box .document A {
text-decoration:none;
color:#555555;
}
.newest_document_default_blue .newest_document_default_box .document A:hover {
text-decoration:underline;
color:#000000;
}
.newest_document_default_blue .newest_document_default_box .document A:visited {
color:#AAAAAA;
}
.newest_document_default_blue .newest_document_default_box .document .comment A {
font-size:7pt;
font-family:tahoma;
color:#AAAAAA;
letter-spacing:-1px;
}
.newest_document_default_blue .newest_document_default_box .document .writer {
font-size:9pt;
font-family:tahoma;
color:#AAAAAA;
}
.newest_document_default_blue .newest_document_default_box .regdate {
color:#AAAAAA;
font-size:8pt;
font-family:tahoma;
float:right;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

View file

@ -1,31 +0,0 @@
<!--@if($colorset=="normal"||!$colorset)-->
<!--%import("normal/style.css")-->
<!--@elseif($colorset=="blue")-->
<!--%import("blue/style.css")-->
<!--@end-->
<div class="newest_document_default_{$colorset}">
<div class="newest_document_default_box">
<div class="title_box">
<div class="title">{$title}</div>
<!--@if($module_name)-->
<div class="more"><a href="{getUrl('','mid',$module_name)}">more</a></div>
<!--@end-->
</div>
<!--@foreach($document_list as $val)-->
<div class="document_box">
<div class="document">
<a href="{getUrl('','document_srl',$val->document_srl,'comment_count', $val->comment_count)}">{$val->title}</a>
<!--@if($val->comment_count)-->
<span class="comment"><a href="{getUrl('','document_srl',$val->document_srl)}#comment_top_{$val->document_srl}">( {$val->comment_count} )</a></span>
<!--@end-->
<span class="writer">
- {$val->nick_name}
</span>
</div>
<div class="regdate">{zdate($val->regdate, "Y-m-d")}</div>
</div>
<!--@end-->
</div>
</div>

View file

@ -0,0 +1,10 @@
<!--@if($colorset=="normal"||!$colorset)-->
<!--%import("normal/style.css")-->
<!--@elseif($colorset=="blue")-->
<!--%import("blue/style.css")-->
<!--@end-->
<div class="login_info_default_{$colorset}">
<div class="login_info_default_box">
</div>
</div>

View file

@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<skin>
<title xml:lang="ko">최신글 목록 기본 스킨</title>
<title xml:lang="ko">로그인 정보 출력 기본 스킨 </title>
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<description xml:lang="ko">newest_document의 기본 스킨</description>
</maker>
<colorset>
<color name="normal" src="screenshot/normal.gif">
<color name="normal">
<title xml:lang="ko">기본</title>
</color>
<color name="blue" src="screenshot/blue.gif">
<color name="blue">
<title xml:lang="ko">푸른색</title>
</color>
</colorset>

View file

@ -1,68 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<plugin version="0.1">
<title xml:lang="ko">최근 문서 출력</title>
<title xml:lang="en">newest document printer</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">최근 문서 (document)를 출력하는 플러그인입니다.</description>
<description xml:lang="en">display newest document</description>
</author>
<extra_vars>
<var id="title">
<name xml:lang="ko">제목</name>
<name xml:lang="en">title</name>
<type>text</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
</var>
<var id="order_target">
<name xml:lang="ko">정렬 대상</name>
<name xml:lang="en">order target</name>
<type>select</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
<options>
<name xml:lang="ko">시간순</name>
<name xml:lang="en">regdate</name>
<value>list_order</value>
</options>
<options>
<name xml:lang="ko">업데이트순</name>
<name xml:lang="en">last update</name>
<value>update_order</value>
</options>
</var>
<var id="order_type">
<name xml:lang="ko">정렬 방법</name>
<name xml:lang="en">order type</name>
<type>select</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
<options>
<name xml:lang="ko">내림차순</name>
<name xml:lang="en">desc</name>
<value>desc</value>
</options>
<options>
<name xml:lang="ko">올림차순</name>
<name xml:lang="en">asc</name>
<value>asc</value>
</options>
</var>
<var id="list_count">
<name xml:lang="ko">목록수</name>
<name xml:lang="en">list_count</name>
<type>text</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
</var>
<var id="mid_list">
<name xml:lang="ko">대상 모듈</name>
<name xml:lang="en">target modules</name>
<type>mid_list</type>
<description xml:lang="ko">설명</description>
<description xml:lang="en">description</description>
</var>
</extra_vars>
</plugin>

View file

@ -6,10 +6,10 @@
<description xml:lang="ko">newest_document의 기본 스킨</description>
</maker>
<colorset>
<color name="normal" src="screenshot/normal.gif">
<color name="normal">
<title xml:lang="ko">기본</title>
</color>
<color name="blue" src="screenshot/blue.gif">
<color name="blue">
<title xml:lang="ko">푸른색</title>
</color>
</colorset>