오누리 빌더 특정 그룹 메뉴 클릭시 메인으로 향하게 하려면... 정보
오누리 빌더 특정 그룹 메뉴 클릭시 메인으로 향하게 하려면...
본문
http://sir.co.kr/bbs/board.php?bo_table=g4_builder&wr_id=2673&sca=&sfl=wr_subject&stx=%BF%C0%B4%A9%B8%AE&sop=and
오누리 빌더 사용중입니다.
http://onuri.co.kr/bbs/group.php?gr_id=01
위주소로 들어가보시면 아래와 같이 서브메뉴가 나오는데요..
( 공지사항, 커뮤니티, 자료실, 오누리빌더, 홍보, 공부 )
각 그룹을 클릭시 해당 그룹에 해당하는 게시판들이 나오는데..
->공지사항을 클릭시 특정 주소로 이동하게끔.. 하려면 어디를 어떻게 수정 해야할까요..ㅜㅜ
제가 특정 그룹 하나를 사용하지않고 메인으로(오누리에서 공지사항 해당) 가는 버튼을 만들고 싶어서 그럽니다...
---------------------------------------
skin/sub/sub_top/basic 폴더내에
*///// sub_top.skin.php /////*
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if ($gr_id == "01"){
$msg = "01 그룹 입니다.";
if($bo_table == "01_1"){ $msg = "01_1번 게시판 입니다."; }
else if($bo_table == "01_2"){ $msg = "01_2번 게시판 입니다."; }
}else{
$msg = $g4[title];
}
if(!$msg) $msg = "메시지를 입력해 주세요.";
if(!$member[mb_id]){
$url = '';
if ($g4['https_url']) {
if (preg_match("/^\./", $urlencode))
$url = $g4[url];
else
$url = $g4[url].$urlencode;
} else {
$url = $urlencode;
}
?>
<?}?>
<!-- 화면을 중앙 고정 시작 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" valign="top">
<!-- 홈페이지 시작 -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="<?=$config[cf_home_sub_align]?>" valign="top">
<table width="<?=$config[cf_home_sub_width]?>" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr><td height='25' colspan='3' bgcolor='#F6F6F6'>
<table width='100%' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td class='small'><span style='vertical-align:-5px;'> <b>ㆍ</b>접속자 : <?=connect('basic')?></span></td>
<td width='10'></td>
<td class='small' align='right'><span style='vertical-align:-5px;'> <?=visit('basic')?></span> </td>
</tr>
</table>
</td></tr>
<tr><td height='1' colspan='3' bgcolor='#DDDDDD'></td></tr>
<tr height='50'>
<td><a href='<?=$g4[path]?>'><img src='<?=$sub_skin_path?>/img/logo_sub.gif' alt='Onuri' border='0'></a></td>
<td align='right'>
<table cellspacing='0' cellpadding='0' border='0'>
<form name='fsearchbox' method='get' action='javascript:fsearchbox_submit(document.fsearchbox);'>
<script type='text/javascript'>
function fsearchbox_submit(f)
{
if (f.stx.value == '')
{
alert('검색어를 입력하세요.');
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1)
{
alert('빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.');
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = '<?=$g4[bbs_path]?>/search.php';
f.submit();
}
</script>
<tr>
<input type='hidden' name='sfl' value='wr_subject||wr_content'>
<input type='hidden' name='sop' value='and'>
<td>
<select id='gr_id' name='gr_id' class=select>
<option value=''>통합검색</option>
<?
if($config[cf_home_ex_search_use] == 1) $home_ex_search = $config[cf_home_ex_search];
else $home_ex_search = "''";
$excgr = "(".$home_ex_search.")";
$sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, a.gr_10, b.mb_id FROM $g4[group_table] AS a LEFT JOIN $g4[group_member_table] AS b ON a.gr_id = b.gr_id WHERE (b.mb_id = '$member[mb_id]' AND a.gr_use_access = '1' ) OR a.gr_use_access = '0' and a.gr_id not in " . $excgr . " ORDER BY a.gr_admin";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++){
?>
<option value='<?=$row['gr_id']?>'><?=$row['gr_subject']?></option>
<?}?>
</select>
</td>
<td width='5'></td>
<td><INPUT name='stx' maxlength='100' style='width:150px;height:21;' tabIndex=1 class=ed trim value='<?=$stx?>'></td>
<td width='5'></td>
<td width='28' align='right'><INPUT type=image src='<?=$sub_skin_path?>/img/btn_search.gif' border='0'></td></tr>
<tr><td></td></tr></form>
</table>
</td>
</tr>
</table>
<table width='100%'' cellpadding='0' cellspacing='0' border='0'>
<tr height='32'>
<td width='2'><img src='<?=$sub_skin_path?>/img/box_left.gif' alt=''></td>
<td background='<?=$sub_skin_path?>/img/box_bg.gif' valign="bottom">
<?if($gr_id||$bo_table){
if($config[cf_home_ex_sub_use] == 1) $home_ex_sub = $config[cf_home_ex_sub];
else $home_ex_sub = "''";
$excgr = "(".$home_ex_sub.")";
$sql = " SELECT a.gr_id, a.gr_subject, a.gr_use_access, a.gr_10, b.mb_id FROM $g4[group_table] AS a LEFT JOIN $g4[group_member_table] AS b ON a.gr_id = b.gr_id WHERE (b.mb_id = '$member[mb_id]' AND a.gr_use_access = '1' ) OR a.gr_use_access = '0' and a.gr_id not in " . $excgr . " ORDER BY a.gr_1";
$result = sql_query($sql);
?>
<table height='28' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td width="10"></td>
<?
for ($i=0; $row=sql_fetch_array($result); $i++){
$gLink = (!empty($row['gr_10']))?$row['gr_10']:$g4['bbs_path'].'/'.'group.php?gr_id=' .$row['gr_id'];//그룹링크
if($row['gr_id'] == $gr_id){
echo "<td width='2' background='$sub_skin_path/img/box_over_left.gif'></td><td background='$sub_skin_path/img/box_over_bg.gif' style='padding: 3 8 0 8;' style='cursor:pointer;' onclick=location.href='".$gLink."'><span class='text1'>".$row['gr_subject']."</span></td><td width='2' background='$sub_skin_path/img/box_over_right.gif'></td>";
}else{
echo "<td width='10'></td><td><a href='".$gLink."'><span class='text2'>".$row['gr_subject']."</span></a></td><td width='10'></td>";
}
if($i < count($row)+1) echo "<td style='padding: 0 3 0 3;'><img src='$sub_skin_path/img/box_bar.gif'></td>";
}?>
</tr></table>
<?}else{echo "<table height='28' cellpadding='0' cellspacing='0' border='0'><tr><td width='10'></td><td width='2' background='$sub_skin_path/img/box_over_left.gif'></td><td background='$sub_skin_path/img/box_over_bg.gif' style='padding: 3 8 0 8;'><span class='text1'>$config[cf_home_name]</span></td><td width='2' background='$sub_skin_path/img/box_over_right.gif'></td></tr></table>";}?>
</td>
<td width='2'><img src='<?=$sub_skin_path?>/img/box_right.gif' alt=''></td>
</tr>
</table>
<?
if($config[cf_home_ex_board_use] == 1) $home_ex_board = $config[cf_home_ex_board];
else $home_ex_board = "''";
$excgr = "(".$home_ex_board.")";
$sql = " select * from $g4[board_table] where gr_id = '$gr_id' and bo_list_level <= '$member[mb_level]' and bo_table not in " . $excgr . "order by bo_table ";
$result = sql_query($sql);
$sub_cnt = mysql_num_rows($result) - 1;
?>
<table width='100%'' cellpadding='0' cellspacing='0' border='0'>
<tr height="5"><td colspan="3"></td></tr>
<tr height="1"><td bgcolor="#eeeeee" colspan="3"></td></tr>
<tr>
<td width="1" bgcolor="#eeeeee"></td>
<td style='padding: 10 6 6 6;' class='small'><?=$msg?></td>
<td width="1" bgcolor="#eeeeee"></td>
</tr>
<tr height="1"><td bgcolor="#eeeeee" colspan="3"></td></tr>
</table>
<?if($gr_id||$bo_table){?>
<!-- 메인 테이블 -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="6" colspan="4"><td></td></tr>
<tr>
<td width="<?=$config[cf_home_sub_left]?>" valign="top">
<?=outlogin("$config[cf_skin_outlogin]","")?>
<?include_once("$g4[path]/include/sub_menu.php"); // 서브메뉴?>
</td>
<td width="<?=$config[cf_home_sub_margin]?>"></td>
<td valign="top">
<?}?>
include 폴더내에
---------------------------------------
*////// sub.memu.php //////////*
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$h_table="<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr height='6'><td></td></tr></table>";
// 서브메뉴 출력기
if (!$s_menu){
}else{
switch ($s_menu) {
// $s_menu값의 그룹 메뉴를 불러옴
case $s_menu:
echo $h_table;
include_once("$g4[path]/include/sub_menu.skin.php");
break;
default :
break;
}}
?>
------------------------------------
*/////// sub_menu.skin.php //////*
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="190" border="0" cellpadding="0" cellspacing="0">
<tr height='37'><td><img src="<?=$g4['path']?>/img/sub_menu/left_td_title2.gif" border="0"></td></tr>
<tr><td background="<?=$g4['path']?>/img/sub_menu/left_td_bg.gif">
<table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
<colgroup width='10'>
<colgroup>
<colgroup width='10'>
<tr>
<td></td>
<td align='center'>
<table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
<?
if($config[cf_home_ex_board_use] == 1) $home_ex_board = $config[cf_home_ex_board];
else $home_ex_board = "''";
$excgr = "(".$home_ex_board.")";
$sql = " select * from $g4[board_table] where gr_id = '$gr_id' and bo_list_level <= '$member[mb_level]' and bo_table not in " . $excgr . "order by bo_order_search";
$result = sql_query($sql);
$sub_cnt = mysql_num_rows($result) - 1;
?>
<?for ($i=0; $row=sql_fetch_array($result); $i++) {
if($row[bo_table] == $bo_table)
$sub_menu = "<span style='color:#f0761c;font-weight:bold;'>".$row[bo_subject]."</span>";
else
$sub_menu = $row[bo_subject];
?>
<tr height="25" style="padding-top:3px;">
<td width="12"><img src="<?=$g4[path]?>/img/sub_menu/dot.gif"></td>
<?$bo_link = (!empty($row['bo_7']))?$row['bo_7']:$g4['bbs_path'].'/'.'board.php?bo_table=' .$row['bo_table'];?>
<?$bo_target = (!empty($row['bo_6']))?$row['bo_6']:"_self";?>
<?$bo_name = (!empty($row['bo_5']))?$row['bo_5']:$sub_menu;?>
<td width="125"><a href="<?=$bo_link?>" target="<?=$bo_target?>"><?=$bo_name?></a></td>
</tr>
<tr height="1">
<td colspan="2">
<table cellpadding="0" cellspacing="0" width="90%" border="0" align="center">
<tr height="1">
<td background="<?=$g4[path]?>/img/sub_menu/_dot.gif"></td>
</tr>
</table>
</td>
</tr>
<? } ?>
</table>
</td>
<td></td>
</tr>
<tr height='2'><td colspan='3'></td></tr>
</table>
</td></tr>
<tr height='7'><td background="<?=$g4['path']?>/img/sub_menu/left_td_bottom.gif"></td></tr>
</table>
-----------------------------------------------------------
댓글 전체
관리자화면 > 게시판 그룹관리 > 01 그룹의 오른쪽 연필모양의 수정버튼을 클릭하여
게시판 그룹 수정에 들어가셔서 10 번째 여분필드에 링크주소를 입력하고 확인 누르시면 됩니다.
링크주소는 http://자신의 도메인/오누리빌더/ 또는 http://자신의 도메인/오누리빌더/ index.php
그리고 게시판으로 링크 하실려면 게시판 전체경로를 입력하시면 됩니다.
이때 상단 그룹제목을 원하시는 이름 (홈 또는 메인,공지사항,등..)으로 수정 하시면 더욱 좋겠죠....^^
그럼 도움이 되셨길......