RadarURL

웹 프로그래밍
2007.02.01 10:38

제로보드에서 포인트를 레벨로 표시 하기

조회 수 7598 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

가 크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

가 크게 작게 위로 아래로 댓글로 가기 인쇄

올해 1월에 만들어 쓰고 있는데 엔지오에는 아직 안 올렸나 봅니다. (가물가물;;;;)


멤버레벨이 아닌 단순히 포인트를 기준으로 한 스킬레벨을 표시하는 기능입니다.
다른 팁과 약간 다른 점은 다음 레벨이 되기까지 막대 그래프가 올라가는 모습을 보여준다는 점....
저는 이 스킬레벨과 그래프를 보고 해당 회원의 활동성을 대략 가늠하고 있습니다.



=====================================================================


스킨디렉토리의 setup.php 의 적당한 곳에 다음을 넣어줍니다.


<?
// 회원 포인트를 불러오는 함수
function point_lev($member_no) {
global $connect, $member_table;
if($member_no) {
$data=mysql_fetch_array(mysql_query("select point1,point2 from $member_table where no='$member_no'"));
$return_point1 = $data['point1']*10 + $data['point2'];
$return_point2 = $return_point1/1000;
$p_level1 = ceil($return_point2);
$p_level2 = ($return_point1 + 1000) - $p_level1*1000;
if($p_level2<"100") $p_level3 = "<font color=#B9E2FA>llllllllll</font>";
elseif($p_level2<"200") $p_level3 = "<font color=#646EFF>l</font><font color=#B9E2FA>lllllllll</font>";
elseif($p_level2<"300") $p_level3 = "<font color=#646EFF>ll</font><font color=#B9E2FA>llllllll</font>";
elseif($p_level2<"400") $p_level3 = "<font color=#646EFF>lll</font><font color=#B9E2FA>lllllll</font>";
elseif($p_level2<"500") $p_level3 = "<font color=#646EFF>llll</font><font color=#B9E2FA>llllll</font>";
elseif($p_level2<"600") $p_level3 = "<font color=#646EFF>lllll</font><font color=#B9E2FA>lllll</font>";
elseif($p_level2<"700") $p_level3 = "<font color=#646EFF>llllll</font><font color=#B9E2FA>llll</font>";
elseif($p_level2<"800") $p_level3 = "<font color=#646EFF>lllllll</font><font color=#B9E2FA>lll</font>";
elseif($p_level2<"900") $p_level3 = "<font color=#646EFF>llllllll</font><font color=#B9E2FA>ll</font>";
elseif($p_level2<"950") $p_level3 = "<font color=#646EFF>lllllllll</font><font color=#B9E2FA>l</font>";
else $p_level3 = "<font color=#646EFF>llllllllll</font>";
echo "<b>level ".$p_level1."</b>  ".$p_level3;
} else {
echo "<b>out of level</b>";
}
}
?>


게시물은 10점, 코멘트는 1점으로 산정했고
100점마다 막대기가 한 개씩 늘어나며
1000점마다 1레벨씩 올라가게 됩니다.


위 소스에서 텍스트 대신 이미지를 넣어도 무방....하지만 로딩 속도를 위해서
텍스트로 하는 것이 나을 겁니다.



스킨디렉토리의
view.php 파일에는 <?=point_lev($data[ismember])?> 를
view_comment.php 파일에는 <?=point_lev($c_data[ismember])?> 를
넣으면 출력됩니다.



대표적인 예제 게시물로
http://reedyfox.com/bbs/zboard.php?id=board&page=2&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=1086&read.html
를 보시면 됩니다. (장난 금지!!!!!)



사용된 폰트는 Verdana bold 입니다. 텍스트로 이미지의 분위기를 연출할 수 있습니다.

출처 : http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&sn1=&divpage=1&sn=on&ss=on&sc=off&keyword=리디&select_arrange=headnum&desc=asc&no=5949

------------------------------------------------------------------------------------------------


재수 홈페이지에서의 포인트는 약간 틀리기 때문에 밑에처럼..

<?
// 회원 포인트를 불러오는 함수
function point_lev($member_no) {
global $connect, $member_table;
if($member_no) {
$data=mysql_fetch_array(mysql_query("select point1,point2,login_point from $member_table where no='$member_no'"));
$return_point1 = $data['point1']*10 + $data['point2']*5 + $data['login_point']*30;
$return_point2 = $return_point1/1000;
$p_level1 = ceil($return_point2);
$p_level2 = ($return_point1 + 1000) - $p_level1*1000;
if($p_level2<"100") $p_level3 = "<font color=#B9E2FA>llllllllll</font>";
elseif($p_level2<"200") $p_level3 = "<font color=#646EFF>l</font><font color=#B9E2FA>lllllllll</font>";
elseif($p_level2<"300") $p_level3 = "<font color=#646EFF>ll</font><font color=#B9E2FA>llllllll</font>";
elseif($p_level2<"400") $p_level3 = "<font color=#646EFF>lll</font><font color=#B9E2FA>lllllll</font>";
elseif($p_level2<"500") $p_level3 = "<font color=#646EFF>llll</font><font color=#B9E2FA>llllll</font>";
elseif($p_level2<"600") $p_level3 = "<font color=#646EFF>lllll</font><font color=#B9E2FA>lllll</font>";
elseif($p_level2<"700") $p_level3 = "<font color=#646EFF>llllll</font><font color=#B9E2FA>llll</font>";
elseif($p_level2<"800") $p_level3 = "<font color=#646EFF>lllllll</font><font color=#B9E2FA>lll</font>";
elseif($p_level2<"900") $p_level3 = "<font color=#646EFF>llllllll</font><font color=#B9E2FA>ll</font>";
elseif($p_level2<"950") $p_level3 = "<font color=#646EFF>lllllllll</font><font color=#B9E2FA>l</font>";
else $p_level3 = "<font color=#646EFF>llllllllll</font>";
echo "(<b><font size=1><font color=000000>Point Level ".$p_level1."</b>  ".$p_level3."<font size=2><font color=808080>)";
} else {
echo "<b>out of level</b>";
}
}
?>
<!-- HTML 시작 -->
<table border=0 cellspacing=0 cellpadding=0 width=<?=$width?>>
<?=$memo_on_sound?>
<tr>
<td width=1></td>
<td style=font-family:Verdana,matchworks;font-size:7pt;color:#808080>
TOTAL : <?=$total?>, PAGE : <?=$page?> / <?=$total_page?>,
CONNECT : <?=$total_connect?>
</td>



 


 
<td align=right>
<?=$a_member_join?><img src=<?=$dir?>/s_signup.gif border=0 alt="회원가입"></a>&nbsp;
<?=$a_member_modify?><img src=<?=$dir?>/s_myinfo.gif border=0 alt="정보수정"></a>&nbsp;



 


<!--<?=$member_memo_icon?>-->
<?=$a_member_memo?><img src=<?=$dir?>/s_memobox.gif border=0 alt="쪽지사용"></a>&nbsp;
<?=$a_login?><img src=<?=$dir?>/s_login.gif border=0 alt="로그인"></a>&nbsp;
<?=$a_logout?><img src=<?=$dir?>/s_logout.gif border=0 alt="로그아웃"></a>&nbsp;
<?=$a_setup?><img src=<?=$dir?>/s_setup.gif border=0 alt="설정"></a>
</td>
</tr>
</table>



 


<?



 


if($setup[use_category])



 


{



 


?>



 


<table border=0 cellspacing=0 cellpadding=0 width=<?=$width?>>



 


  <tr>



 


    <td><? include "include/print_category.php"; ?></td>



 


  </tr>



 


</table>



 


<?}?>

?

공부 게시판

공부에 도움되는 글을 올려주세요.

  1. [공지] 공부 게시판 입니다.

    Date2003.08.18 By처누 Views2007576
    read more
  2. 완벽한 웨딩드레스 핏의 비밀, 웨딩누브라

    Date2026.10.05 Category응용 프로그래밍 By힘겨운암석76 Views1
    Read More
  3. 골든타워 010 2817 0845 골타문의 편하게 알아보는 셔츠룸

    Date2026.10.05 Category응용 프로그래밍 By속삭이는미노타우르93 Views2
    Read More
  4. 양산싱크대막힘? 뚫자하수구로 해결!

    Date2026.10.04 Category웹 프로그래밍 By깊은우동그릇23 Views2
    Read More
  5. 강남하이퍼블릭 강남일프로 강남텐프로 강남텐카페 강남쩜오 강남셔츠룸 강남레깅스룸

    Date2026.10.03 Category응용 프로그래밍 By수수한환영74 Views15
    Read More
  6. 텔ㄹH그램 :@holysim선불유심내구제 대포유심삽니다 신불급전 대출연체자 비상금대출 급전선불 선불유심매입 대포유심파는법 텔레그램:@holysim 선불유심판매 선불유심매입업체 소액대출 간편무서류대출 정식내구제업체

    Date2026.10.03 Category응용 프로그래밍 By강철의기사22 Views7
    Read More
  7. WIndows Application의 실행 속도 측정

    Date2023.09.06 Category응용 프로그래밍 ByYooN Views6479
    Read More
  8. 메모리 부족 현상 (allowed memory size of 134217728 bytes..)

    Date2023.08.01 Category웹 프로그래밍 ByYooN Views5949
    Read More
  9. Guzzle - cURL error 60: SSL certificate problem: unable to get local issuer certificate 문제 해결

    Date2023.07.30 Category웹 프로그래밍 ByYooN Views6119
    Read More
  10. XE 캐시파일 재성생후 404 Oops, Sorry. Page is not found! 나올때

    Date2023.07.29 Category웹 프로그래밍 ByYooN Views5941
    Read More
  11. [Apple] 엔터프라이즈 계정신청 (Enterprise Program)

    Date2023.03.27 Category응용 프로그래밍 ByYooN Views4186
    Read More
  12. XE - " Fatal error: Class 'Object' not found in " / class 낫파운드 오류

    Date2023.03.20 Category웹 프로그래밍 ByYooN Views3871
    Read More
  13. [MSA] MSA란 무엇인가? 개념 이해하기

    Date2023.01.26 Category응용 프로그래밍 ByYooN Views3638
    Read More
  14. iOS 앱 개발을 위한 인증서 생성 및 관리

    Date2023.01.18 Category웹 프로그래밍 ByYooN Views4178
    Read More
  15. [ iOS ] 앱 스토어 개인, 회사, 엔터프라이즈 차이점

    Date2023.01.09 Category프로그래밍 ByYooN Views3041
    Read More
  16. PHP 파서 이해하기 (<?php의 php를 생략하고 간단히 <? 태그 와 ?> 태그를 사용하는 방법)

    Date2016.08.10 Category웹 프로그래밍 ByYooN Views6270
    Read More
  17. SVN의 cleanup 에러시 해결방법

    Date2016.05.05 Category프로그래밍 ByYooN Views4334
    Read More
  18. [오류해결] svn cleanup failed-previous operation has not finished; run cleanup if it was interrupted

    Date2016.05.05 Category프로그래밍 ByYooN Views4383
    Read More
  19. TortoiseSVN 계정변경

    Date2016.05.05 Category프로그래밍 ByYooN Views3157
    Read More
  20. SVN passwd 설정 : 계정 (users/passwd)

    Date2016.05.04 Category프로그래밍 ByYooN Views4184
    Read More
  21. XE 비회원 글쓰기 항목 지우기

    Date2016.04.28 Category웹 프로그래밍 ByYooN Views4760
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 18 Next
/ 18


즐겨찾기 (가족)

JAESOO's HOMEPAGE


장여은 홈페이지


장여희 홈페이지


장여원 홈페이지


즐겨찾기 (업무)

알리카페 홀릭

숭실대 컴퓨터 통신연구실 (서창진)

말레이시아 KL Sentral 한국인 GuestHouse


즐겨찾기 (취미)

어드민아이디

유에코 사랑회

아스가르드 좋은사람/나쁜사람

JServer.kr

제이서버 메타블로그

재수 티스토리


즐겨찾기 (강의, 커뮤니티)

재수 강의 홈페이지


한소리


VTMODE.COM


숭실대 인공지능학과


숭실대 통신연구실


베너