mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
알림기능 옵션 코드 정리
This commit is contained in:
parent
a090c3080a
commit
6b3a4f0fc3
3 changed files with 33 additions and 36 deletions
|
|
@ -26,7 +26,6 @@ $lang->ncenterlite_my_settings = '내 알림 설정';
|
|||
$lang->ncenterlite_user_settings = '사용자 알림 설정';
|
||||
$lang->ncenterlite_notify_settings = '알림 설정';
|
||||
$lang->ncenterlite_userconfig_title = '%s님의 알림센터 설정';
|
||||
$lang->ncenterlite_sms_message_use = 'SMS 문자알림';
|
||||
$lang->ncenterlite_userconfig_about = '알림센터의 개인의 설정을 저장하도록 합니다.';
|
||||
$lang->ncenterlite_comment_noti = '댓글 알림';
|
||||
$lang->ncenterlite_comment_noti_about = '내 게시물의 혹은 내 댓글에 댓글이 달릴경우 알림을 받습니다.';
|
||||
|
|
@ -124,7 +123,8 @@ $lang->about_mention_suffix_always_cut = '\'알림센터님\'이라는 회원과
|
|||
$lang->mention_limit = '멘션 갯수 제한';
|
||||
$lang->about_mention_limit = '서버 과부하와 스팸을 방지하기 위해 한 글에서 지나치게 많은 회원들을 호출하지 못하도록 합니다.';
|
||||
$lang->ncenterlite_msg_setting_error = '설정에 오류가 있습니다. 다시 설정해 주세요.';
|
||||
$lang->ncenterlite_use_sms_help = '이 옵션을 사용하게 되면 회원들에게 문자메세지 서비스를 이용하여 알림을 보낼 수 있습니다.';
|
||||
$lang->ncenterlite_use_help = '회원들에게 전송할 알림을 선택할 수 있습니다.';
|
||||
$lang->ncenterlite_dont_use_push = '푸시 알림은 현재 지원중이 아닙니다.';
|
||||
$lang->member_phone_variable = '회원전화번호 변수';
|
||||
$lang->member_phone_variable_about = '회원전화번호 변수를 선택합니다. 회원전화번호 변수가 1개일 경우 설치시 자동으로 설정이 저장됩니다. 이 경우 설정을 할 필요가 없어서 설정을 선택할 수 없습니다.';
|
||||
$lang->fail_module_install = '모듈설치에 실패하였습니다.';
|
||||
|
|
|
|||
|
|
@ -20,6 +20,19 @@ class ncenterliteModel extends ncenterlite
|
|||
{
|
||||
$config->use = array('message' => 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(count($config->use) && !is_array(array_first($config->use)))
|
||||
{
|
||||
$config->use['mention']['web'] = $config->use['mention'];
|
||||
$config->use['comment']['web'] = $config->use['comment'];
|
||||
$config->use['comment_comment']['web'] = $config->use['comment_comment'];
|
||||
$config->use['vote']['web'] = $config->use['vote'];
|
||||
$config->use['message']['web'] = $config->use['message'];
|
||||
$config->use['admin_content']['web'] = $config->use['admin_content'];
|
||||
getController('module')->insertModuleConfig('ncenterlite', $config);
|
||||
}
|
||||
}
|
||||
if(!$config->display_use) $config->display_use = 'all';
|
||||
|
||||
if(!$config->mention_names) $config->mention_names = 'nick_name';
|
||||
|
|
@ -38,7 +51,6 @@ class ncenterliteModel extends ncenterlite
|
|||
if(!$config->skin) $config->skin = 'default';
|
||||
if(!$config->colorset) $config->colorset = 'black';
|
||||
if(!$config->zindex) $config->zindex = '9999';
|
||||
if(!$config->use_sms) $config->use_sms = 'N';
|
||||
|
||||
self::$config = $config;
|
||||
}
|
||||
|
|
@ -508,37 +520,28 @@ class ncenterliteModel extends ncenterlite
|
|||
|
||||
if($oSmsHandler === null)
|
||||
{
|
||||
$config = self::getConfig();
|
||||
if($config->use_sms != 'Y')
|
||||
$oSmsHandler = new Rhymix\Framework\SMS;
|
||||
|
||||
if($oSmsHandler::getDefaultDriver()->getName() === 'Dummy')
|
||||
{
|
||||
$oSmsHandler = false;
|
||||
return $oSmsHandler;
|
||||
}
|
||||
else
|
||||
|
||||
$variable_name = array();
|
||||
$member_config = getModel('member')->getMemberConfig();
|
||||
foreach($member_config->signupForm as $value)
|
||||
{
|
||||
$oSmsHandler = new Rhymix\Framework\SMS;
|
||||
|
||||
if($oSmsHandler::getDefaultDriver()->getName() === 'Dummy')
|
||||
if($value->type == 'tel')
|
||||
{
|
||||
$oSmsHandler = false;
|
||||
return $oSmsHandler;
|
||||
$variable_name[] = $value->name;
|
||||
}
|
||||
}
|
||||
|
||||
$variable_name = array();
|
||||
$member_config = getModel('member')->getMemberConfig();
|
||||
foreach($member_config->signupForm as $value)
|
||||
{
|
||||
if($value->type == 'tel')
|
||||
{
|
||||
$variable_name[] = $value->name;
|
||||
}
|
||||
}
|
||||
|
||||
if(empty($variable_name))
|
||||
{
|
||||
$oSmsHandler = false;
|
||||
return $oSmsHandler;
|
||||
}
|
||||
if(empty($variable_name))
|
||||
{
|
||||
$oSmsHandler = false;
|
||||
return $oSmsHandler;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,16 +50,10 @@
|
|||
<label for="admin_content_mail" class="x_inline"><input type="checkbox" name="use[admin_content][mail]" id="admin_content_mail" value="1" checked="checked"|cond="isset($config->use['admin_content']['mail'])" /> {$lang->cmd_mail_notify}</label>
|
||||
<label for="admin_content_sms" class="x_inline"><input type="checkbox" name="use[admin_content][sms]" id="admin_content_sms" value="1" checked="checked"|cond="isset($config->use['admin_content']['sms'])" /> {$lang->cmd_sms_notify}</label>
|
||||
<label for="admin_content_push" class="x_inline"><input type="checkbox" name="use[admin_content][push]" id="admin_content_push" value="1" checked="checked"|cond="isset($config->use['admin_content']['push'])" /> {$lang->cmd_push_notify}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="use_sms">{$lang->ncenterlite_sms_message_use}</label>
|
||||
<div class="x_controls">
|
||||
<select name="use_sms" disabled="disabled"|cond="!$sms_available" id="use_sms">
|
||||
<option value="Y" selected="selected"|cond="$config->use_sms=='Y' && $sms_available">{$lang->ncenterlite_activate}</option>
|
||||
<option value="N" selected="selected"|cond="$config->use_sms=='N' || !$sms_available">{$lang->ncenterlite_inactivate}</option>
|
||||
</select>
|
||||
<p>{$lang->ncenterlite_use_sms_help}</p>
|
||||
<p>
|
||||
<div>{$lang->ncenterlite_use_help}</div>
|
||||
<div><span class="x_label x_label-important">{$lang->ncenterlite_warning}</span> {$lang->ncenterlite_dont_use_push}</div>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue