세로메뉴 관련문제 > 그누4 질문답변

그누4 질문답변

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

세로메뉴 관련문제 정보

세로메뉴 관련문제

본문

첫번째가 제가 하려고 하는 세로메뉴배열이고요.

두번째는 제가 적용한 세로메뉴 배열입니다.

자동으로 게시판을 불러오느라 잘모르겠네요.

제목적은 한줄에 2~3개의 게시판목록을 불러오고싶습니다.

아래는 스킨의 소스입니다.


<? if (!defined("_GNUBOARD_")) exit; //gbcRF skin


?><style type="text/css">
#bcRFV_global { /*메뉴 가장자리를 감싸는 영역*/
width:220px;
border:3px dotted gray;
background-color:transparent/*black*/;
position:relative;
}

#bcRFV_group { /*그룹메뉴 영역*/
margin-top:5px;margin-left:5px;margin-right:5px;
padding:7 0 0 10;
}
    #bcRFV_group a.groupSubject { /*그룹제목 스타일*/
    width:150px;/*block 설정시 너비 빼먹으면 msie에서 안먹힘*/
    height:23px;
    display:block; /*포인터 영역 확대*/
    }

#bcRFV_board { /*게시판 제목*/
width:164px;
margin:0 0 0 0;
padding:0 0 0 5;
background-color:transparent;
position:relative;
}
    #bcRFV_board a.boardLink { /*게시판제목 링크 스타일*/
    width:156px;/*block 설정시 너비 빼먹으면 msie에서 안먹힘*/
    height:15px;
    display:block; /*포인터 영역 확대*/
    padding:5 0 5 0;
    }

#bcRFV_sub { /*분류 영역*/
width:164px;/*ie*/
position:relative;
border-right:0px dotted gray;
border-bottom:0px dotted gray;
border-left:0px dotted gray;
}
    #bcRFV_sub a.subLink { /*분류제목 링크 스타일 - 사용안함*/
    letter-spacing:0px;
    border-bottom:0px dotted gray;
    }

.new {
font: oblique small-caps 500 12px/15px arial;
color:red;
}
.newc {
font: oblique 12px/15px arial;
}
</style>

<table  id="bcNRFV_css_skin" radius="3" rborder="#DDDDDD" rbgcolor="transparent" width='174' height="20" border='0' cellspacing='0' cellpadding='0'>
<tr>
<td><?

// rolo님 메뉴스킨 라이브러리 참조, 일반적인 조건으로 쿼리
// 제외 게시판 - 전체 검색 사용 no, 목록열람 레벨
// 나스카님 원글 및 분류별 새글 카운트(izen님 php속도향상팁 적용)
/*logic/
//현재 배열요소의 키(key)값은 각 루프의 $key변수로 지정된다.//여기서 필요한가??
//foreach( $list as $key=> $group){
foreach($list as $group){
    echo "<DIV><b>" . $group['gr_subject'] . "</b> (" . $group['gr_id'] . ")";
    foreach( $group['bbs'] as $bbs){
        echo "<dd><b>" . $bbs['bo_subject'] . "</b></dd>";
        foreach( $bbs['sca'] as $category){
            echo "<dd><i>" . $category . "</i></dd></DIV>";
        }
    }
}
/*/
?><div id='bcRFV_global'><?

$bar = " - ";


//그룹
foreach($list as $group){

    //$menu_size= count( $list);
    $bbs_size= count( $group['bbs']);

    $group_subject = "<span style='font-weight:bold;'>" . cut_str(get_text($group['gr_subject']),20,"") . "</span>";
   

    ?><div id="bcRFV_group"><a href='<?=$g4['path']?><?=$group['gr_id'] == "sample_gal" ? '/gallery' : '/bbs' ;/*특정그룹*/?>/group.php?gr_id=<?=$group['gr_id']?>' onfocus='this.blur()' class="groupSubject"><?=$group_subject?></a></div><?

    //게시판
    foreach($group['bbs'] as $bbs){

        $tmp_write_table = $g4[write_prefix] . $bbs['bo_table'];
        $intime = date("Y-m-d H:i:s", time()-3600*$bbs['bo_new']);
        //원글 및 코멘트 새글 카운트 by nasca, izen님 빠른쿼리로 보강
        $sql_new = mysql_query(" select count(wr_datetime) as wr_datetime from $tmp_write_table where wr_is_comment = '0' and wr_datetime >= '$intime' ");//and wr_option not like '%secret%'
        $row_new = mysql_fetch_array($sql_new);
        $sql_cm_new = mysql_query(" select count(wr_datetime) as wr_datetime from $tmp_write_table where  wr_is_comment <> '0' and wr_datetime >= '$intime' ");
        $row_cm_new = mysql_fetch_array($sql_cm_new);

        $bn_count = $row_new['wr_datetime'];
        $bn_countc = $row_cm_new['wr_datetime'];

        if ($bn_count || $bn_countc > 0){
            $new = "&nbsp;<span class='new'>(" . $bn_count . '/' . $bn_countc . ")</span>";
            }else{
                $new = "";
                }

            foreach( $bbs['sca'] as $category){//분류가 있고 분류사용 체크된 게시판 별도표시
                $sicon = "";
                if (($bbs['bo_use_category'] == "1") && ($category)){
                $sicon = "&nbsp;<span style='color:red;'>&middot;</span>";
                }
            }

        $style = "";
        if ($bbs['bo_table'] == $bo_table)//해당 게시판 강조
        $style = "style='font-weight:bold; color:red;'";
        $bo_subject = "<span $style>" . cut_str(get_text($bbs['bo_subject']),20,"") . "</span>" . $new . $sicon;
   
        ?><div id='bcRFV_board'><a href='<?=$g4[bbs_path]?><?=$bbs['bo_table'] == "sample_gal"?'/gallery/?gur':'/board.php?bo_table=';/*특정게시판 경로*/?><?=$bbs['bo_table']?>' class='boardLink' onfocus='this.blur()'><?=$bullet?> <?=$bo_subject?></a><?

        //분류목록 세로배열
        $bo_width = 100;//전체 테이블 너비 %
        $cols = 2;//세로 칼럼수
        $ca_width = intval($bo_width / $cols);//셀 너비

        $cnt = 1;

        //게시판이고 분류사용 체크되있으며 분류내용 있는 경우
        if (($bbs['bo_table'] == $bo_table) && (($bbs['bo_use_category'] == "1") && ($category))){

        ?><div id='bcRFV_sub'>
       
        <div style="width:<?=$bo_width?>%; border:0px solid white;"><?
       
            //분류
            foreach( $bbs['sca'] as $category){
            //bo_new에서 지정한 시간내 분류별 원글 및 코멘트 새글 카운트 by nasca, izen님 빠른쿼리로 보강
            $sql2_new = mysql_query(" select count(wr_datetime) as wr_datetime from $tmp_write_table where wr_is_comment = '0' and wr_datetime >= '$intime' and ca_name = '$category'");
            $row2_new = mysql_fetch_array($sql2_new);
            $sql2_cm_new = mysql_query(" select count(wr_datetime) as wr_datetime from $tmp_write_table where wr_is_comment <> '0' and wr_datetime >= '$intime' and ca_name = '$category'");
            $row2_cm_new = mysql_fetch_array($sql2_cm_new);

            $cn_count = $row2_new['wr_datetime'];
            $cn_countc = $row2_cm_new['wr_datetime'];

            if ($cn_count || $cn_countc > 0){
                $new2 = "&nbsp;<span class='new'>(" . $cn_count . '/' . $cn_countc . ")</span>";
                }else{
                    $new2 = "";
                    } 

            //링크에서 한글로된 카데고리 이름을 urlencode시킴
            $sca_url = urlencode($category);

            $style = "";
            if ($category == $sca)//해당 분류 강조
            $style = "style='font-weight:normal; color:red;'";
            $ca_subject = "<span $style>" . cut_str(get_text($category),10,"") . "</span>" . $new2;

            ?><span style="width:<?=$ca_width?>%;padding:3 0 3 5;"><a href='<?=$g4['bbs_path']?>/board.php?bo_table=<?=$bbs['bo_table']?>&sca=<?=urlencode($category)?>' class="subLink" onfocus='this.blur()'><?=$bar?> <?=$ca_subject?></a>
            </span><?

            if ($cnt == $cols){
                $cnt = 0;
                ?></div><div style="width:<?=$bo_width?>%; border:0px solid red;"><?
                }

            $cnt++;
           
            }//foreach category
            ?></div></div><?
        }//if
    ?></div><?
    }//foreach bbs
}//foreach group
?></div>
<div style='clear: both;'></div>
</td>
</tr>
</table>     
<script>roundTable("bcNRFV_css_skin");</script>

도와주시면 감사하겠습니다.
  • 복사

댓글 전체

해결해주시면 좋은데! 으음.  뒤에 흑막이있다고 사료됩니다 흐흐..

비굴하게 중학생처럼 굴진않으려고요 ..

해결해주셔도되고 안해주셔도 원망은하지않겠습니다!
혹시나해서 해봤는데 아닌것같아요.

소메뉴 1 옆에 소메뉴 3 이렇게 한줄로 하려고해요.!

http://www.etorrent.co.kr/index.php  < 여기 세로메뉴처럼요
© SIRSOFT
현재 페이지 제일 처음으로