레벨아이콘 정보
레벨아이콘본문
안녕하세요.
회원별 레벨에 따라 레벨 아이콘 출력하는 소스인데요.
여기에 회원별 테이블의 mb_deal 에 값이 1이 있을때
레벨아이콘이 아닌 별도로 지정한 아이콘으로 출력하고 싶습니다.
어딜 어떻게 수정하면 될까요?
-------------------------------------------------------lib/common.lib.php
// 회원 레이어
function get_sideview($mb_id, $name="", $email="", $homepage="")
{
global $config;
global $g4;
$email = base64_encode($email);
$homepage = set_http($homepage);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\"/", """, $name);
$title_name = $name;
if ($mb_id) {
$tmp_name = "<span class='member'>$name</span>";
if ($config['cf_use_member_icon']) {
$mb_dir = substr($mb_id,0,2);
$icon_file = "$g4[path]/data/member/$mb_dir/$mb_id.gif";
//if (file_exists($icon_file) && is_file($icon_file)) {
if (file_exists($icon_file)) {
//$size = getimagesize($icon_file);
//$width = $size[0];
//$height = $size[1];
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' width='$width' height='$height' align='absmiddle' border='0'>";
if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름
$tmp_name = $tmp_name . " <span class='member'>$name</span>";
}
//레벨아이콘 자동적용을 위해 추가함(천상재회 2006-10-29 : 위치는 개인에 맞게 수정)
if ($config['cf_10'] && $config['cf_10'] =='Y') {
$lv = get_member($mb_id);
$icon_lv = "$g4[path]/img/level_{$lv[mb_level]}.gif";
$tmp_name = "<img src='$icon_lv' align='absmiddle' border='0'>" . $tmp_name;
}
}
$title_mb_id = "[$mb_id]";
} else {
$tmp_name = "<span class='guest'>$name</span>";
//레벨아이콘 자동적용을 위해 추가함(천상재회 2006-10-29 : 위치는 개인에 맞게 수정)
if ($config['cf_10'] && $config['cf_10'] =='Y') {
$icon_lv = "$g4[path]/img/level_1.gif";
$tmp_name = "<img src='$icon_lv' align='absmiddle' border='0'>" . $tmp_name;
}
$title_mb_id = "[비회원]";
}
return "<a href=# onclick=\"window.open('$g4[bbs_path]/profile.php?mb_id=$mb_id','profilr','resizable=yes scrollbars=yes width=600 height=500'); return false\">$tmp_name</a>";
}
------------------------------------------------------------------------
답변 부탁드려요 ^^
회원별 레벨에 따라 레벨 아이콘 출력하는 소스인데요.
여기에 회원별 테이블의 mb_deal 에 값이 1이 있을때
레벨아이콘이 아닌 별도로 지정한 아이콘으로 출력하고 싶습니다.
어딜 어떻게 수정하면 될까요?
-------------------------------------------------------lib/common.lib.php
// 회원 레이어
function get_sideview($mb_id, $name="", $email="", $homepage="")
{
global $config;
global $g4;
$email = base64_encode($email);
$homepage = set_http($homepage);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\'/", "", $name);
$name = preg_replace("/\"/", """, $name);
$title_name = $name;
if ($mb_id) {
$tmp_name = "<span class='member'>$name</span>";
if ($config['cf_use_member_icon']) {
$mb_dir = substr($mb_id,0,2);
$icon_file = "$g4[path]/data/member/$mb_dir/$mb_id.gif";
//if (file_exists($icon_file) && is_file($icon_file)) {
if (file_exists($icon_file)) {
//$size = getimagesize($icon_file);
//$width = $size[0];
//$height = $size[1];
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$tmp_name = "<img src='$icon_file' width='$width' height='$height' align='absmiddle' border='0'>";
if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름
$tmp_name = $tmp_name . " <span class='member'>$name</span>";
}
//레벨아이콘 자동적용을 위해 추가함(천상재회 2006-10-29 : 위치는 개인에 맞게 수정)
if ($config['cf_10'] && $config['cf_10'] =='Y') {
$lv = get_member($mb_id);
$icon_lv = "$g4[path]/img/level_{$lv[mb_level]}.gif";
$tmp_name = "<img src='$icon_lv' align='absmiddle' border='0'>" . $tmp_name;
}
}
$title_mb_id = "[$mb_id]";
} else {
$tmp_name = "<span class='guest'>$name</span>";
//레벨아이콘 자동적용을 위해 추가함(천상재회 2006-10-29 : 위치는 개인에 맞게 수정)
if ($config['cf_10'] && $config['cf_10'] =='Y') {
$icon_lv = "$g4[path]/img/level_1.gif";
$tmp_name = "<img src='$icon_lv' align='absmiddle' border='0'>" . $tmp_name;
}
$title_mb_id = "[비회원]";
}
return "<a href=# onclick=\"window.open('$g4[bbs_path]/profile.php?mb_id=$mb_id','profilr','resizable=yes scrollbars=yes width=600 height=500'); return false\">$tmp_name</a>";
}
------------------------------------------------------------------------
답변 부탁드려요 ^^
댓글 전체
$icon_lv = "$g4[path]/img/level_{$lv[mb_level]}.gif";
이 부분에서 경로를 바꿔주시거나 아이콘 명을 따로 정하셔서 업로드 하신 뒤 그에 맞게 수정하시면 될듯 합니다.
이 부분에서 경로를 바꿔주시거나 아이콘 명을 따로 정하셔서 업로드 하신 뒤 그에 맞게 수정하시면 될듯 합니다.