mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
english comments added
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0_english@8278 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
693e215bc1
commit
4d272994dd
219 changed files with 6407 additions and 8705 deletions
|
|
@ -4,20 +4,18 @@
|
|||
/**
|
||||
* @file image_name.addon.php
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 사용자의 이미지이름/ 이미지마크등을 출력
|
||||
* @brief Display user image name/image mark
|
||||
*
|
||||
* <div class="member_회원번호">....</div> 로 정의가 된 부분을 찾아 회원번호를 구해서
|
||||
* 이미지이름, 이미지마크가 있는지를 확인하여 있으면 내용을 변경해버립니다.
|
||||
* Find member_srl in the part with <div class="member_회원번호"> .... </div>
|
||||
* Check if ther is image name and image mark. Then change it.
|
||||
**/
|
||||
|
||||
/**
|
||||
* 출력되기 바로 직전일 경우에 이미지이름/이미지마크등을 변경
|
||||
* Just before displaying, change image name/ image mark
|
||||
**/
|
||||
if($called_position != "before_display_content" || Context::get('act')=='dispPageAdminContentModify') return;
|
||||
|
||||
// 회원 이미지이름/ 마크/ 찾아서 대체할 함수를 담고 있는 파일을 include
|
||||
// Include a file having functions to replace member image name/mark
|
||||
require_once('./addons/member_extra_info/member_extra_info.lib.php');
|
||||
|
||||
// 1. 출력문서중에서 <div class="member_번호">content</div>를 찾아 MemberController::transImageName() 를 이용하여 이미지이름/마크로 변경
|
||||
// 1. Find a part <div class="member_번호"> content </div> in the output document, change it to image name/mark by using MemberController::transImageName()
|
||||
$output = preg_replace_callback('!<(div|span|a)([^\>]*)member_([0-9]+)([^\>]*)>(.*?)\<\/(div|span|a)\>!is', 'memberTransImageName', $output);
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
<?php
|
||||
/**
|
||||
* @brief div 또는 span에 member_번호 가 있을때 해당 회원 번호에 맞는 이미지이름이나 닉이미지를 대체
|
||||
* @brief If member_srl exists in the div or span, replace to image name or nick image for each member_srl
|
||||
**/
|
||||
function memberTransImageName($matches) {
|
||||
|
||||
// 회원번호를 추출하여 0보다 찾으면 본문중 text만 return
|
||||
// If member_srl < 0, then return text only in the body
|
||||
$member_srl = $matches[3];
|
||||
if($member_srl<0) return $matches[5];
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_image = $oMemberModel->getGroupImageMark($member_srl,$site_module_info->site_srl);
|
||||
|
||||
// 회원이 아닐경우(member_srl = 0) 본문 전체를 return
|
||||
// If member_srl=o(not a member), return the entire body
|
||||
$nick_name = $matches[5];
|
||||
if(!$member_srl) return $matches[0];
|
||||
|
||||
// 전역변수에 미리 설정한 데이터가 있다면 그걸 return
|
||||
// If pre-defined data in the global variablesm return it
|
||||
if(!$GLOBALS['_transImageNameList'][$member_srl]->cached) {
|
||||
$GLOBALS['_transImageNameList'][$member_srl]->cached = true;
|
||||
$image_name_file = sprintf('files/member_extra_info/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||
|
|
@ -29,8 +26,7 @@
|
|||
$image_name_file = $GLOBALS['_transImageNameList'][$member_srl]->image_name_file;
|
||||
$image_mark_file = $GLOBALS['_transImageNameList'][$member_srl]->image_mark_file;
|
||||
}
|
||||
|
||||
// 이미지이름이나 마크가 없으면 원본 정보를 세팅
|
||||
// If image name and mark doesn't exist, set the original information
|
||||
if(!$image_name_file && !$image_mark_file && !$group_image) return $matches[0];
|
||||
|
||||
if($image_name_file) $nick_name = sprintf('<img src="%s%s" border="0" alt="id: %s" title="id: %s" style="vertical-align:middle;margin-right:3px" />', Context::getRequestUri(),$image_name_file, strip_tags($nick_name), strip_tags($nick_name));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue