게시판 상단 내용 노출 관련 문의 드립니다.

게시판 상단 내용 노출 관련 문의 드립니다.

QA

게시판 상단 내용 노출 관련 문의 드립니다.

답변 3

본문

관리자에서 게시판 상단 내용에 별도의 내용을 입력하여 list.skin.php 화면 상단에 해당 내용이 잘 노출이 됩니다.

궁금한 것은 이 상단 내용이 list.skin.php 화면에서만 노출이 되고 view.skin.php 화면에서는 노출이 되지 않았으면 하는데요.

아래 코드에서 수정하면 된다는데 어떤 것을 수정해야 하는지 고수님들의 도움을 좀 청합니다.

 

===============================================================

// 게시판 관리의 상단 내용
if (G5_IS_MOBILE) {
    // 모바일의 경우 설정을 따르지 않는다.
    include_once(G5_BBS_PATH.'/_head.php');
    if($is_bo_content_head) {
        echo html_purifier(stripslashes($board['bo_mobile_content_head']));
    }
} else {
    // 상단 파일 경로를 입력하지 않았다면 기본 상단 파일도 include 하지 않음
    if (trim($board['bo_include_head'])) {
        if (is_include_path_check($board['bo_include_head'])) {  //파일경로 체크
            @include ($board['bo_include_head']);
        } else {    //파일경로가 올바르지 않으면 기본파일을 가져옴
            include_once(G5_BBS_PATH.'/_head.php');
        }
    }
    if($is_bo_content_head) {
        echo html_purifier(stripslashes($board['bo_content_head']));
    }
}

 

감사합니다.

이 질문에 댓글 쓰기 :

답변 3

wr_id 가 0 이면 리스트페이지이고

0보다 크면 뷰페이지입니다.

이걸 조건문으로 짜 보세요.

 

if ($wr_id === 0) {

    해당코드

}


// 게시판 관리의 상단 내용
if (G5_IS_MOBILE) {
    // 모바일의 경우 설정을 따르지 않는다.
    include_once(G5_BBS_PATH.'/_head.php');
    if($is_bo_content_head) {
        echo html_purifier(stripslashes($board['bo_mobile_content_head']));
    }
} else {
    // 상단 파일 경로를 입력하지 않았다면 기본 상단 파일도 include 하지 않음
    if (trim($board['bo_include_head'])) {
        if (is_include_path_check($board['bo_include_head'])) {  //파일경로 체크
            @include ($board['bo_include_head']);
        } else {    //파일경로가 올바르지 않으면 기본파일을 가져옴
            include_once(G5_BBS_PATH.'/_head.php');
        }
    }
    if($is_bo_content_head) {
    if ($wr_id === 0) echo html_purifier(stripslashes($board['bo_content_head']));
    }
}

각 if문에 && !$wr_id 추가해서 잘 되는지 확인하면서 작업해 보세요.

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 60,954
© SIRSOFT
현재 페이지 제일 처음으로