5단 텝메뉴
5단 텝메뉴
사용법
각 폴더를 자신의 계정으로 업로드 한 뒤, 출력하고자 하는 곳에 아래코드 작성
<? include_once("tap_menu.php"); // 탭메뉴?>
메뉴 수정은 tap_menu에서 글자를 바꾸삼
사용법
각 폴더를 자신의 계정으로 업로드 한 뒤, 출력하고자 하는 곳에 아래코드 작성
<? include_once("tap_menu.php"); // 탭메뉴?>
메뉴 수정은 tap_menu에서 글자를 바꾸삼
첨부파일
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 63개
제가 사용하는 스킨은 4.21.04 [보안관련 필수 패치]된 기본 베이직과
갤러리는 관리자님꺼 SIR 자유이미지 갤러리 게시판 스킨입니다.
http://www.sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=43497
위 스킨들은 썸네일 잘 생성됩니다. 한번 확인해 주세요.
Warning: imagepng() [function.imagepng]: gd-png: fatal libpng error: zlib failed to initialize compressor in F:\RWAPM\www\g4\skin\latest\tab\latest.skin.php on line 46
Warning: imagepng() [function.imagepng]: gd-png error: setjmp returns error condition in F:\RWAPM\www\g4\skin\latest\tab\latest.skin.php on line 46
제가 집컴으로 배우는 중이라 테스트 할 주소링크가 없습니다..
아쉬워서 품질을 9로 설정하니 이상없이 겁나게 잘됩니다.
편안한 밤되십시요 ^^;
감사합니다.
1) 다운받아 알집을 푼다.
2) skin폴더내부에 tab 폴더와 tab_img폴더를 계정에 있는 그누보드4/skin/latest/basic 폴더에 덮어씌
우기한다.?? 아니면 basic 폴더가 있는 상위폴더에 별로로 붙혀넣기 한다.
3) index.php 와 tap_menu.php를 그누보드4 루트에 업로드한다. -> 이때 index.php파일 덮어씌우기
창이 나오 면 덮어씌우기 한다.
4) 만들고 있는 index.html 에 출력하고자 하는 부분에 <? include_once("tap_menu.php"); // 탭메뉴?
> 를 삽입하고 저장한다..
이게 맞나요?? 아무리 해도 안되네요..
폴더를 클릭해서 들어가시면 여러 폴더들이 나오는데, 이것을 통째로 본계정에 올리시면 됩니다.
그누보드4 루트를 기준으로..
./index.php
./tap_menu.php
./tap_img/이미지파일들
./skin/latest/tab/최신글파일들
tab_menu.php 는 아래와 같고
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
//아래 부분 테이블명
$my_table1 = 'z2_1';
$my_table2 = 'z2_2';
$my_table3 = 'z2_3';
$my_table4 = 'z2_4';
$my_table5 = 'z2_5';
$tap_width = "440"; // 텝 넓이
?>
<SCRIPT type="text/javascript">
<!--
old_debate='1';
function showLayer_tap(objid){
document.getElementById("debate"+old_debate).style.display="none";
document.getElementById("debate"+old_debate+"#1").style.display="";
document.getElementById("debate"+objid+"#1").style.display="none";
document.getElementById("debate"+objid).style.display="";
document.getElementById("debate_content"+old_debate).style.display="none";
document.getElementById("debate_content"+objid).style.display="";
old_debate=objid;
}
//-->
</SCRIPT>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="<?=$tap_width?>" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="88">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate1><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nl_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table1?>"><tr><td align="center" width="87" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;">모교갤러리</span></td><td width="1"></td></tr></table></TD>
<td id=debate1#1 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nl.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('1')"><tr><td align="center" width="87" class="small"><span style="vertical-align:-3px;">모교갤러리</span></td><td width="1"></td></tr></table></td>
</tr></table>
</td>
<td width="88">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate2 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nm_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table2?>"><tr><td align="center" width="87" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;">동문갤러리</span></td><td width="1"></td></tr></table></TD>
<td id=debate2#1><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nm.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('2')"><tr><td align="center" width="87" class="small"><span style="vertical-align:-3px;">동문갤러리</span></td><td width="1"></td></tr></table></td>
</tr></table>
</td>
<td width="88">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate3 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nm_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table3?>"><tr><td align="center" width="87" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;">모임갤러리</span></td><td width="1"></td></tr></table></TD>
<td id=debate3#1><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nm.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('3')"><tr><td align="center" width="87" class="small"><span style="vertical-align:-3px;">모임갤러리</span></td><td width="1"></td></tr></table></td>
</tr></table>
</td>
<td width="88">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate4 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nm_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table4?>"><tr><td align="center" width="87" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;">청언회갤러리</span></td><td width="1"></td></tr></table></TD>
<td id=debate4#1><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nm.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('4')"><tr><td align="center" width="87" class="small"><span style="vertical-align:-3px;">청언회갤러리</span></td><td width="1"></td></tr></table></td>
</tr></table>
</td>
<td width="88">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate5 style="DISPLAY: none;"><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nr_2.gif" style="cursor:pointer;" onclick=location.href="<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table5?>"><tr><td align="center" width="87" class="small"><span style="color:#f0761c; font-weight:bold; vertical-align:-3px;">행사갤러리</span></td><td width="1"></td></tr></table></TD>
<td id=debate5#1><table cellSpacing=0 cellPadding=0 border=0 width=88 height=23 background="<?=$g4[path]?>/tap_img/nr.gif" style="cursor:pointer;" onclick=location.href="javascript:showLayer_tap('5')"><tr><td align="center" width="87" class="small"><span style="vertical-align:-3px;">행사갤러리</span></td><td width="1"></td></tr></table></td>
</tr></table>
</td>
</tr>
</table>
<table width="<?=$tap_width?>" height="150" border="0" cellspacing="0" cellpadding="0">
<colgroup width='1'>
<colgroup>
<colgroup width='1'>
<tr>
<td bgcolor="#d8d8d8"></td>
<td valign='top'>
<DIV id=debate_content1><?=latest('tab',"z2_1", "5", "42"); ?></div>
<DIV id=debate_content2 style="DISPLAY: none;"><?=latest('tab',"z2_2", "5", "42"); ?></div>
<DIV id=debate_content3 style="DISPLAY: none;"><?=latest('tab',"z2_3", "5", "42"); ?></div>
<DIV id=debate_content4 style="DISPLAY: none;"><?=latest('tab',"z2_4", "5", "42"); ?></div>
<DIV id=debate_content5 style="DISPLAY: none;"><?=latest('tab',"z2_5", "5", "42"); ?></div>
</td>
<td bgcolor="#d8d8d8"></td>
</tr>
<tr height='1'><td bgcolor="#d8d8d8"></td><td></td><td bgcolor="#d8d8d8"></td></tr>
</table></td></tr>
<tr>
<td>
<table width="<?=$tap_width?>" border="0" cellspacing="0" cellpadding="0">
<colgroup width='2'>
<colgroup>
<colgroup width='2'>
<tr height='3'>
<td><img src='<?=$g4[path]?>/tap_img/left_bottom.gif'></td>
<td width="100%" background='<?=$g4[path]?>/tap_img/center_bottom.gif'></td>
<td><img src='<?=$g4[path]?>/tap_img/right_bottom.gif'></td>
</tr>
</table>
</td>
</tr>
</table>
latest.skin.php 는 아래와 같습니다...
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$img_width = '100'; //썸네일 가로길이
$img_height = '80'; //썸네일 세로길이
$img_quality = '100'; //퀼리티 100이하로 설정
if (!function_exists("imagecopyresampled")) alert("GD 2.0.1 이상 버전이 설치되어 있어야 사용할 수 있는 갤러리 게시판 입니다.");
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb105'; //썸네일 이미지 생성 디렉토리
@mkdir($thumb_path, 0707);
@chmod($thumb_path, 0707);
?>
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<? for ($i=0; $i<count($list); $i++) {
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td><img src='$latest_skin_path/img/noimage.gif' width='$img_width' height='$img_height' title='이미지 없음'></td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr></table>";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
if (!file_exists($thumb)) {
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
// 업로드된 파일이 이미지라면
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($file)) {
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;
$rate = $img_width / $size[0];
$height = (int)($size[1] * $rate);
// 계산된 썸네일 이미지의 높이가 설정된 이미지의 높이보다 작다면
if ($height < $img_height)
// 계산된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $height);
else
// 설정된 이미지 높이로 복사본 이미지 생성
$dst = imagecreatetruecolor($img_width, $img_height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $img_width, $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $img_quality);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
if (file_exists($thumb)){
$img = "<table border='0' cellpadding='0' cellspacing='0'><tr><td width='20'><img src='$latest_skin_path/img/box_01.gif' width='20' height='16'></td><td background='$latest_skin_path/img/box_03.gif'><img src='$latest_skin_path/img/box_02.gif' width='17' height='16'></td><td width='21'><img src='$latest_skin_path/img/box_06.gif' width='21' height='16'></td></tr><tr><td valign='top' background='$latest_skin_path/img/box_12.gif'><img src='$latest_skin_path/img/box_07.gif' width='20' height='20'></td><td align='center'><a href='{$list[$i][href]}'><img src='$thumb' width='$img_width' height='$img_height' border='0'></a></td><td valign='bottom' background='$latest_skin_path/img/box_10.gif'><img src='$latest_skin_path/img/box_14.gif' width='21' height='15'></td></tr><tr><td><img src='$latest_skin_path/img/box_15.gif' width='20' height='16'></td> <td background='$latest_skin_path/img/box_16.gif'><div align='right'><img src='$latest_skin_path/img/box_18.gif' width='20' height='16'></div></td><td><img src='$latest_skin_path/img/box_19.gif' width='21' height='16'></td></tr></table>";
}
?>
<tr>
<td colspan="2" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="6"><td></td></tr>
<tr>
<td valign=top>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><?=$img?></td>
<td align="center" valign="top" width="100%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<? for ($i=0; $i<count($list); $i++) { ?>
<tr height="23">
<td><b>ㆍ</b>
<?
//날짜표시
$date = explode("-", $date1);
$year = $date[0];
$month = $date[1];
$day = $date[2];
$latest_date = $year."-".$month."-".$day."";
echo $list[$i]['icon_reply'] . " ";
echo "<a href='{$list[$i]['href']}'>";
if ($list[$i]['is_notice'])
echo "<strong>{$list[$i]['subject']}</strong>";
else
echo "{$list[$i]['subject']}";
echo "</a>";
if ($list[$i]['comment_cnt'])
echo " <a href=\"{$list[$i]['comment_href']}\" style='font-size:9px; color:#EE5A00; vertical-align:1px;'>{$list[$i]['comment_cnt']}</a>";
echo " " . $list[$i]['icon_new'];
echo " " . $list[$i]['icon_hot'];
//echo " " . $list[$i]['icon_file'];
echo " " . $list[$i]['icon_link'];
//echo " " . $list[$i]['icon_secret'];
echo "</td><td width=36 align=right>";
echo "<font color=#bababa class=small>{$list[$i][datetime2]}</font> </td>";
?></td></tr><? } ?>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<?}?>
<? if (count($list) == 0) { ?><tr><td align=center width="100%"><font color=#6A6A6A>현재 등록된 글이 없습니다.</a></td></tr><? } ?>
</table>
에러페이지는 http://www.cheonggu.net/ 입니다.. 뭐가 잘못됐는지 탭클릭시 안넘어갑니다.
변수명을 수정하시면 됩니다.
하나의 텝메뉴만 쓰시면 이상은 없을꺼에요.
알아냈어요.
다른 최근 탭메뉴와 충돌났네요. 그거 삭제하니깐 되네요.
ㅋㅋ 메리크리스마스에 , ,,, 쩝 ~.~
저도 제나빌더를 사용중인데.. 변수명을 어떻게 바꿔줘야 되는지.. 부탁드립니다.
좋은 스킨이라 추천 누르고 나갑니다. ^^;
위에 알럽투데이 님의 tap_menu.php파일과 아래 소스를 비교해보세요.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
//아래 부분 테이블명
$my_table1 = '03_1';
$my_table2 = '03_2';
$my_table3 = '03_3';
$my_table4 = '03_7';
$my_table5 = '04_4';
$tap_width = "462"; // 텝 넓이
?>
<SCRIPT type="text/javascript">
<!--
old_debate2='6';
function showLayer_tap2(objid){
document.getElementById("debate"+old_debate2).style.display="none";
document.getElementById("debate"+old_debate2+"#1").style.display="";
document.getElementById("debate"+objid+"#1").style.display="none";
document.getElementById("debate"+objid).style.display="";
document.getElementById("debate_content"+old_debate2).style.display="none";
document.getElementById("debate_content"+objid).style.display="";
old_debate2=objid;
}
//-->
</SCRIPT>
<style type="text/css">
<!--
.small { font-size:8pt; font-family:굴림; }
-->
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="<?=$tap_width?>" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="93">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate6><a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table1?>' title='목록으로' onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n1_2.gif' width=93 height=23 border=0 align=absmiddle></a></TD>
<td id=debate6#1 style="DISPLAY: none;"><a href="javascript:showLayer_tap2('6')" onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n1.gif' width=93 height=23 border=0 align=absmiddle></a></td>
</tr></table>
</td>
<td width="92">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate7 style="DISPLAY: none;"><a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table2?>' title='목록으로' onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n2_2.gif' width=92 height=23 border=0 align=absmiddle></a></TD>
<td id=debate7#1><a href="javascript:showLayer_tap2('7')" onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n2.gif' width=92 height=23 border=0 align=absmiddle></a></td>
</tr></table>
</td>
<td width="92">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate8 style="DISPLAY: none;"><a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table3?>' title='목록으로' onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n3_2.gif' width=92 height=23 border=0 align=absmiddle></a> </td>
<td id=debate8#1><a href="javascript:showLayer_tap2('8')" onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n3.gif' width=92 height=23 border=0 align=absmiddle></a></td>
</tr></table>
</td>
<td width="92">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate9 style="DISPLAY: none;"><a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table4?>' title='목록으로' onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n4_2.gif' width=92 height=23 border=0 align=absmiddle></a> </td>
<td id=debate9#1><a href="javascript:showLayer_tap2('9')" onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n4.gif' width=92 height=23 border=0 align=absmiddle></a></td>
</tr></table>
</td>
<td width="93">
<table cellSpacing=0 cellPadding=0 border=0>
<tr>
<td id=debate10 style="DISPLAY: none;"><a href='<?=$g4[path]?>/bbs/board.php?bo_table=<?=$my_table5?>' title='목록으로' onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n5_2.gif' width=93 height=23 border=0 align=absmiddle></a> </td>
<td id=debate10#1><a href="javascript:showLayer_tap2('10')" onfocus='this.blur()'><img src='<?=$g4[path]?>/tap_img/n5.gif' width=93 height=23 border=0 align=absmiddle></a></td>
</tr></table>
</td>
</tr>
</table>
<table width="<?=$tap_width?>" height="50" border="0" cellspacing="0" cellpadding="0">
<colgroup width='1'>
<colgroup>
<colgroup width='1'>
<tr>
<td bgcolor="#d8d8d8"></td>
<td valign='top'>
<DIV id=debate_content6><?=latest('tab',"03_1", "5", "42"); ?></div>
<DIV id=debate_content7 style="DISPLAY: none;"><?=latest('tab',"03_2", "5", "42"); ?></div>
<DIV id=debate_content8 style="DISPLAY: none;"><?=latest('tab',"03_3", "5", "42"); ?></div>
<DIV id=debate_content9 style="DISPLAY: none;"><?=latest('tab',"03_7", "5", "42"); ?></div>
<DIV id=debate_content10 style="DISPLAY: none;"><?=latest('tab',"04_4", "5", "42"); ?></div>
</td>
<td bgcolor="#d8d8d8"></td>
</tr>
<tr height='1'><td bgcolor="#d8d8d8"></td><td></td><td bgcolor="#d8d8d8"></td></tr>
</table></td></tr>
<tr>
<td>
<table width="<?=$tap_width?>" border="0" cellspacing="0" cellpadding="0">
<colgroup width='2'>
<colgroup>
<colgroup width='2'>
<tr height='3'>
<td><img src='<?=$g4[path]?>/tap_img/left_bottom.gif'></td>
<td width="100%" background='<?=$g4[path]?>/tap_img/center_bottom.gif'></td>
<td><img src='<?=$g4[path]?>/tap_img/right_bottom.gif'></td>
</tr>
</table>
</td>
</tr>
</table>
어데다 손을 데야되는지...
Warning: latest(./bbs/skin/latest/tap/latest.skin.php): failed to open stream: No such file or directory in c:\apm_setup\htdocs\bbs\lib\latest.lib.php on line 29
클릭해야 바뀌는거네요..ㅎㅎ
오버하면 바뀐는 건줄 알고 한참 헤맸음..ㅋㅋ
select * from g4_write_03_1 where wr_is_comment = 0 order by wr_num limit 0, 5
1146 : 테이블 'gn4.g4_write_03_1' 는 존재하지 않습니다.
error file : /~gn4/index.php