mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
포인트 지급 방식 변경, 댓글 수정 허용 관련 문제점 개선
This commit is contained in:
parent
ec2bbca41e
commit
a56954684a
7 changed files with 66 additions and 13 deletions
|
|
@ -59,3 +59,6 @@ $lang->search_target_list['last_login'] = '최근 로그인 일시';
|
|||
$lang->search_target_list['last_login_more'] = '최근 로그인 일시(이상)';
|
||||
$lang->search_target_list['last_login_less'] = '최근 로그인 일시(이하)';
|
||||
$lang->search_target_list['extra_vars'] = '사용자 정의';
|
||||
$lang->no_point_date = '댓글작성 포인트 기간';
|
||||
$lang->about_no_point_date = '설정한 날자보다 이전에 게시된 글에 대해서 댓글을 작성하여도 포인트를 지급하지 않습니다. (단위는 일단위)';
|
||||
$lang->day_ago = '일전';
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class pointAdminController extends point
|
|||
$config = $oModuleModel->getModuleConfig('point');
|
||||
// Arrange variables
|
||||
$args = Context::getRequestVars();
|
||||
$oModuleController = getController('module');
|
||||
|
||||
//if module IO config is off
|
||||
if($args->able_module == 'Y')
|
||||
|
|
@ -64,7 +65,10 @@ class pointAdminController extends point
|
|||
// Check if reading a document is not allowed
|
||||
if($args->disable_read_document == 'Y') $config->disable_read_document = 'Y';
|
||||
else $config->disable_read_document = 'N';
|
||||
|
||||
|
||||
//check is reading a document is not regdate setting
|
||||
$config->no_point_date = (int)$args->no_point_date;
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
$group_list = $oMemberModel->getGroups();
|
||||
|
||||
|
|
@ -114,11 +118,9 @@ class pointAdminController extends point
|
|||
$config->able_module = 'N';
|
||||
|
||||
// Delete Triggers
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->deleteModuleTriggers('point');
|
||||
}
|
||||
// Save
|
||||
$oModuleController = getController('module');
|
||||
$oModuleController->insertModuleConfig('point', $config);
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
|
|
|
|||
|
|
@ -234,10 +234,18 @@ class pointController extends point
|
|||
$document_srl = $obj->document_srl;
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
if(!$oDocument->isExists() || abs($oDocument->get('member_srl'))==abs($member_srl)) return new Object();
|
||||
// Get the point module information
|
||||
$oModuleModel = getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('point');
|
||||
if($config->no_point_date > 0)
|
||||
{
|
||||
if($oDocument->get('regdate') < date('YmdHis', strtotime('-'.$config->no_point_date.' day')))
|
||||
{
|
||||
return new Object();
|
||||
}
|
||||
}
|
||||
if(!$oDocument->isExists() || abs($oDocument->get('member_srl'))==abs($member_srl)) return new Object();
|
||||
|
||||
$module_config = $oModuleModel->getModulePartConfig('point', $module_srl);
|
||||
// Get the points of the member
|
||||
$oPointModel = getModel('point');
|
||||
|
|
|
|||
|
|
@ -91,6 +91,13 @@
|
|||
{$lang->about_disable_read_document}
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="no_point_date" class="x_control-label">{$lang->no_point_date}</label>
|
||||
<div class="x_controls" style="padding-top:3px">
|
||||
<input type="number" name="no_point_date" id="no_point_date" value="{$config->no_point_date}" style="width:50px;" />{$lang->day_ago}
|
||||
<p>{$lang->about_no_point_date}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_clearfix btnArea">
|
||||
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue