답변 2개
=latest("theme/basic", "free", 5, 25)?>
이게 기본 최신글 함수고 여기서 수정을 조금 하면(게시판 아이디가 free라고 가정합니다)
=latest("theme/basic", "free|답변", 5, 25)?>
이렇게 바꿉니다.
게시판 아이디|카테고리명
이런 식으로 넣으시면 됩니다.
그리고 /lib/latest.lib.php 파일을 여신 후에
global $g5;
바로 밑에 아래 두 줄 추가해 주세요.
list($bo_table, $category) = explode("|", $bo_table); if($category) $where = " AND ca_name = '".$category."' ";
밑으로 또 내려 보면
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0 order by wr_num limit 0, {$rows} ";
이렇게 된 게 있습니다.
$sql = " select * from {$tmp_write_table} where wr_is_comment = 0".$where." order by wr_num limit 0, {$rows} ";
이렇게 수정해 주세요.
그럼 됩니다.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
http://sir.kr/g5_tip/1828?sfl=wr_subject%7C%7Cwr_content&stx=latest">http://sir.kr/g5_tip/1828?sfl=wr_subject%7C%7Cwr_content&stx=latest
여기 참조하시면 될것 같습니다.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인