mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
포인트 레벨 아이콘, 회원 이미지네임등을 처리시 div,span에 a태그도 적용되도록 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4784 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7eefe43491
commit
125c0245d2
4 changed files with 11 additions and 12 deletions
|
|
@ -19,7 +19,7 @@
|
|||
require_once('./addons/member_extra_info/member_extra_info.lib.php');
|
||||
|
||||
// 1. 출력문서중에서 <div class="member_번호">content</div>를 찾아 MemberController::transImageName() 를 이용하여 이미지이름/마크로 변경
|
||||
$output = preg_replace_callback('!<(div|span)([^\>]*)member_([0-9]+)([^\>]*)>(.*?)\<\/(div|span)\>!is', 'memberTransImageName', $output);
|
||||
$output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'memberTransImageName', $output);
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -28,13 +28,10 @@
|
|||
// 이미지이름이나 마크가 없으면 원본 정보를 세팅
|
||||
if(!$image_name_file && !$image_mark_file) return $matches[0];
|
||||
|
||||
$text = $nick_name = htmlspecialchars(strip_tags($nick_name));
|
||||
if($image_name_file) $nick_name = sprintf('<img src="%s" border="0" alt="id: %s" title="id: %s" style="vertical-align:middle;margin-right:3px" />', $image_name_file, strip_tags($nick_name), strip_tags($nick_name));
|
||||
if($image_mark_file) $nick_name = sprintf('<img src="%s" border="0" alt="id: %s" title="id : %s" style="vertical-align:middle;margin-right:3px"/>%s', $image_mark_file, strip_tags($nick_name), strip_tags($nick_name), $nick_name);
|
||||
|
||||
// 이미지 이름이 있을 경우
|
||||
if($image_name_file) $text = sprintf('<img src="%s" border="0" alt="id: %s" title="id: %s" style="vertical-align:middle;margin-right:3px" />', $image_name_file, $nick_name, $nick_name);
|
||||
|
||||
if($image_mark_file) $text = sprintf('<img src="%s" border="0" alt="id: %s" title="id : %s" style="vertical-align:middle;margin-right:3px"/>%s', $image_mark_file, $nick_name, $nick_name, $text);
|
||||
|
||||
return sprintf('<span class="nowrap member_%d" style="cursor:pointer">%s</span>',$member_srl, $text);
|
||||
$orig_text = preg_replace('/'.preg_quote($matches[5],'/').'<\/'.$matches[6].'>$/', '', $matches[0]);
|
||||
return $orig_text.$nick_name.'</'.$matches[6].'>';
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue