mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
조회수 설정을 세분화하여 선택하도록 함.
This commit is contained in:
parent
9659ecca83
commit
b2d4d5edd2
5 changed files with 43 additions and 39 deletions
|
|
@ -486,8 +486,7 @@ class documentAdminController extends document
|
|||
{
|
||||
// Get the basic information
|
||||
$config = new stdClass();
|
||||
$config->session_read_config = Context::get('session_read_config');
|
||||
$config->updatecount = Context::get('updatecount');
|
||||
$config->view_count_option = Context::get('view_count_option');
|
||||
// Insert by creating the module Controller object
|
||||
$oModuleController = getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('document',$config);
|
||||
|
|
|
|||
|
|
@ -891,6 +891,8 @@ class documentController extends document
|
|||
$oDocumentModel = getModel('document');
|
||||
$config = $oDocumentModel->getDocumentConfig();
|
||||
|
||||
if($config->view_count_option == 'none') return false;
|
||||
|
||||
$document_srl = $oDocument->document_srl;
|
||||
$member_srl = $oDocument->get('member_srl');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
|
@ -900,9 +902,19 @@ class documentController extends document
|
|||
if(!$trigger_output->toBool()) return $trigger_output;
|
||||
|
||||
// Pass if read count is increaded on the session information
|
||||
if($_SESSION['readed_document'][$document_srl] && $config->session_read_config == 'Y') return false;
|
||||
if($_SESSION['readed_document'][$document_srl] && $config->view_count_option == 'once')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if($config->view_count_option == 'some')
|
||||
{
|
||||
if($_SESSION['readed_document'][$document_srl])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if($config->updatecount != 'Y')
|
||||
if($config->view_count_option == 'once')
|
||||
{
|
||||
// Pass if the author's IP address is as same as visitor's.
|
||||
if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR'] && Context::getSessionStatus())
|
||||
|
|
@ -944,7 +956,7 @@ class documentController extends document
|
|||
}
|
||||
|
||||
// Register session
|
||||
if(!$_SESSION['banned_document'][$document_srl] && Context::getSessionStatus())
|
||||
if(!$_SESSION['banned_document'][$document_srl] && Context::getSessionStatus())
|
||||
{
|
||||
$_SESSION['readed_document'][$document_srl] = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -916,7 +916,7 @@ class documentModel extends document
|
|||
$config = $oModuleModel->getModuleConfig('document');
|
||||
|
||||
if(!$config) $config = new stdClass();
|
||||
if(!$config->thumbnail_type) $config->thumbnail_type = 'crop';
|
||||
if(!$config->view_count_option) $config->view_count_option = 'once';
|
||||
$GLOBALS['__document_config__'] = $config;
|
||||
}
|
||||
return $GLOBALS['__document_config__'];
|
||||
|
|
|
|||
|
|
@ -23,27 +23,20 @@
|
|||
<value xml:lang="tr"><![CDATA[Küçük Resim Türü]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Định dạng hình nhỏ]]></value>
|
||||
</item>
|
||||
<item name="read_update_count">
|
||||
<item name="view_count_option">
|
||||
<value xml:lang="ko"><![CDATA[조회수 설정]]></value>
|
||||
<value xml:lang="en"></value>
|
||||
<value xml:lang="jp"></value>
|
||||
<value xml:lang="zh-CN"></value>
|
||||
<value xml:lang="zh-TW"></value>
|
||||
<value xml:lang="fr"></value>
|
||||
<value xml:lang="ru"></value>
|
||||
<value xml:lang="tr"></value>
|
||||
<value xml:lang="vi"></value>
|
||||
</item>
|
||||
<item name="session_config">
|
||||
<value xml:lang="ko"><![CDATA[세션 조회수 증가설정]]></value>
|
||||
<value xml:lang="en"></value>
|
||||
<value xml:lang="jp"></value>
|
||||
<value xml:lang="zh-CN"></value>
|
||||
<value xml:lang="zh-TW"></value>
|
||||
<value xml:lang="fr"></value>
|
||||
<value xml:lang="ru"></value>
|
||||
<value xml:lang="tr"></value>
|
||||
<value xml:lang="vi"></value>
|
||||
<item name="view_count_option_all">
|
||||
<value xml:lang="ko"><![CDATA[모두 계산]]></value>
|
||||
</item>
|
||||
<item name="view_count_option_some">
|
||||
<value xml:lang="ko"><![CDATA[일부 계산]]></value>
|
||||
</item>
|
||||
<item name="view_count_option_once">
|
||||
<value xml:lang="ko"><![CDATA[중복 금지]]></value>
|
||||
</item>
|
||||
<item name="view_count_option_none">
|
||||
<value xml:lang="ko"><![CDATA[계산 안함]]></value>
|
||||
</item>
|
||||
<item name="thumbnail_crop">
|
||||
<value xml:lang="ko"><![CDATA[잘라내기 (정해진 크기에 꽉 찬 모습의 썸네일을 만듭니다.)]]></value>
|
||||
|
|
@ -205,8 +198,8 @@
|
|||
<value xml:lang="tr"><![CDATA[Lütfen kategori ismi giriniz]]></value>
|
||||
<value xml:lang="vi"><![CDATA[Hãy nhập tên thể loại]]></value>
|
||||
</item>
|
||||
<item name="about_read_update_count">
|
||||
<value xml:lang="ko"><![CDATA[조회수설정을 '예'로 설정할 경우 중복된 모든 조회수가 모두 기록됩니다. 만일 같은회원의 대해서 중복조회수를 카운트하지 않기를 원하시면 아니오에 설정하시기 바랍니다.]]></value>
|
||||
<item name="about_view_count_option">
|
||||
<value xml:lang="ko"><![CDATA[조회수설정에 따라 중복 조회수 카운트를 할 수 있도록 도와줍니다. 각 옵션에 따라 조회수 기록하는 방식이 달라집니다.]]></value>
|
||||
</item>
|
||||
<item name="about_expand">
|
||||
<value xml:lang="ko"><![CDATA[선택하면 늘 펼쳐진 상태로 있게 합니다.]]></value>
|
||||
|
|
|
|||
|
|
@ -6,20 +6,20 @@
|
|||
<input type="hidden" name="xe_validator_id" value="modules/document/tpl/document_config/1" />
|
||||
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->read_update_count}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="updatecount_yes"><input type="radio" name="updatecount" id="updatecount_yes" value="Y" checked="checked"|cond="$config->updatecount == 'Y'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="updatecount_no"><input type="radio" name="updatecount" id="updatecount_no" value="N" checked="checked"|cond="$config->updatecount != 'Y'" /> {$lang->cmd_no}</label>
|
||||
<p>{$lang->about_read_update_count}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">SESSION SETTING</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="session_read_yes"><input type="radio" name="session_read_config" id="session_read_yes" value="Y" checked="checked"|cond="$config->session_read_config == 'Y'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline" for="session_read_no"><input type="radio" name="session_read_config" id="session_read_no" value="N" checked="checked"|cond="$config->session_read_config != 'Y'" /> {$lang->cmd_no}</label>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->view_count_option}</label>
|
||||
<div class="x_controls">
|
||||
<select name="view_count_option">
|
||||
<option value="all" selected="selected"|cond="$config->view_count_option=='all'">{$lang->view_count_option_all}</option>
|
||||
<option value="some" selected="selected"|cond="$config->view_count_option=='some'">{$lang->view_count_option_some}</option>
|
||||
<option value="once" selected="selected"|cond="$config->view_count_option=='once'">{$lang->view_count_option_once}</option>
|
||||
<option value="none" selected="selected"|cond="$config->view_count_option=='none'">{$lang->view_count_option_none}</option>
|
||||
</select>
|
||||
<p>{$lang->about_view_count_option}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btnArea x_clearfix">
|
||||
<span class="x_pull-right" style="margin-left:10px;"><input class="btn" type="button" value="{$lang->cmd_delete_all_thumbnail}" onclick="doDeleteAllThumbnail()"/></span>
|
||||
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue