최신글 스킨에서 해당레벨 이상의 회원에게만 특정 내용을 보여 주려는데 짜집퍼의 한계를 느낍니다.
아래소스에서 문제의 해당 소스에 해당하는 부분(♪)을 해당레벨 이상의 회원에게만 보여주고자 합니다.
해결 방법을 아시는 분들의 도움을 요청합니다.
==================================== 전체소스 시작 (latest.skin.php) ===============================
<table width=100% cellpadding=0 cellspacing=0 align=center border=0>
<tr>
<td colspan=3 height=22> <a href='./?doc=bbs/gnuboard.php&bo_table=<?=$bo_table?>'><font color=#002200><b><?=$bo_subject?></b></font></a></td>
</tr>
<tr>
<td colspan=2>
<table width=100% bgcolor=#FFFFFF cellpadding=0 cellspacing=0 border=0>
<tr><td colspan=3 height=10></td></tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i) { echo "<tr><td colspan=3 height=1 background='$latest_skin/dot_line.gif' width=7 height=7></td></tr>"; } ?>
<tr>
<td colspan=3 width=100 align=right>
===================================== 문제의 해당 소스 시작===============================
<? if ($member[mb_level] >= 3 | $is_admin == 'default') { //회원레벨 3이상이거나 관리자일 경우만 열람 ?>
<a onfocus=blur() style="cursor:hand;" onClick="javascript:void(window.open('<?='./?doc=bbs/skin/board/dong/music.php&bo_table=$bo_table&chk_list={$list[$i][wr_id]}'?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=0,width=360,height=540'))" title='[<?=$list[$i][subject]?>] 바로 듣기'><b><font style='font-size:10pt'>♪</font></b></a>
<? } ?>
===================================== 문제의 해당 소스 끝 ===============================
<?=($list[$i][wr_1] ? $list[$i][wr_1] : '미상')?>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=2 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
<tr><td colspan=3 height=5></td></tr>
</table>
</td>
</tr>
</table>
======================================== 전체소스 끝 ================================
아래소스에서 문제의 해당 소스에 해당하는 부분(♪)을 해당레벨 이상의 회원에게만 보여주고자 합니다.
해결 방법을 아시는 분들의 도움을 요청합니다.
==================================== 전체소스 시작 (latest.skin.php) ===============================
<table width=100% cellpadding=0 cellspacing=0 align=center border=0>
<tr>
<td colspan=3 height=22> <a href='./?doc=bbs/gnuboard.php&bo_table=<?=$bo_table?>'><font color=#002200><b><?=$bo_subject?></b></font></a></td>
</tr>
<tr>
<td colspan=2>
<table width=100% bgcolor=#FFFFFF cellpadding=0 cellspacing=0 border=0>
<tr><td colspan=3 height=10></td></tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<? if ($i) { echo "<tr><td colspan=3 height=1 background='$latest_skin/dot_line.gif' width=7 height=7></td></tr>"; } ?>
<tr>
<td colspan=3 width=100 align=right>
===================================== 문제의 해당 소스 시작===============================
<? if ($member[mb_level] >= 3 | $is_admin == 'default') { //회원레벨 3이상이거나 관리자일 경우만 열람 ?>
<a onfocus=blur() style="cursor:hand;" onClick="javascript:void(window.open('<?='./?doc=bbs/skin/board/dong/music.php&bo_table=$bo_table&chk_list={$list[$i][wr_id]}'?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=0,left=0,width=360,height=540'))" title='[<?=$list[$i][subject]?>] 바로 듣기'><b><font style='font-size:10pt'>♪</font></b></a>
<? } ?>
===================================== 문제의 해당 소스 끝 ===============================
<?=($list[$i][wr_1] ? $list[$i][wr_1] : '미상')?>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr><td colspan=2 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
<tr><td colspan=3 height=5></td></tr>
</table>
</td>
</tr>
</table>
======================================== 전체소스 끝 ================================
첨부파일
댓글을 작성하시려면 로그인이 필요합니다.
댓글 23개
그러니깐.. <? if ($member[mb_level] > 2) echo "♪"; ?>
$member[mb_level] 이 부분을 $mb[mb_level] 이런식으로 해서 해보세요... 방금 소스보다 발견했네요 되면 좋케는데 ^^
이런식으로 함 해보세요...
전 잘되는데 신기하네요..
원본에서 손댄건
bbs/gbview.php
lib/developer.lib.php
lib/latest.lib.php 에서
//최신글 리플표시
$list[$i][re] = "";
if ($row[wr_reply] == "A") {
$list[$i][re] = "<b>RE</b> : ";
} else {
$list[$i][re] = "";
}
//최신글 리플 끝
추가
이 3개 파일 밖에 없습니다.
업글도 3.36에서 3.37로 파일통채 덮어쓰기 했습니다.
저도 홈페이지에 구현해서 사용중입니다.
index.php를 원본이랑 비교한번 해보세요..
원래 처음부터 안되던 기능이었습니다.
이번에 구현해 보려고 삽질을 했는데 역시나 안되길래 여기에 글을 올린겁니다.
안되도 상관없고 심각한 문제도 없습니다.
근데 안되니까 열 받네요. ㅠ.ㅠ
디비에는 레벨이 존재하고 있죠?????
어딜 건들어길레 심각해져나요
대신 <?=$member[mb_level]?> 넣었습니다. 아무런 변화가 없네요.
대신 <?=$member[mb_level]?> 레벨이 나타나는지 확인 할수 있자나요 ^:^
테스트 어떻게 하나요?
<?=$member[mb_level]?>
테스트 요망..
이렇게 해도 안됩니다.
<? if ($member[mb_level] > 2) echo "♪"; ?>
이런식으로 하면 어떨까요??
이부분도 함 빼보세요 정확한 에러부분을 찾아야 하니깐요..
밑에
<?}?> 이부분도 ^_^;;;
<?}?>
를 제거하면 당연한거지만 모든 접속자에게 노출이 됩니다.
보시면 아시겠지만 없어도 상관없는 부분입니다.
제 홈에서는 디폴트(비회원) 권한은 0이니까요. 회원가입을 해야 권한 1이 됩니다. ^^
test 아이디 레벨을 권한 3으로 하면 복잡한 문제가 발생하여........ 이점 양해 바랍니다. ^^
<td width=30 align=center> 부분이 위소스부분에선 없자나요??
|| ==>> 2개로 했는데도 똑같습니다. ㅠ.ㅠ
|| ==>> 2개인데 한개로 보이네요..