추천 알림시 추천인 익명 처리를 할 수 있도록 옵션 추가

This commit is contained in:
conory 2019-01-24 13:03:19 +09:00
parent d0ec85db3b
commit afd69cab25
5 changed files with 34 additions and 2 deletions

View file

@ -38,6 +38,7 @@ $lang->ncenterlite_message_string_plural = 'You have <strong>%d</strong> unread
$lang->ncenterlite_message_mention = '<strong>%1$s</strong> sent you a message, "%2$s".';
$lang->ncenterlite_test_noti = 'Hello, <strong>%s</strong>! This is a test notification.';
$lang->ncenterlite_vote = '<strong>%1$s</strong> upvoted your %3$s, "%2$s".';
$lang->ncenterlite_vote_anonymous = 'upvoted your %2$s, "%1$s".';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong> wrote "%3$s" on <strong>%2$s</strong>.';
$lang->ncenterlite_insert_member_message = '<strong>%s!</strong> Welcome to the <strong>membership!!</strong>';
$lang->ncenterlite_content_image = '(Image)';
@ -106,3 +107,5 @@ $lang->dont_check_notify_delete = 'Unread notifications will be deleted, too.';
$lang->user_notify_setting = 'User notify setting.';
$lang->about_user_notify_setting = 'Each member can set a notify settings. Warning! If a member setting not use notifications, they will not be notified regardless of their default settings.';
$lang->msg_not_use_user_setting = 'user setting\'s not use. Please contact your administrator.';
$lang->anonymous_voter = 'anonymous voter';
$lang->about_anonymous_voter = 'anonymize voter in vote notification';

View file

@ -48,6 +48,7 @@ $lang->ncenterlite_message_string_plural = '<strong>%d</strong>개의 읽지 않
$lang->ncenterlite_message_mention = '<strong>%s</strong>님이 <strong>"%s"</strong>라고 메시지를 보내셨습니다.';
$lang->ncenterlite_test_noti = '<strong>%s</strong>님! 테스트 알림입니다.';
$lang->ncenterlite_vote = '<strong>%s</strong>님이 회원님의 <strong>"%s"</strong> %s을 추천하였습니다.';
$lang->ncenterlite_vote_anonymous = '회원님의 <strong>"%s"</strong> %s이 추천되었습니다.';
$lang->ncenterlite_admin_content_message = '<strong>%1$s</strong>님이 <strong>"%2$s"</strong> 게시판에 <strong>"%3$s"</strong>라고 글을 남겼습니다.';
$lang->ncenterlite_insert_member_message = '<strong>%s</strong>님 <strong>회원가입</strong>을 환영합니다!!';
$lang->ncenterlite_content_image = '(이미지)';
@ -136,6 +137,8 @@ $lang->ncenterlite_use_help = '회원들에게 전송할 알림을 선택할 수
$lang->ncenterlite_dont_use_push = '푸시 알림은 현재 지원중이 아닙니다.';
$lang->member_phone_variable = '회원전화번호 변수';
$lang->member_phone_variable_about = '회원전화번호 변수를 선택합니다. 회원전화번호 변수가 1개일 경우 설치시 자동으로 설정이 저장됩니다. 이 경우 설정을 할 필요가 없어서 설정을 선택할 수 없습니다.';
$lang->anonymous_voter = '추천인 익명';
$lang->about_anonymous_voter = '추천 알림시 추천인을 익명으로 처리합니다.';
$lang->fail_module_install = '모듈설치에 실패하였습니다.';
$lang->cmd_web_notify = '웹 알림';
$lang->cmd_mail_notify = '메일 알림';

View file

@ -30,6 +30,7 @@ class ncenterliteAdminController extends ncenterlite
'use_sms',
'variable_name',
'user_notify_setting',
'anonymous_voter',
);
foreach($config_vars as $val)

View file

@ -69,6 +69,10 @@ class ncenterliteModel extends ncenterlite
{
$config->user_notify_setting = 'N';
}
if(!$config->anonymous_voter)
{
$config->anonymous_voter = 'N';
}
self::$config = $config;
}
@ -489,7 +493,9 @@ class ncenterliteModel extends ncenterlite
default:
return $this->getNotifyTypeString($notification->notify_type, unserialize($notification->target_body)) ?: $lang->ncenterlite;
}
$config = $this->getConfig();
// Get the notification text.
switch ($notification->target_type)
{
@ -537,7 +543,14 @@ class ncenterliteModel extends ncenterlite
// Voted.
case 'V':
$str = sprintf(lang('ncenterlite_vote'), $notification->target_nick_name, $notification->target_summary, $type);
if($config->anonymous_voter === 'Y')
{
$str = sprintf(lang('ncenterlite_vote_anonymous'), $notification->target_summary, $type);
}
else
{
$str = sprintf(lang('ncenterlite_vote'), $notification->target_nick_name, $notification->target_summary, $type);
}
break;
// Admin notification.

View file

@ -58,6 +58,18 @@
<p class="x_help-block">{$lang->about_mention_limit}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->anonymous_voter}</label>
<div class="x_controls">
<label class="x_inline">
<input type="radio" id="anonymous_voter_y" name="anonymous_voter" value="Y" checked="checked"|cond="$config->anonymous_voter === 'Y'" /> {$lang->use}
</label>
<label class="x_inline">
<input type="radio" id="anonymous_voter_n" name="anonymous_voter" value="N" checked="checked"|cond="$config->anonymous_voter !== 'Y'" /> {$lang->notuse}
</label>
<p class="x_help-block">{$lang->about_anonymous_voter}</p>
</div>
</div>
</section>
<div class="x_clearfix btnArea">
<div class="x_pull-right">