mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 16:19:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1663 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8390ec57e2
commit
c814771f0f
69 changed files with 0 additions and 0 deletions
12
widgets/counter_status/conf/info.xml
Normal file
12
widgets/counter_status/conf/info.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<widget 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">
|
||||
기본 카운터 모듈을 이용하여 전체, 어제, 오늘의 접속현황을 표시합니다.
|
||||
counter모듈이 설치되어 있어야 하고 counter 애드온이 켜져 있어야 합니다.
|
||||
</description>
|
||||
</author>
|
||||
<extra_vars />
|
||||
</widget>
|
||||
42
widgets/counter_status/counter_status.class.php
Normal file
42
widgets/counter_status/counter_status.class.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
/**
|
||||
* @class counter_status
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @version 0.1
|
||||
* @brief counter 모듈의 데이터를 이용하여 counter 현황을 출력
|
||||
**/
|
||||
|
||||
class counter_status extends WidgetHandler {
|
||||
|
||||
/**
|
||||
* @brief 위젯의 실행 부분
|
||||
* ./widgets/위젯/conf/info.xml에 선언한 extra_vars를 args로 받는다
|
||||
* 결과를 만든후 print가 아니라 return 해주어야 한다
|
||||
**/
|
||||
function proc($args) {
|
||||
// 전체, 어제, 오늘 접속 현황을 가져옴
|
||||
$oCounterModel = &getModel('counter');
|
||||
|
||||
$output = $oCounterModel->getStatus(array('00000000', date('Ymd', time()-60*60*24), date('Ymd')));
|
||||
foreach($output as $key => $val) {
|
||||
if(!$key) Context::set('total_counter', $val);
|
||||
elseif($key == date("Ymd")) Context::set('today_counter', $val);
|
||||
else Context::set('yesterday_counter', $val);
|
||||
}
|
||||
|
||||
// 변수 설정
|
||||
Context::set('style', $args->style);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
Context::set('colorset', $args->colorset);
|
||||
|
||||
// 템플릿 파일을 지정
|
||||
$tpl_file = 'counter_status';
|
||||
|
||||
// 템플릿 컴파일
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
}
|
||||
?>
|
||||
21
widgets/counter_status/skins/default/counter_status.html
Normal file
21
widgets/counter_status/skins/default/counter_status.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<!--@if($colorset == "normal")-->
|
||||
<!--%import("normal/style.css")-->
|
||||
<!--@end-->
|
||||
|
||||
<div class="counter_widget">
|
||||
|
||||
<ul>
|
||||
<!--@if($total_counter)-->
|
||||
<li><strong>Total</strong> : {$total_counter->unique_visitor}</li>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($today_counter)-->
|
||||
<li><strong>Today</strong> : {$today_counter->unique_visitor}</li>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($yesterday_counter)-->
|
||||
<li><strong>Yesterday</strong> : {$yesterday_counter->unique_visitor}</li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
8
widgets/counter_status/skins/default/normal/style.css
Normal file
8
widgets/counter_status/skins/default/normal/style.css
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.counter_widget {
|
||||
border:3px solid #DDDDDD;
|
||||
padding:6px;
|
||||
margin-bottom:10px;
|
||||
color:#999999;
|
||||
font-family:tahoma;
|
||||
font-size:8pt;
|
||||
}
|
||||
13
widgets/counter_status/skins/default/skin.xml
Normal file
13
widgets/counter_status/skins/default/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">counter_status 의 기본 스킨</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