mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
포인트 레벨 아이콘에 아이콘 중복 방지 설정을 추가함
This commit is contained in:
parent
cd177c72e9
commit
996ee8feaf
3 changed files with 36 additions and 7 deletions
|
|
@ -59,4 +59,29 @@
|
|||
<name xml:lang="ru">NAVER</name>
|
||||
<name xml:lang="zh-TW">NAVER</name>
|
||||
</author>
|
||||
|
||||
<extra_vars>
|
||||
<var name="icon_duplication" type="select">
|
||||
<title xml:lang="ko">아이콘 중복 방지 설정</title>
|
||||
<description xml:lang="ko">아이콘 중복 방지 설정을 적용할 경우 그룹아이콘이 있을때 포인트 레벨 아이콘은 띄우지 않도록 합니다.</description>
|
||||
<options value="">
|
||||
<title xml:lang="ko">적용하지 않음</title>
|
||||
<title xml:lang="zh-CN">不启用</title>
|
||||
<title xml:lang="jp">적용하지 않음</title>
|
||||
<title xml:lang="zh-TW">關閉</title>
|
||||
<title xml:lang="en">Not apply</title>
|
||||
<title xml:lang="ru">Not apply</title>
|
||||
<title xml:lang="vi">Không áp dụng</title>
|
||||
</options>
|
||||
<options value="Y">
|
||||
<title xml:lang="ko">적용</title>
|
||||
<title xml:lang="zh-CN">启用</title>
|
||||
<title xml:lang="jp">적용</title>
|
||||
<title xml:lang="zh-TW">開啟</title>
|
||||
<title xml:lang="en">Apply</title>
|
||||
<title xml:lang="ru">Apply</title>
|
||||
<title xml:lang="vi">Áp dụng</title>
|
||||
</options>
|
||||
</var>
|
||||
</extra_vars>
|
||||
</addon>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ if($called_position != "before_display_content" || Context::get('act') == 'dispP
|
|||
|
||||
require_once(_XE_PATH_ . 'addons/point_level_icon/point_level_icon.lib.php');
|
||||
|
||||
$temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9\-]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'pointLevelIconTrans', $output);
|
||||
$temp_output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9\-]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', function($matches) use($addon_info) {
|
||||
return pointLevelIconTrans($matches, $addon_info);
|
||||
}, $output);
|
||||
if($temp_output)
|
||||
{
|
||||
$output = $temp_output;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
/**
|
||||
* @brief Function to change point icon.
|
||||
*/
|
||||
function pointLevelIconTrans($matches)
|
||||
function pointLevelIconTrans($matches, $addon_info)
|
||||
{
|
||||
$member_srl = $matches[3];
|
||||
// If anonymous or not member_srl go to Hide Point Icon
|
||||
|
|
@ -15,12 +15,14 @@ function pointLevelIconTrans($matches)
|
|||
|
||||
$orig_text = preg_replace('/' . preg_quote($matches[5], '/') . '<\/' . $matches[6] . '>$/', '', $matches[0]);
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
|
||||
// Check Group Image Mark
|
||||
if($oMemberModel->getGroupImageMark($member_srl))
|
||||
if($addon_info->icon_duplication == 'Y')
|
||||
{
|
||||
return $orig_text . $matches[5] . '</' . $matches[6] . '>';
|
||||
// Check Group Image Mark
|
||||
$oMemberModel = getModel('member');
|
||||
if($oMemberModel->getGroupImageMark($member_srl))
|
||||
{
|
||||
return $orig_text . $matches[5] . '</' . $matches[6] . '>';
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($GLOBALS['_pointLevelIcon'][$member_srl]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue