서브 레이아웃 카테고리명 노출 내용관리

서브 레이아웃 카테고리명 노출 내용관리

QA

서브 레이아웃 카테고리명 노출 내용관리

본문

후 ㅠㅠ 그누보드 너무어렵네요

1.

www/head.php 맨하단 "콘텐츠 시작" 부분에

<h2 id="container_title">

 <span title="<?php echo get_text($g5['title']); ?>"><?php echo get_head_title($g5['title']); ?></span>

</h2>

이부분이있던데요

<?php echo get_text($g5['title']); ?>"> 가 페이지 제목을 불러오는거같은데

카테고리(대메뉴, 1depth, 1차 카테고리)명을 상단에 같이 불러오고 싶어요

뭐를 추가해야될까요

 

2.

관리자 게시판관리>메뉴관리 가면

페이지마다 ID값이 있잖아요 ! 예를들면 회사소개 : company

그 ID값만 #container 안에서 받아오면 이것저것 해볼수 있을거같은데

방법좀 알려주세요

파일 여기저기 들쑤셔봤을때 대충 키워드는 co_subject, co_id 이런거같은데........ 살려주세요

이 질문에 댓글 쓰기 :

답변 2

검색부터 먼저 해 보시길 권해 드립니다.

팁 자료실도 찾아 보시면 좋을거 같습니다.

뭐라 설명을 드릴려고 해도 님께서 어느정도 이해하고 계신지?

정확히 어떤 의도로 그런 기능을 구현하려고 하시는지 알 수가 없습니다.

gnuboard 5.4.1.1-head.php


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
if (G5_IS_MOBILE) {
    include_once(G5_THEME_MOBILE_PATH.'/head.php');
    return;
}
include_once(G5_THEME_PATH.'/head.sub.php');
include_once(G5_LIB_PATH.'/latest.lib.php');
include_once(G5_LIB_PATH.'/outlogin.lib.php');
include_once(G5_LIB_PATH.'/poll.lib.php');
include_once(G5_LIB_PATH.'/visit.lib.php');
include_once(G5_LIB_PATH.'/connect.lib.php');
include_once(G5_LIB_PATH.'/popular.lib.php');
if(($bo_table) && ($txt != "")){
$menu_url = G5_URL.$_SERVER['REQUEST_URI'];
}else{
$menu_url = G5_URL.'/bbs/board.php?bo_table='.$bo_table;
}
$menu = sql_fetch(" select * from {$g5['menu_table']} where me_use = '1' and me_link = '$menu_url' ");
$me_code = substr($menu['me_code'],0,2);
$sql = " select * from {$g5['menu_table']} where me_use = '1' and me_code = '$me_code' ";
$result = sql_query($sql, false);
for ($i=0; $row=sql_fetch_array($result); $i++) {
$txt = $row['me_name'];
$txtx = $row['me_link'];
}
$sql2 = " select * from {$g5['menu_table']} where me_use = '1' and substring(me_code, 1, 2) = '$me_code' order by me_order, me_id ";
$result2 = sql_query($sql2);
for ($m=0; $row2=sql_fetch_array($result2); $m++) {
if($row2['me_link'] == $menu_url){
$txt2 = $row2['me_name'];
$txty = $row2['me_link'];
}}
?>
<!-- 상단 시작 { -->
<div id="hd">
    <h1 id="hd_h1"><?php echo $g5['title'] ?></h1>
    <div id="skip_to_container"><a href="#container">본문 바로가기</a></div>
    <?php
    if(defined('_INDEX_')) { // index에서만 실행
        include G5_BBS_PATH.'/newwin.inc.php'; // 팝업레이어
    }
    ?>
    <div id="tnb">
     <div class="inner">
   <ul id="hd_qnb">
             <li><a href="<?php echo G5_BBS_URL ?>/faq.php">FAQ</a></li>
             <li><a href="<?php echo G5_BBS_URL ?>/qalist.php">Q&A</a></li>
             <li><a href="<?php echo G5_BBS_URL ?>/new.php">새글</a></li>
             <li><a href="<?php echo G5_BBS_URL ?>/current_connect.php" class="visit">접속자<strong class="visit-num"><?php echo connect('theme/basic'); // 현재 접속자수, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정  ?></strong></a></li>
         </ul>
  </div>
    </div>
    <div id="hd_wrapper">
        <div id="logo">
            <!--a href="<?php echo G5_URL ?>"><img src="<?php echo G5_THEME_IMG_URL ?>/logo.png" alt="<?php echo $config['cf_title']; ?>"></a-->
            <a href="<?php echo G5_URL ?>"><p style="font-size:2.3em;font-weight:bold;color:#559bfa;text-align:left;text-shadow: #dcdcdc 1px 1px;"><?php echo $config['cf_title']; ?></p></a>
        </div>
        <div class="hd_sch_wr">
            <fieldset id="hd_sch">
                <legend>사이트 내 전체검색</legend>
                <form name="fsearchbox" method="get" action="<?php echo G5_BBS_URL ?>/search.php" onsubmit="return fsearchbox_submit(this);">
                <input type="hidden" name="sfl" value="wr_subject||wr_content">
                <input type="hidden" name="sop" value="and">
                <label for="sch_stx" class="sound_only">검색어 필수</label>
                <input type="text" name="stx" id="sch_stx" maxlength="20" placeholder="검색어를 입력해주세요">
                <button type="submit" id="sch_submit" value="검색"><i class="fa fa-search" aria-hidden="true"></i><span class="sound_only">검색</span></button>
                </form>
                <script>
                function fsearchbox_submit(f)
                {
                    if (f.stx.value.length < 2) {
                        alert("검색어는 두글자 이상 입력하십시오.");
                        f.stx.select();
                        f.stx.focus();
                        return false;
                    }
                    // 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
                    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 false;
                    }
                    return true;
                }
                </script>
            </fieldset>
               
            <?php echo popular('theme/basic'); // 인기검색어, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정  ?>
        </div>
        <ul class="hd_login">       
            <?php if ($is_member) {  ?>
            <li><a href="<?php echo G5_BBS_URL ?>/member_confirm.php?url=<?php echo G5_BBS_URL ?>/register_form.php">정보수정</a></li>
            <li><a href="<?php echo G5_BBS_URL ?>/logout.php">로그아웃</a></li>
            <?php if ($is_admin) {  ?>
            <li class="tnb_admin"><a href="<?php echo correct_goto_url(G5_ADMIN_URL); ?>">관리자</a></li>
            <?php }  ?>
            <?php } else {  ?>
            <li><a href="<?php echo G5_BBS_URL ?>/register.php">회원가입</a></li>
            <li><a href="<?php echo G5_BBS_URL ?>/login.php">로그인</a></li>
            <?php }  ?>
        </ul>
    </div>
   
    <nav id="gnb">
        <h2>메인메뉴</h2>
        <div class="gnb_wrap">
            <ul id="gnb_1dul">
                <li class="gnb_1dli gnb_mnal"><button type="button" class="gnb_menu_btn" title="전체메뉴"><i class="fa fa-bars" aria-hidden="true"></i><span class="sound_only">전체메뉴열기</span></button></li>
                <?php
    $menu_datas = get_menu_db(0, true);
    $gnb_zindex = 999; // gnb_1dli z-index 값 설정용
                $i = 0;
                foreach( $menu_datas as $row ){
                    if( empty($row) ) continue;
                    $add_class = (isset($row['sub']) && $row['sub']) ? 'gnb_al_li_plus' : '';
                ?>
                <li class="gnb_1dli <?php echo $add_class; ?>" style="z-index:<?php echo $gnb_zindex--; ?>">
                    <a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="gnb_1da" <?php if($txt == $row['me_name']){?>style="color:#3a8afd"<?php } ?>><?php echo $row['me_name'] ?></a>
                    <?php
                    $k = 0;
                    foreach( (array) $row['sub'] as $row2 ){
                        if( empty($row2) ) continue;
                        if($k == 0)
                            echo '<span class="bg">하위분류</span><div class="gnb_2dul"><ul class="gnb_2dul_box">'.PHP_EOL;
                    ?>
                        <li class="gnb_2dli">
   <a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" class="gnb_2da" <?php if ($txt2 == $row2['me_name']) { ?> style="color:#3a8afd"<?php } ?>><?php echo $row2['me_name'] ?></a></li>
                    <?php
                    $k++;
                    }   //end foreach $row2
                    if($k > 0)
                        echo '</ul></div>'.PHP_EOL;
                    ?>
                </li>
                <?php
                $i++;
                }   //end foreach $row
                if ($i == 0) {  ?>
                    <li class="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
                <?php } ?>
            </ul>
            <div id="gnb_all">
                <h2>전체메뉴</h2>
                <ul class="gnb_al_ul">
                    <?php
                    $i = 0;
                    foreach( $menu_datas as $row ){
                    ?>
                    <li class="gnb_al_li">
                        <a href="<?php echo $row['me_link']; ?>" target="_<?php echo $row['me_target']; ?>" class="gnb_al_a" <?php if ($txt == $row['me_name']) { ?> style="color:#fa0"<?php } ?>><?php echo $row['me_name'] ?></a>
                        <?php
                        $k = 0;
                        foreach( (array) $row['sub'] as $row2 ){
                            if($k == 0)
                                echo '<ul>'.PHP_EOL;
                        ?>
                            <li><a href="<?php echo $row2['me_link']; ?>" target="_<?php echo $row2['me_target']; ?>" <?php if ($txt2 == $row2['me_name']) { ?> style="color:#fa0"<?php } ?>><?php echo $row2['me_name'] ?></a></li>
                        <?php
                        $k++;
                        }   //end foreach $row2
                        if($k > 0)
                            echo '</ul>'.PHP_EOL;
                        ?>
                    </li>
                    <?php
                    $i++;
                    }   //end foreach $row
                    if ($i == 0) {  ?>
                        <li class="gnb_empty">메뉴 준비 중입니다.<?php if ($is_admin) { ?> <br><a href="<?php echo G5_ADMIN_URL; ?>/menu_list.php">관리자모드 > 환경설정 > 메뉴설정</a>에서 설정하실 수 있습니다.<?php } ?></li>
                    <?php } ?>
                </ul>
                <button type="button" class="gnb_close_btn"><i class="fa fa-times" aria-hidden="true"></i></button>
            </div>
            <div id="gnb_all_bg"></div>
        </div>
    </nav>
    <script>
    $(function(){
        $(".gnb_menu_btn").click(function(){
            $("#gnb_all, #gnb_all_bg").show();
        });
        $(".gnb_close_btn, #gnb_all_bg").click(function(){
            $("#gnb_all, #gnb_all_bg").hide();
        });
    });
    </script>
</div>
<!-- } 상단 끝 -->
<hr>
<!-- 콘텐츠 시작 { -->
<div id="wrapper">
    <div id="container_wr">
  
    <div id="container">
        <?php if (!defined("_INDEX_")) { ?><h2 id="container_title" style="margin-bottom:10px"><a href="<?php echo G5_URL ?>">Home</a> &gt <a href="<?php echo $txtx ?>"><?php echo $txt ?></a><?php if ($txt != get_head_title($g5['title'])) { ?> &gt <a href="<?php echo $txty ?>"><?php echo $txt2; } ?></a></span></h2><?php } ?>
답변을 작성하시기 전에 로그인 해주세요.
전체 156
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT