게시판 상단 내용 불러오기

게시판 상단 내용 불러오기

QA

게시판 상단 내용 불러오기

답변 1

본문

content에 최신글 형태로 게시판 두개를 불러오는 작업을 하고 있는데요

게시판 만들때 쓰는 상단내용 부분도 같이 불러올려고 해요

 

content.skin.php


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$content_skin_url.'/style.css">', 0);

$himg = G5_DATA_PATH.'/content/'.$co_id.'_h';
if (file_exists($himg)) // 상단 이미지
    echo '<div id="ctt_himg" class="ctt_img"><img src="'.G5_DATA_URL.'/content/'.$co_id.'_h" alt=""></div>';
?>

<div class="latest_top_wr" style="margin-top:200px;">
    <?php
    echo latest('theme/pic_block_basic', 'test', 4, 23);            // 최소설치시 자동생성되는 자유게시판
     echo latest('theme/pic_block_basic', 'test', $row['bo_table'], 5, 70, 1, $row['bo_content_head']);
    ?>
</div>

<div class="latest_top_wr">
    <?php
    echo latest('basic', 'notice', 4, 23);        // 최소설치시 자동생성되는 공지사항게시판
    ?>
</div>

 

 

latest.skin.php

 


<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">', 0);
$thumb_width = 350;
$thumb_height = 230;
$list_count = (is_array($list) && $list) ? count($list) : 0;
// 게시판 관리의 상단 내용
if (G5_IS_MOBILE) {
    // 모바일의 경우 설정을 따르지 않는다.
    include_once(G5_BBS_PATH.'/_head.php');
    echo run_replace('board_mobile_content_head', html_purifier(stripslashes($board['bo_mobile_content_head'])), $board);
} 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');
        }
    }
    echo run_replace('board_content_head', html_purifier(stripslashes($board['bo_content_head'])), $board);
}
?>

 <?php echo stripslashes($board['bo_content_head']) ?>
    <div class="normal-container ">
        <div class="normal-wrapper">
            <?php
            for ($i=0; $i<$list_count; $i++) {
            //$thumb = get_list_thumbnail($bo_table, $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);
            $thumb = get_list_thumbnail($list[$i]['bo_table'], $list[$i]['wr_id'], $thumb_width, $thumb_height, false, true);

            if($thumb['src']) {
                $img = $thumb['src'];
            } else {
                $img = G5_IMG_URL.'/no_img.png';
                $thumb['alt'] = '이미지가 없습니다.';
            }
            $img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" >';
            ?>
            <a href="<?php echo $list[$i]['href'] ?>" class="normal-item" onClick="jx_click(this)" >
                <div class="text_box" style="margin-bottom:50px;">
                    <div class="text_area">
                        <div class="lt-date"><?php echo date("Y.m.d", strtotime($list[$i]['wr_datetime'])); ?></div>
                        <div class="lt-cate"><?php echo cut_str($list[$i]['bo_subject'], 10, "..."); ?></div>
                        <div class="lt-subject"><?php echo cut_str($list[$i]['wr_subject'], 30, "..."); ?></div>
                        <div class="lt-text color-gray-1 "> <?php echo cut_str(strip_tags($list[$i]['wr_content']),40);?></div>
                             
                        
                    </div>
                </div>
            </a>
            <?php }  ?>
            
            <?php if ($list_count == 0) { //게시물이 없을 때  ?>
                준비중
            <?php }  ?>       
        </div>
    </div>

 

이렇게 했는데 상단 내용이 뜨다가 새로고침 하면 없어져 버리더라구요

머가 문제일까요?

이 질문에 댓글 쓰기 :

답변 1

위 방법으로는 원인을 알수 없습니다.

그냥 그누보드 순정 최신글을 보드 헤더에 올려보세요.

이상없으면 위 코드가 문제 입니다.

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