알라뷰님의 게시판 자동메뉴 문의 > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

알라뷰님의 게시판 자동메뉴 문의 정보

알라뷰님의 게시판 자동메뉴 문의

본문

알라뷰님의 게시판 자동메뉴 질문입니다.
특정게시판을 제외하고 싶은데, 현재의 방식은 게시판 관리자에서 전체검색을 설정하지 않으면 되도록 하면 되는군요.
이렇게하면 전체검색시 검색이 안되는 문제가 생기므로 저는 소스내에서 특정게시판은 아예 제외를 시키고 싶습니다.

바쁘시더라도 어떻게 하면 되는지 좀 가르쳐 주세요. ^^*


======================================== 소스시작 ================================

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">
<!--
/* 자동메뉴*/
.gr_sub  {  font-family:굴림; font-size:10pt;  color:#7280DE; font-weight:bold;}
.new  { font-size:7pt;  color:#FBA960; }
.menu_on  {  font-family:돋움; font-size:9pt; line-height:11pt; }
a.menu_on:visited, a.menu_on:link {  color:#555555; text-decoration:none; }
a.menu_on:hover, a.menu_on:active {  color:#FF9E3E; background-color:#FFFFFF; text-decoration:none; }
-->
</style>

<? if (!$gr_id )  { ?>   

<table width='190' cellpadding=0 cellspacing=0 border=0 background='<?=$g4[path]?>/img_/left_menu_img/bg.gif'>
<tr>
    <td height='65' background='<?=$g4[path]?>/img_/left_menu_img/top.jpg' align=center class=gr_sub style='padding-top:15px;'>
    안   내</td>
</tr>
<tr>
    <td align=center valign='top'>
    <table width='170' cellpadding=0 cellspacing=0 border=0>
    <tr><td height='1' background='<?=$g4[path]?>/img_/left_menu_img/dot.gif'></td></tr>
    <tr><td height='25' style='padding-left:10px; padding-top:3px;'><img src='<?=$g4[path]?>/img_/left_menu_img/on_ico.gif' width=20 height=12 border='0' align='absmiddle'><a href='<?=$g4[path]?>' class='menu_on' onfocus='this.blur()'>처음화면</a></td>
    </tr>
    <tr><td height='1' background='<?=$g4[path]?>/img_/left_menu_img/dot.gif'></td></tr>

    <tr><td height='25' style='padding-left:10px; padding-top:3px;'><img src='<?=$g4[path]?>/img_/left_menu_img/off_ico.gif' width=20 height=12 border='0' align='absmiddle'><a href="<?=$g4['bbs_path']?>/board.php?bo_table=comm_faq" class='menu_on' onfocus='this.blur()'>FAQ</a></td>
    </tr>
    <tr><td height='1' background='<?=$g4[path]?>/img_/left_menu_img/dot.gif'></td></tr>

    <tr><td height='25' style='padding-left:10px; padding-top:3px;'><img src='<?=$g4[path]?>/img_/left_menu_img/off_ico.gif' width=20 height=12 border='0' align='absmiddle'><a href="<?=$g4['bbs_path']?>/board.php?bo_table=comm_pds" class='menu_on' onfocus='this.blur()'>자료실</a></td>
    </tr>
    <tr><td height='1' background='<?=$g4[path]?>/img_/left_menu_img/dot.gif'></td></tr>

    <tr><td height='25' style='padding-left:10px; padding-top:3px;'><img src='<?=$g4[path]?>/img_/left_menu_img/off_ico.gif' width=20 height=12 border='0' align='absmiddle'><a href="<?=$g4['bbs_path']?>/board.php?bo_table=comm_hoogi" class='menu_on' onfocus='this.blur()'>리조트 이용후기</a></td>
    </tr>
    <tr><td height='1' background='<?=$g4[path]?>/img_/left_menu_img/dot.gif'></td></tr>

    <tr><td height='25' style='padding-left:10px; padding-top:3px;'><img src='<?=$g4[path]?>/img_/left_menu_img/off_ico.gif' width=20 height=12 border='0' align='absmiddle'><a href="<?=$g4['bbs_path']?>/board.php?bo_table=comm_4989" class='menu_on' onfocus='this.blur()'>사고팔고</a></td>
    </tr>
    <tr><td height='1' background='<?=$g4[path]?>/img_/left_menu_img/dot.gif'></td></tr>

    <tr><td height='3'></td></tr>
    </table>    </td>
</tr>
<tr>
    <td height=4><img src='<?=$g4[path]?>/img_/left_menu_img/bo.gif' width=190 height=4 border=0></td>
</tr>
</table>

<? } else { ?>

<table width='190' cellpadding=0 cellspacing=0 border=0 background='<?=$g4[path]?>/img_/left_menu_img/bg.gif'>
<tr>
    <td height='65' background='<?=$g4[path]?>/img_/left_menu_img/top.jpg' align=center class=gr_sub style='padding-top:15px;'>
<?
  if($group[gr_subject]!='')  {
echo "$group[gr_subject]";
  }
?>
</td>
</tr>
<tr>
    <td align=center valign='top'>
    <table width='170' cellpadding=0 cellspacing=0 border=0>
    <tr><td height='1' background='<?=$g4[path]?>/img_/left_menu_img/dot.gif'></td></tr>
<?
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));

//전체 검색사용에 체크된 게시판만 검색순서에 따라 추출
$sql = " select bo_table, bo_subject from $g4[board_table] where (bo_list_level <= $member[mb_level]) and gr_id = '$gr_id' and bo_use_search = '1' order by bo_order_search";

//여분필드 bo_1의 순서로 정렬
//$sql = " select bo_table, bo_subject from $g4[board_table] where (bo_list_level <= $member[mb_level]) and gr_id = '$gr_id' order by bo_1";

$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$tmp_write_table = $g4[write_prefix] . $row[bo_table];
$sql2 = " select wr_datetime from $tmp_write_table where wr_datetime >= '$intime'";
$result2 = sql_query($sql2);
$total_count = mysql_num_rows($result2);

//새글알림
if ($total_count > 0) {
// $new = "<img src='$g4[path]/left_menu_img/icon_new.gif' width='11' height='8' border='0' align='absmiddle'>";
$new = "<span class=new> ($total_count)</span> <img src='$g4[path]/img_/left_menu_img/icon_new.gif' width='11' height='8' border='0' align='absmiddle'>";
}
else { 
$new = "";
}

//현재위치
if ($row[bo_table] == $bo_table) {
echo "<tr><td height='25' bgcolor='#FFFFFF' style='padding-left:10px; padding-top:3px;'><img src='$g4[path]/img_/left_menu_img/on_ico.gif' width=20 height=12 border='0' align='absmiddle'><b>$row[bo_subject]</b> $new</td></tr>";
}
else {
echo "<tr><td height='25' bgcolor='#FFFFFF' style='padding-left:10px; padding-top:3px;'><img src='$g4[path]/img_/left_menu_img/off_ico.gif' width=20 height=12 border='0' align='absmiddle'><a href='$g4[path]/bbs/board.php?bo_table=$row[bo_table]' class=menu_on>$row[bo_subject]</a> $new</td></tr>";
}

echo "<tr><td height='1' background='$g4[path]/img_/left_menu_img/dot.gif'></td></tr>";
}
?>
<tr><td height='3'></td></tr>
    </table>    </td>
</tr>
<tr>
    <td height=4><img src='<?=$g4[path]?>/img_/left_menu_img/bo.gif' width=190 height=4 border=0></td>
</tr>
</table>

<? } ?>
===========================================================================
  • 복사

댓글 전체

//전체 검색사용에 체크된 게시판만 검색순서에 따라 추출
$sql = " select bo_table, bo_subject from $g4[board_table] where (bo_list_level <= $member[mb_level]) and gr_id = '$gr_id' and bo_use_search = '1' order by bo_order_search";

상단 구문에서,
bo_table <> '특정테이블'을 추가.
또는 bo_table not in '특정테이블'

(ex)
$sql = " select bo_table, bo_subject from $g4[board_table] where bo_table <> '제외할게시판' and (bo_list_level <= $member[mb_level]) and gr_id = '$gr_id' and bo_use_search = '1' order by bo_order_search";
나스카님 께서 써주신 위의 댓글 방법이나 아니면 게시판 여분필드의 특정 값이 있는것은 제외하는 것도 방법일수 있습니다.

//전체 검색사용에 체크된 게시판만 검색순서에 따라 추출
$sql = " select bo_table, bo_subject from $g4[board_table] where (bo_list_level <= $member[mb_level]) and gr_id = '$gr_id' and bo_use_search = '1' bo_10 <> "특정값" order by bo_order_search";
//제외시키고자 하는 게시판이 여러개 일때 추가
$exc = "('게시판1', '게시판2', '게시판3')";
......... bo_table not in {$exc} order by bo_order_search";
많은 분들께서 정확한 답글들을 달아 주셔서 감사합니다.
모든 분들께 포인트를 드리고 싶지만 제일 먼저 올려주신 나스카님의 답변을 채택했습니다.
이점 너그러이 용서해 주시기 바랍니다.

다시 한번 주옥같은 해결책에 감사드립니다.
© SIRSOFT
현재 페이지 제일 처음으로