mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@757 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bf280a8a53
commit
5666d36e4c
5 changed files with 82 additions and 19 deletions
|
|
@ -135,7 +135,7 @@
|
|||
**/
|
||||
function procInsertConfig() {
|
||||
// 기본 정보를 받음
|
||||
$args = Context::gets('enable_join','redirect_url','agreement');
|
||||
$args = Context::gets('enable_join','redirect_url','agreement','image_name','image_mark');
|
||||
if($args->enable_join!='Y') $args->enable_join = 'N';
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
|
|
@ -659,26 +659,29 @@
|
|||
|
||||
// 전역변수에 미리 설정한 데이터가 있다면 그걸 return
|
||||
if(!$GLOBALS['_transImageNameList'][$member_srl]) {
|
||||
// 이미지 이름 체크
|
||||
$image_name_file = sprintf('./files/attach/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||
if(file_exists($image_name_file)) list($name_width, $name_height, $type, $attrs) = getimagesize($image_name_file);
|
||||
$oMemberModel = &getModel('member');
|
||||
|
||||
// 이미지 마크 체크 (가로 길이 20px 이내의 마크만 고려하고 직접 style로 표시를 해 준다, css를 쓸수가 없으므로)
|
||||
$image_mark_file = sprintf('./files/attach/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||
if(file_exists($image_mark_file)) list($mark_width, $mark_height, $type, $attrs) = getimagesize($image_mark_file);
|
||||
$image_name = $oMemberModel->getImageName($member_srl);
|
||||
$image_mark = $oMemberModel->getImageMark($member_srl);
|
||||
|
||||
if(!$name_width && !$mark_width) return $matches[0];
|
||||
// 이미지이름이나 마크가 없으면 원본 정보를 세팅
|
||||
if(!$image_name && !$image_mark) {
|
||||
$GLOBALS['_transImageNameList'][$member_srl] = $matches[0];
|
||||
|
||||
if($name_width) {
|
||||
if($mark_height && $mark_height > $name_height) $top_margin = ($mark_height - $name_height)/2;
|
||||
else $top_margin = 0;
|
||||
$text = sprintf('<img src="%s" border="0" alt="image" width="%s" height="%s" style="margin-top:%dpx;"/>', $image_name_file, $name_width, $name_height, $top_margin);
|
||||
// 이름이나 마크가 하나라도 있으면 변경
|
||||
} else {
|
||||
|
||||
if($image_name->width) {
|
||||
if($image_mark->height && $image_mark->height > $image_name->height) $top_margin = ($image_mark->height - $image_name->height)/2;
|
||||
else $top_margin = 0;
|
||||
$text = sprintf('<img src="%s" border="0" alt="image" width="%s" height="%s" style="margin-top:%dpx;"/>', $image_name->file, $image_name->width, $image_name->height, $top_margin);
|
||||
}
|
||||
|
||||
if($image_mark->width) $buff = sprintf('<div style="background:url(%s) no-repeat left;padding-left:%dpx; height:%dpx">%s</div>', $image_mark->file, $image_mark->width+2, $image_mark->height, $text);
|
||||
else $buff = $text;
|
||||
|
||||
$GLOBALS['_transImageNameList'][$member_srl] = str_replace($matches[4], $buff, $matches[0]);
|
||||
}
|
||||
|
||||
if($mark_width) $buff = sprintf('<div style="background:url(%s) no-repeat left;padding-left:%dpx; height:%dpx">%s</div>', $image_mark_file, $mark_width+2, $mark_height, $text);
|
||||
else $buff = $text;
|
||||
|
||||
$GLOBALS['_transImageNameList'][$member_srl] = str_replace($matches[4], $buff, $matches[0]);
|
||||
}
|
||||
|
||||
return $GLOBALS['_transImageNameList'][$member_srl];
|
||||
|
|
|
|||
|
|
@ -81,9 +81,12 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 사용자 정보 중 extra_vars를 알맞게 편집
|
||||
* @brief 사용자 정보 중 extra_vars와 기타 정보를 알맞게 편집
|
||||
**/
|
||||
function arrangeMemberInfo($info) {
|
||||
$info->image_name = $this->getImageName($info->member_srl);
|
||||
$info->image_mark = $this->getImageMark($info->member_srl);
|
||||
|
||||
$extra_vars = unserialize($info->extra_vars);
|
||||
unset($info->extra_vars);
|
||||
if(!$extra_vars) return $info;
|
||||
|
|
@ -424,5 +427,32 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이미지이름의 정보를 구함
|
||||
**/
|
||||
function getImageName($member_srl) {
|
||||
$image_name_file = sprintf('files/attach/image_name/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||
if(!file_exists($image_name_file)) return;
|
||||
list($width, $height, $type, $attrs) = getimagesize($image_name_file);
|
||||
$info->width = $width;
|
||||
$info->height = $height;
|
||||
$info->src = Context::getRequestUri().$image_name_file;
|
||||
$info->file = './'.$image_name_file;
|
||||
return $info;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이미지마크의 정보를 구함
|
||||
**/
|
||||
function getImageMark($member_srl) {
|
||||
$image_mark_file = sprintf('files/attach/image_mark/%s%d.gif', getNumberingPath($member_srl), $member_srl);
|
||||
if(!file_exists($image_mark_file)) return;
|
||||
list($width, $height, $type, $attrs) = getimagesize($image_mark_file);
|
||||
$info->width = $width;
|
||||
$info->height = $height;
|
||||
$info->src = Context::getRequestUri().$image_mark_file;
|
||||
$info->file = './'.$image_mark_file;
|
||||
return $info;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,20 @@
|
|||
<tr>
|
||||
<td>{$lang->about_denied}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->image_name}</th>
|
||||
<td><input type="file" name="image_name" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_image_name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->image_mark}</th>
|
||||
<td><input type="file" name="image_mark" value="" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{$lang->about_image_mark}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">{$lang->is_admin}</th>
|
||||
<td><input type="checkbox" name="is_admin" value="Y" <!--@if($member_info->is_admin=='Y')-->checked="true"<!--@end-->/></td>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,22 @@
|
|||
<th>{$lang->nick_name}</th>
|
||||
<td>{$member_info->nick_name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->image_name}</th>
|
||||
<td>
|
||||
<!--@if($member_info->image_name->src)-->
|
||||
<img src="{$member_info->image_name->src}" border="0" alt="image_name" />
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->image_mark}</th>
|
||||
<td>
|
||||
<!--@if($member_info->image_mark->src)-->
|
||||
<img src="{$member_info->image_mark->src}" border="0" alt="image_mark" />
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{$lang->email_address}</th>
|
||||
<td>{$member_info->email_address}</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue