mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1333 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
a4a6c03302
commit
f8b5f3fe45
5 changed files with 197 additions and 0 deletions
25
plugins/newest_trackback/conf/info.xml
Normal file
25
plugins/newest_trackback/conf/info.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<plugin version="0.1">
|
||||||
|
<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>
|
||||||
|
<description xml:lang="ko">최근 댓글 (comment)를 출력하는 플러그인입니다.</description>
|
||||||
|
</author>
|
||||||
|
<extra_vars>
|
||||||
|
<var id="title">
|
||||||
|
<name xml:lang="ko">제목</name>
|
||||||
|
<type>text</type>
|
||||||
|
<description xml:lang="ko">최근 게시물의 제목으로 출력됩니다.</description>
|
||||||
|
</var>
|
||||||
|
<var id="list_count">
|
||||||
|
<name xml:lang="ko">목록수</name>
|
||||||
|
<type>text</type>
|
||||||
|
<description xml:lang="ko">출력될 목록의 수를 정하실 수 있습니다. (기본 5개)</description>
|
||||||
|
</var>
|
||||||
|
<var id="mid_list">
|
||||||
|
<name xml:lang="ko">대상 모듈</name>
|
||||||
|
<type>mid_list</type>
|
||||||
|
<description xml:lang="ko">선택하신 모듈에 등록된 글을 대상으로 합니다.</description>
|
||||||
|
</var>
|
||||||
|
</extra_vars>
|
||||||
|
</plugin>
|
||||||
57
plugins/newest_trackback/newest_comment.class.php
Normal file
57
plugins/newest_trackback/newest_comment.class.php
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @class newest_comment
|
||||||
|
* @author zero (zero@nzeo.com)
|
||||||
|
* @brief 최근 댓글을 출력하는 플러그인
|
||||||
|
* @version 0.1
|
||||||
|
**/
|
||||||
|
|
||||||
|
class newest_comment extends PluginHandler {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 플러그인의 실행 부분
|
||||||
|
*
|
||||||
|
* ./plugins/플러그인/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_order;
|
||||||
|
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) $plugin_info->module_name = $mid_list[0];
|
||||||
|
|
||||||
|
$plugin_info->title = $title;
|
||||||
|
$plugin_info->comment_list = $output->data;
|
||||||
|
|
||||||
|
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$args->style,$matches);
|
||||||
|
$plugin_info->width = trim($matches[3][0]);
|
||||||
|
Context::set('plugin_info', $plugin_info);
|
||||||
|
|
||||||
|
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||||
|
$tpl_path = sprintf('%sskins/%s', $this->plugin_path, $args->skin);
|
||||||
|
Context::set('colorset', $args->colorset);
|
||||||
|
|
||||||
|
// 템플릿 파일을 지정
|
||||||
|
$tpl_file = 'list';
|
||||||
|
|
||||||
|
// 템플릿 컴파일
|
||||||
|
$oTemplate = &TemplateHandler::getInstance();
|
||||||
|
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
28
plugins/newest_trackback/skins/blog_newest_comment/list.html
Normal file
28
plugins/newest_trackback/skins/blog_newest_comment/list.html
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
<!-- 설정된 컬러셋의 종류에 따라서 css파일을 import 합니다 -->
|
||||||
|
|
||||||
|
<!--@if($colorset=="normal"||!$colorset)-->
|
||||||
|
<!--%import("normal/style.css")-->
|
||||||
|
<!--@end-->
|
||||||
|
|
||||||
|
<div class="newest_comment_default_{$colorset}" style="width:100%">
|
||||||
|
<div class="newest_comment_default_box">
|
||||||
|
|
||||||
|
<!--@if($plugin_info->title)-->
|
||||||
|
<div class="title_box">
|
||||||
|
<div class="title">{$plugin_info->title}</div>
|
||||||
|
<!--@if($module_name)-->
|
||||||
|
<div class="more"><a href="{getUrl('','mid',$plugin_info->module_name)}">more</a></div>
|
||||||
|
<!--@end-->
|
||||||
|
</div>
|
||||||
|
<!--@end-->
|
||||||
|
|
||||||
|
<div class="comment_box">
|
||||||
|
<!--@foreach($plugin_info->comment_list as $val)-->
|
||||||
|
<div class="comment">
|
||||||
|
<a href="{getUrl('','document_srl',$val->document_srl)}#comment_{$val->comment_srl}">{cut_str($val->content,15,'...')}</a>
|
||||||
|
- {$val->user_name}
|
||||||
|
</div>
|
||||||
|
<!--@end-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,74 @@
|
||||||
|
.newest_comment_default_normal {
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box {
|
||||||
|
margin-bottom:5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .title_box {
|
||||||
|
padding:5px;
|
||||||
|
height:14px;
|
||||||
|
overflow:hidden;
|
||||||
|
color:#888888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .title_box .title {
|
||||||
|
font-weight:bold;
|
||||||
|
height:14px;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .title_box .more A {
|
||||||
|
float:right;
|
||||||
|
color:#AAAAAA;
|
||||||
|
text-decoration:none;
|
||||||
|
font-family:tahoma;
|
||||||
|
font-weight:bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .comment_box {
|
||||||
|
padding:5px 3px 3px 1px;
|
||||||
|
clear:both;
|
||||||
|
border:3px solid #EEEEEE;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .comment {
|
||||||
|
padding:0px 0px 5px 5px;
|
||||||
|
color:#AAAAAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .comment A {
|
||||||
|
text-decoration:none;
|
||||||
|
color:#555555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .comment A:hover {
|
||||||
|
text-decoration:underline;
|
||||||
|
color:#000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .comment A:visited {
|
||||||
|
color:#AAAAAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .comment .comment A {
|
||||||
|
font-size:7pt;
|
||||||
|
font-family:tahoma;
|
||||||
|
color:#AAAAAA;
|
||||||
|
letter-spacing:-1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .comment .writer {
|
||||||
|
font-size:9pt;
|
||||||
|
font-family:tahoma;
|
||||||
|
color:#AAAAAA;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.newest_comment_default_normal .newest_comment_default_box .regdate {
|
||||||
|
color:#AAAAAA;
|
||||||
|
font-size:8pt;
|
||||||
|
font-family:tahoma;
|
||||||
|
float:right;
|
||||||
|
}
|
||||||
13
plugins/newest_trackback/skins/blog_newest_comment/skin.xml
Normal file
13
plugins/newest_trackback/skins/blog_newest_comment/skin.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<skin>
|
||||||
|
<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">블로그 스타일로 최신 댓글을 출력합니다.</description>
|
||||||
|
</maker>
|
||||||
|
<colorset>
|
||||||
|
<color name="normal">
|
||||||
|
<title xml:lang="ko">기본 컬러</title>
|
||||||
|
</color>
|
||||||
|
</colorset>
|
||||||
|
</skin>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue