merge from 1.7.3.5(r13153:r13167)

git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2013-09-29 23:32:39 +00:00
parent cc47d2b247
commit 2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions

View file

@ -10,8 +10,8 @@
<title xml:lang="vi">Counter</title>
<title xml:lang="tr">Sayaç</title>
<description xml:lang="ko">
기본 카운터 모듈을 이용하여 전체, 어제, 오늘의 접속현황을 표시합니다.
counter모듈이 설치되어 있어야 하고 counter 애드온이 켜져 있어야 합니다.
기본 카운터 이용하여 전체, 어제, 오늘의 접속현황을 표시합니다.
counter 모듈이 설치되어 있어야 하고 counter 애드온이 켜져 있어야 합니다.
</description>
<description xml:lang="jp">
デフォルトの接続カウンターモジュールを利用して、トータル、昨日、今日の接続状況を表示します。

View file

@ -1,41 +1,42 @@
<?php
/**
* @class counter_status
* @author NHN (developers@xpressengine.com)
* @version 0.1
* @brief Display counter status by using data in the counter module
**/
/**
* @class counter_status
* @author NHN (developers@xpressengine.com)
* @version 0.1
* @brief Display counter status by using data in the counter module
*/
class counter_status extends WidgetHandler
{
/**
* @brief Widget execution
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
* After generating the result, do not print but return it.
*/
function proc($args)
{
// Get status of the accumulated, yesterday's, today's counts
$oCounterModel = &getModel('counter');
class counter_status extends WidgetHandler {
/**
* @brief Widget execution
* Get extra_vars declared in ./widgets/widget/conf/info.xml as arguments
* After generating the result, do not print but return it.
**/
function proc($args) {
// Get status of the accumulated, yesterday's, today's counts
$oCounterModel = &getModel('counter');
$site_module_info = Context::get('site_module_info');
$output = $oCounterModel->getStatus(array('00000000', date('Ymd', time()-60*60*24), date('Ymd')), $site_module_info->site_srl);
if(count($output))
$site_module_info = Context::get('site_module_info');
$output = $oCounterModel->getStatus(array('00000000', date('Ymd', time()-60*60*24), date('Ymd')), $site_module_info->site_srl);
if(count($output))
{
foreach($output as $key => $val)
{
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);
}
if(!$key) Context::set('total_counter', $val);
elseif($key == date("Ymd")) Context::set('today_counter', $val);
else Context::set('yesterday_counter', $val);
}
// Set a path of the template skin (values of skin, colorset settings)
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
Context::set('colorset', $args->colorset);
// Specify a template file
$tpl_file = 'counter_status';
// Compile a template
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
?>
}
// Set a path of the template skin (values of skin, colorset settings)
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
Context::set('colorset', $args->colorset);
// Specify a template file
$tpl_file = 'counter_status';
// Compile a template
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($tpl_path, $tpl_file);
}
}
/* End of file counter_status.class.php */
/* Location: ./widgets/counter_status/counter_status.class.php */