경험치바 문의 입니다. 정보
경험치바 문의 입니다.본문
오누리님의 경험치바 스킨 http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=24780&sca=&sfl=mb_id%2C1&stx=reapier&spt=-1080&page=1 에 대한 문의 입니다.
$mb_point 포인트를 기준으로 경험치 바를 표시해주는 스킨입니다
그런데 제가 장영철 님의 회원의 게시물 코맨트 갯수 출력 팁을 사용하여
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=3087 mb_9에는 게시물 개수를
mb_10에는 코멘트가 저장됩니다.
그래서 위에 포인트 대신 게시물이나 코멘트 개수를 경험치 바로 표시해주게 하고싶은데
그게 잘 되지 않네요.
경험치바 스킨 소스는 아래와 같습니다.
<?
///exp_bar
function exp_bar($mb_point,$option) {
global $g4;
$point = $mb_point;
$level = ceil($point / 1500); //반올림을 하여 레벨을 구함. 1500포인트당 1레벨
if($mb_id)if($level <= 1) $level = 1; // 위 반올림에서 렙1, 렙1미만 회원에게 레벨1을 줌, (비회원은 0)
if ($level > 154) $level = 154; //최대레벨
$no = sprintf("%04d", $level);
$max = $level * 1500;
if(!$level){$max=1500; $a_max=1500; $a_min=0;}else{$a_max = (int)($max / $level); $a_min = (int)($point - (1500 * ($level-1)));} //레벨이 없으면 최대값 1500, 있으면 레벨에 맞는 최대값을 구함
$bar = (int)($a_min / $a_max * 100);
$graph = $bar."%"; //등급, 경험치바 표시
$graph_ = "Lv.".$level." ".$bar."%"; //경험치바 표시
if($option == 0){
echo "<table width='133' border='0' cellspacing='0' cellpadding='0' align='center'><tr height=30><td width='33'><img src='$g4[path]/img/class.gif'></td><td width='20' align='right'><img src='$g4[path]/img/l2/{$no}.gif' title='등급 {$level} / ".number_format($mb_point)."점'></td><td align='right'><font color='#B3D4F8'>$point</font>/$max<br><font color='#D4B3F8'>$a_min</font>/$a_max</td></tr><tr><td colspan='2'><img src='$g4[path]/img/exp.gif'></td><td align='right'>$graph</td></tr><tr height='11'><td colspan='3' background='$g4[path]/img/exp_bar.gif'><table width='133' height='11' border='0' cellspacing='0' cellpadding='0'><tr height='1'><td colspan='3'></td></tr><tr height='8'><td width='1'></td><td width='130'><img src='$g4[path]/img/exp_in.gif' width='$graph' height='8'></td><td width='2'></td></tr><tr height='2' colspan='3'></table></td></tr></table>";
}if($option == 1){
echo "<table width='133' border='0' cellspacing='0' cellpadding='0' align='center'><tr><td><img src='$g4[path]/img/exp.gif'></td><td align='right'>$graph_</td></tr><tr height='11'><td colspan='2' background='$g4[path]/img/exp_bar.gif'><table width='133' height='11' border='0' cellspacing='0' cellpadding='0'><tr height='1'><td colspan='3'></td></tr><tr height='8'><td width='1'></td><td width='130'><img src='$g4[path]/img/exp_in.gif' width='$graph' height='8'></td><td width='2'></td></tr><tr height='2'><td colspan='3'></td></tr></table></td></tr><tr><td colspan='2' height='5'></td></tr></table>";
}
}
$mb_point 부분을 $mb_9 로 바꿔봤는데 안되네요 ;
고수분들의 도움 부탁드립니다!
$mb_point 포인트를 기준으로 경험치 바를 표시해주는 스킨입니다
그런데 제가 장영철 님의 회원의 게시물 코맨트 갯수 출력 팁을 사용하여
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=3087 mb_9에는 게시물 개수를
mb_10에는 코멘트가 저장됩니다.
그래서 위에 포인트 대신 게시물이나 코멘트 개수를 경험치 바로 표시해주게 하고싶은데
그게 잘 되지 않네요.
경험치바 스킨 소스는 아래와 같습니다.
<?
///exp_bar
function exp_bar($mb_point,$option) {
global $g4;
$point = $mb_point;
$level = ceil($point / 1500); //반올림을 하여 레벨을 구함. 1500포인트당 1레벨
if($mb_id)if($level <= 1) $level = 1; // 위 반올림에서 렙1, 렙1미만 회원에게 레벨1을 줌, (비회원은 0)
if ($level > 154) $level = 154; //최대레벨
$no = sprintf("%04d", $level);
$max = $level * 1500;
if(!$level){$max=1500; $a_max=1500; $a_min=0;}else{$a_max = (int)($max / $level); $a_min = (int)($point - (1500 * ($level-1)));} //레벨이 없으면 최대값 1500, 있으면 레벨에 맞는 최대값을 구함
$bar = (int)($a_min / $a_max * 100);
$graph = $bar."%"; //등급, 경험치바 표시
$graph_ = "Lv.".$level." ".$bar."%"; //경험치바 표시
if($option == 0){
echo "<table width='133' border='0' cellspacing='0' cellpadding='0' align='center'><tr height=30><td width='33'><img src='$g4[path]/img/class.gif'></td><td width='20' align='right'><img src='$g4[path]/img/l2/{$no}.gif' title='등급 {$level} / ".number_format($mb_point)."점'></td><td align='right'><font color='#B3D4F8'>$point</font>/$max<br><font color='#D4B3F8'>$a_min</font>/$a_max</td></tr><tr><td colspan='2'><img src='$g4[path]/img/exp.gif'></td><td align='right'>$graph</td></tr><tr height='11'><td colspan='3' background='$g4[path]/img/exp_bar.gif'><table width='133' height='11' border='0' cellspacing='0' cellpadding='0'><tr height='1'><td colspan='3'></td></tr><tr height='8'><td width='1'></td><td width='130'><img src='$g4[path]/img/exp_in.gif' width='$graph' height='8'></td><td width='2'></td></tr><tr height='2' colspan='3'></table></td></tr></table>";
}if($option == 1){
echo "<table width='133' border='0' cellspacing='0' cellpadding='0' align='center'><tr><td><img src='$g4[path]/img/exp.gif'></td><td align='right'>$graph_</td></tr><tr height='11'><td colspan='2' background='$g4[path]/img/exp_bar.gif'><table width='133' height='11' border='0' cellspacing='0' cellpadding='0'><tr height='1'><td colspan='3'></td></tr><tr height='8'><td width='1'></td><td width='130'><img src='$g4[path]/img/exp_in.gif' width='$graph' height='8'></td><td width='2'></td></tr><tr height='2'><td colspan='3'></td></tr></table></td></tr><tr><td colspan='2' height='5'></td></tr></table>";
}
}
$mb_point 부분을 $mb_9 로 바꿔봤는데 안되네요 ;
고수분들의 도움 부탁드립니다!
댓글 전체
아 ㅡ ㅡ 해결했습니다 '' 살짝 손보니까 되네요 ;

고생 하셨습니다....^^