mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Add a limit to how many members can be mentioned at the same time
This commit is contained in:
parent
2300106aa5
commit
b4ffda4670
5 changed files with 27 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
$lang->ncenterlite = '알림센터 Lite';
|
||||
$lang->ncenterlite_install_version = '설치된 버전';
|
||||
$lang->ncenterlite_advenced_config = '고급설정';
|
||||
$lang->ncenterlite_advenced_config = '고급 설정';
|
||||
$lang->ncenterlite_document = '글';
|
||||
$lang->ncenterlite_comment = '댓글';
|
||||
$lang->ncenterlite_mention = '멘션';
|
||||
|
|
@ -121,4 +121,6 @@ $lang->mention_suffix_always_cut = '접미사가 포함된 이름 처리';
|
|||
$lang->mention_suffix_always_cut_y = '접미사를 제외한 이름의 회원 우선';
|
||||
$lang->mention_suffix_always_cut_n = '접미사를 포함한 이름의 회원 우선';
|
||||
$lang->about_mention_suffix_always_cut = '\'알림센터님\'이라는 회원과 \'알림센터\'라는 회원이 모두 있을 경우 @알림센터님을 멘션하면 누구에게 알릴지 선택합니다.';
|
||||
$lang->mention_limit = '멘션 갯수 제한';
|
||||
$lang->about_mention_limit = '서버 과부하와 스팸을 방지하기 위해 한 글에서 지나치게 많은 회원들을 호출하지 못하도록 합니다.';
|
||||
$lang->ncenterlite_msg_setting_error = '설정에 오류가 있습니다. 다시 설정해 주세요.';
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ class ncenterliteAdminController extends ncenterlite
|
|||
'mention_names',
|
||||
'mention_suffixes',
|
||||
'mention_suffix_always_cut',
|
||||
'mention_limit',
|
||||
'hide_module_srls',
|
||||
'admin_notify_module_srls',
|
||||
'skin',
|
||||
|
|
|
|||
|
|
@ -1080,6 +1080,16 @@ class ncenterliteController extends ncenterlite
|
|||
// Find members.
|
||||
foreach ($mentions as $mention)
|
||||
{
|
||||
if (isset($members[$mention]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (count($members) >= $config->mention_limit)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if ($config->mention_suffix_always_cut != 'Y')
|
||||
{
|
||||
if ($config->mention_names === 'id')
|
||||
|
|
|
|||
|
|
@ -28,6 +28,10 @@ class ncenterliteModel extends ncenterlite
|
|||
$config->mention_suffixes = array('님', '様', 'さん', 'ちゃん');
|
||||
}
|
||||
unset($config->mention_format);
|
||||
if(!isset($config->mention_limit))
|
||||
{
|
||||
$config->mention_limit = 20;
|
||||
}
|
||||
if(!$config->hide_module_srls) $config->hide_module_srls = array();
|
||||
if(!is_array($config->hide_module_srls)) $config->hide_module_srls = explode('|@|', $config->hide_module_srls);
|
||||
if(!$config->document_read) $config->document_read = 'Y';
|
||||
|
|
|
|||
|
|
@ -39,6 +39,15 @@
|
|||
<p class="x_help-block">{$lang->about_mention_suffix_always_cut}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->mention_limit}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline">
|
||||
<input type="number" name="mention_limit" value="{intval($config->mention_limit)}" />
|
||||
</label>
|
||||
<p class="x_help-block">{$lang->about_mention_limit}</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue