|
|
|
19년 전
|
조회 1,810
|
|
|
|
19년 전
|
조회 2,547
|
|
|
|
19년 전
|
조회 1,813
|
|
|
|
19년 전
|
조회 2,041
|
|
|
|
19년 전
|
조회 1,812
|
|
|
|
19년 전
|
조회 1,851
|
|
|
|
19년 전
|
조회 2,216
|
|
|
|
19년 전
|
조회 1,741
|
|
|
|
19년 전
|
조회 1,865
|
|
|
|
19년 전
|
조회 1,595
|
|
|
|
19년 전
|
조회 1,777
|
|
|
|
19년 전
|
조회 1,808
|
|
|
|
19년 전
|
조회 3,069
|
|
|
|
19년 전
|
조회 1,763
|
|
|
|
19년 전
|
조회 2,230
|
|
|
|
19년 전
|
조회 1,913
|
|
|
|
19년 전
|
조회 2,079
|
|
|
|
19년 전
|
조회 1,953
|
|
|
|
19년 전
|
조회 1,895
|
|
|
|
19년 전
|
조회 2,826
|
|
|
|
19년 전
|
조회 1,859
|
|
|
|
19년 전
|
조회 1,723
|
|
|
|
19년 전
|
조회 2,036
|
|
|
|
19년 전
|
조회 2,199
|
|
|
|
19년 전
|
조회 1,962
|
|
|
|
19년 전
|
조회 1,985
|
|
|
|
19년 전
|
조회 2,053
|
|
|
|
19년 전
|
조회 1,791
|
|
|
|
19년 전
|
조회 1,742
|
|
|
|
19년 전
|
조회 2,055
|
댓글 13개
bbs/group.php를 참고하시면 되쟎어유.....
아래처럼 뽑히니까 문제죠. - _-ㅋ
테이블마다 5개씩 뽑히지 말고~
한방에 5개만 뽑아야죠~ 뭐 그누보드 메인의 스크롤처럼요~
그룹1
테이블A
1.
2.
3.
4.
5.
테이블B
1.
2.
3.
4.
5.
음~~~! 몰라유...죄송혀유...바빠서 텨=====33333
일반적인 최신글 불러오기처럼 사용하시면 그룹최신글 완성됩니다. (그룹명-카테고리까지 지원합니다.)
<?=latest_group(스킨명,게시판id , 최신글 갯수, 제목문자열길이);?>
// 최신글 추출 - 선택한 그룹별로 원하는 수만큼 보여줌
function latest_group($skin_dir="", $gr_id, $rows=10, $subject_len=40, $category="", $orderby="")
{
global $config;
global $g4;
$list = array();
$limitrows = $rows;
$sqlgroup = " select bo_table, bo_subject from $g4[board_table] where gr_id = '$gr_id' and bo_use_search=1 order by bo_order_search";
$rsgroup = sql_query($sqlgroup);
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/$config[cf_latest_skin]";
for ($j=0, $k=0; $rowgroup=sql_fetch_array($rsgroup); $j++) {
$bo_table = $rowgroup[bo_table];
// 테이블 이름구함
$sql = " select * from {$g4[board_table]} where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4[write_prefix] . $bo_table; // 게시판 테이블 실제이름
// 옵션에 따라 정렬
$sql = "select * from $tmp_write_table where wr_is_comment = 0 ";
$sql .= (!$category) ? "" : " and ca_name = '$category' ";
$sql .= (!$orderby) ? " order by wr_id desc " : " order by $orderby desc, wr_id desc ";
$sql .= " limit $limitrows";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++, $k++) {
if(!$orderby) $op_list[$k] = $row[wr_datetime];
else {
$op_list[$k] = is_string($row[$orderby]) ? sprintf("%-256s", $row[$orderby]) : sprintf("%016d", $row[$orderby]);
$op_list[$k] .= $row[wr_datetime];
}
$list[$k] = get_list($row, $board, $latest_skin_path, $subject_len);
$list[$k][bo_table] = $board[bo_table];
$list[$k][bo_subject] = $board[bo_subject];
$list[$k][bo_wr_subject] = cut_str($board[bo_subject] . $list[$k][wr_subject], $subject_len);
}
}
if($k>0) array_multisort($op_list, SORT_DESC, $list);
if($k>$rows) array_splice($list, $rows);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
/// 함수 정의 끝
?>
결국 원하시는 게시판 스킨이 갤러리 그룹의 최신게시물을 썸네일로 가져와 보여주는것같은데, 고민좀 해봐야 겠습니다. ^^