mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Enable sending SMS from ncenterlite to phone number in member profile
This commit is contained in:
parent
1db4a9d752
commit
25162f9041
5 changed files with 28 additions and 10 deletions
|
|
@ -156,8 +156,9 @@ $lang->about_mention_limit = '서버 과부하와 스팸을 방지하기 위해
|
|||
$lang->ncenterlite_msg_setting_error = '설정에 오류가 있습니다. 다시 설정해 주세요.';
|
||||
$lang->ncenterlite_use_help = '회원들에게 전송할 알림을 선택할 수 있습니다. <br /> 모든 댓글 작성자에게 알림 기능은 게시글의 작성자가 댓글을 남길경우 게시글을 작성한 작성자를 제외하고 해당 글의 <strong>모든 댓글 작성자</strong>들에게 알림을 전송합니다.';
|
||||
$lang->ncenterlite_dont_use_push = '푸시 알림은 현재 지원중이 아닙니다.';
|
||||
$lang->member_phone_variable = '회원전화번호 변수';
|
||||
$lang->member_phone_variable_about = '회원전화번호 변수를 선택합니다. 회원전화번호 변수가 1개일 경우 설치시 자동으로 설정이 저장됩니다. 이 경우 설정을 할 필요가 없어서 설정을 선택할 수 없습니다.';
|
||||
$lang->member_phone_variable = '회원 전화번호 변수';
|
||||
$lang->member_phone_variable_about = '문자 알림 사용시 회원의 전화번호를 어디에서 불러올지 선택합니다. 회원정보의 전화번호 또는 확장변수를 선택할 수 있습니다.<br />전화번호 형태의 확장변수가 1개뿐인 경우 설치시 자동으로 설정이 저장됩니다.';
|
||||
$lang->member_phone_builtin_field = '회원정보의 전화정보';
|
||||
$lang->anonymous_voter = '추천인 익명';
|
||||
$lang->about_anonymous_voter = '추천 알림시 추천인을 익명으로 처리합니다.';
|
||||
$lang->anonymous_scrap = '스크랩 익명';
|
||||
|
|
|
|||
|
|
@ -65,9 +65,13 @@ class ncenterliteAdminController extends ncenterlite
|
|||
$config->mention_suffixes = array_map('trim', explode(',', $config->mention_suffixes));
|
||||
}
|
||||
|
||||
if($obj->variable_name === '0')
|
||||
if($obj->variable_name === '-1')
|
||||
{
|
||||
$config->variable_name = null;
|
||||
$config->variable_name = '#';
|
||||
}
|
||||
elseif($obj->variable_name === '0')
|
||||
{
|
||||
$config->variable_name = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,9 +11,7 @@ class ncenterliteAdminView extends ncenterlite
|
|||
{
|
||||
$oNcenterliteModel = getModel('ncenterlite');
|
||||
|
||||
$sms = new Rhymix\Framework\SMS;
|
||||
|
||||
if($sms::getDefaultDriver()->getName() === 'Dummy')
|
||||
if(Rhymix\Framework\SMS::getDefaultDriver()->getName() === 'Dummy')
|
||||
{
|
||||
$sms_available = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1452,7 +1452,21 @@ class ncenterliteController extends ncenterlite
|
|||
$member_info = getModel('member')->getMemberInfoByMemberSrl($args->member_srl);
|
||||
if($config->variable_name)
|
||||
{
|
||||
$phone_number = $member_info->{$config->variable_name}[0].$member_info->{$config->variable_name}[1].$member_info->{$config->variable_name}[2];
|
||||
if($config->variable_name === '#')
|
||||
{
|
||||
$phone_country = $member_info->phone_country;
|
||||
$phone_number = $member_info->phone_number;
|
||||
|
||||
// Sending SMS outside of Korea is currently not supported.
|
||||
if($phone_country !== 'KOR')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$phone_number = implode('', $member_info->{$config->variable_name});
|
||||
}
|
||||
|
||||
// Check if a Korean phone number contains a valid area code and the correct number of digits.
|
||||
$phone_format = Rhymix\Framework\Korea::isValidPhoneNumber($phone_number);
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@
|
|||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="variable_name">{$lang->member_phone_variable}</label>
|
||||
<div class="x_controls">
|
||||
<select name="variable_name" id="variable_name" disabled="disabled"|cond="empty($variable_name)">
|
||||
<option value="0">{$lang->notuse}</option>
|
||||
<select name="variable_name" id="variable_name">
|
||||
<option value="-1" selected="selected"|cond="$config->variable_name === '#'">{$lang->member_phone_builtin_field}</option>
|
||||
<option value="0" selected="selected"|cond="!$config->variable_name">{$lang->notuse}</option>
|
||||
<option loop="$variable_name => $val" value="{$val}" selected="selected"|cond="$config->variable_name == $val">{$val}</option>
|
||||
</select>
|
||||
<p class="x_help-block">{$lang->member_phone_variable_about}</p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue