여러게시판에서 최신글 추출

여러게시판에서 최신글 추출

QA

여러게시판에서 최신글 추출

본문

여러게시판에서 '최신글', '최신갤러리' 를 추출할 수 있을까요?..

 

http://sir.co.kr/bbs/board.php?bo_table=g5_tip&wr_id=857 

 

이걸로 했더니 안되더라구요..

 

이 질문에 댓글 쓰기 :

답변 3

올려주신 팁 내용을 이렇게 수정해보세요. 

적용법은 동일합니다.

<?php echo latest2("basic", array("notice","free"), 5, 70);?> 

 


function latest2($skin_dir = "", Array $bo_tableIds, $rows = 10, $subject_len = 40) {
    global $g5;
 
    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;
    }
 
	$sql_select = "  ";
 
	$list = array();
	$sql  = "
		select b.gr_id, a.bo_table, a.wr_id, a.wr_parent, a.bn_datetime, b.bo_subject, b.bo_subject
		from $g5[board_new_table] a, $g5[board_table] b
		where a.bo_table = b.bo_table and a.bo_table in('" . implode("','", $bo_tableIds) . "') and a.wr_id = a.wr_parent
		order by a.bn_id desc limit $rows
	";
 
	$_boardInfo       = array();
	$_notExistsBoards = array();
 
	$result = sql_query($sql);
	foreach ($bo_tableIds as $tableId) {
		$board = sql_fetch("select * from {$g5['board_table']} where bo_table = '" . addslashes($tableId) . "'");
		if ($board === false) $_notExistsBoards[] = $tableId;
 
		$_boardInfo[$board['gr_id']] = $board;
	}
 
	for ($i = 0; $row = sql_fetch_array($result); $i++) {
		$tmp_write_table = $g5['write_prefix'] . $row['bo_table'];
		$row2            = sql_fetch("select * from $tmp_write_table where wr_id = '$row[wr_id]'");
		$list[$i]        = $row2;
 
		$list[$i]            = get_list($row2, $_boardInfo[$row['gr_id']], $latest_skin_path, $subject_len);
		$bo_href[$i]         = $row['bo_table'];
		$bo_name[$i]         = $row['bo_subject'];
		$list[$i]['wr_date'] = $row2['wr_datetime'];
	}
 
	ob_start();
	if ($_notExistsBoards) {
		echo join(", ", $_notExistsBoards) . " 게시판이 존재하지 않습니다.";
	}
    include $latest_skin_path.'/latest.skin.php';
    $content = ob_get_contents();
	ob_end_clean();
	return $content;
}

안되네요.

 

http://sir.co.kr/bbs/board.php?bo_table=g5_tip&wr_id=2193&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EC%B5%9C%EC%8B%A0%EA%B8%80 

 

이것은 적용해보니 아이콘 파일이 뜨지않네요.

답변을 작성하시기 전에 로그인 해주세요.
전체 0 | RSS
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

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