mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
세션에 대한 조회수 증감 설정 추가
This commit is contained in:
parent
a4559ee767
commit
9659ecca83
4 changed files with 25 additions and 13 deletions
|
|
@ -486,7 +486,7 @@ class documentAdminController extends document
|
|||
{
|
||||
// Get the basic information
|
||||
$config = new stdClass();
|
||||
$config->thumbnail_type = Context::get('thumbnail_type');
|
||||
$config->session_read_config = Context::get('session_read_config');
|
||||
$config->updatecount = Context::get('updatecount');
|
||||
// Insert by creating the module Controller object
|
||||
$oModuleController = getController('module');
|
||||
|
|
|
|||
|
|
@ -888,7 +888,9 @@ class documentController extends document
|
|||
{
|
||||
// Pass if Crawler access
|
||||
if(isCrawler()) return false;
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
$config = $oDocumentModel->getDocumentConfig();
|
||||
|
||||
$document_srl = $oDocument->document_srl;
|
||||
$member_srl = $oDocument->get('member_srl');
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
|
@ -898,10 +900,8 @@ 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]) return false;
|
||||
if($_SESSION['readed_document'][$document_srl] && $config->session_read_config == 'Y') return false;
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
$config = $oDocumentModel->getDocumentConfig();
|
||||
if($config->updatecount != 'Y')
|
||||
{
|
||||
// Pass if the author's IP address is as same as visitor's.
|
||||
|
|
@ -944,7 +944,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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,17 @@
|
|||
<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>
|
||||
<item name="thumbnail_crop">
|
||||
<value xml:lang="ko"><![CDATA[잘라내기 (정해진 크기에 꽉 찬 모습의 썸네일을 만듭니다.)]]></value>
|
||||
<value xml:lang="en"><![CDATA[Crop (to a specific size)]]></value>
|
||||
|
|
|
|||
|
|
@ -4,13 +4,7 @@
|
|||
<input type="hidden" name="module" value="document" />
|
||||
<input type="hidden" name="act" value="procDocumentAdminInsertConfig" />
|
||||
<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->thumbnail_type}</div>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="thumbnail_type_crop"><input type="radio" name="thumbnail_type" id="thumbnail_type_crop" value="crop" checked="checked"|cond="$config->thumbnail_type == 'crop'" /> {$lang->thumbnail_crop}</label>
|
||||
<label class="x_inline" for="thumbnail_type_ratio"><input type="radio" name="thumbnail_type" id="thumbnail_type_ratio" value="ratio" checked="checked"|cond="$config->thumbnail_type == 'ratio'" /> {$lang->thumbnail_ratio}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="x_control-group">
|
||||
<div class="x_control-label">{$lang->read_update_count}</div>
|
||||
<div class="x_controls">
|
||||
|
|
@ -19,6 +13,13 @@
|
|||
<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>
|
||||
</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