전체게시판 최신 게시물 잘 안되요.
본문
Sjkjh2님의 자료를 가지고 최신 게시물 해 보니 내용이 안뜹니다.
http://sir.co.kr/bbs/board.php?bo_table=g5_skin&wr_id=4565&page=6
아래처럼 나옵니다.
lib 소스에서 인크루드 하면 화면이 아예 안나옵니다.
extend 디렉토리 안에도 넣어보고 했습니다.
아래는 new_latest.extend.php 내용입니다.
<?php
if (!defined('_GNUBOARD_')) exit;
// board_new 게시판 최신글 추출
// $cache_time 캐시 갱신시간
function new_latest($skin_dir='', $rows=10, $subject_len=40, $cache_time=1, $options='')
{
global $g5;
//static $css = array();
if (!$skin_dir) $skin_dir = 'basic';
if(G5_IS_MOBILE) {
$latest_skin_path = G5_MOBILE_PATH.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
$latest_skin_url = G5_MOBILE_URL.'/'.G5_SKIN_DIR.'/latest/'.$skin_dir;
} else {
$latest_skin_path = G5_SKIN_PATH.'/latest/'.$skin_dir;
$latest_skin_url = G5_SKIN_URL.'/latest/'.$skin_dir;
}
ob_start();
include $latest_skin_path.'/latest.skin.php';
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
latest.lib.php 안에 붙여 넣기 했는데 화면에 바탕화면만 나오고 다른건 없습니다.
제가 초보라 자세히 좀 부탁드립니다.ㅠㅠ
!-->
답변 2
위의 스킨 페이지에도 설명이 되어 있는 것처럼,
먼저, skin 폴더 안에 all_board폴더를 업로드하고
그 다음에 extend 폴다에 new_lastest.extend.php 파일을 업로드 하시고요.
사용하고 싶은 페이지에
<?php
echo new_latest("all_board", 8, 30);
?> 를 넣어주시면 됩니다.
항목은 순서대로 스킨명, 리스트 개수, 제목 길이 이고요.
lastest.lib.php 에 붙여 넣기 하면 안됩니다.
http://sir.co.kr/manual/kcp_youngcart4/?man=skin.htm
latest (최신글 스킨)
위의 url에서 최신글 스킨 적용 방법을 참고해 주세요.
html 코드가 들어가는 페이지에 적용을 시켜야 합니다.
답변을 작성하시기 전에 로그인 해주세요.