k

메인화면의 최근글이 같은글로 4번 반복됩니다..

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://jjumping.com/gnuboard4/

게시판 수대로 최근글이 자동으로 나오는것 같은데.. 왜 이런걸까요..ㅠ
알려주세요...
게시판 하나만 부를 수 없는건가요????ㅠㅠ

<?
if (!defined('_GNUBOARD_')) exit;

// 최신글 추출
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;

if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";

$list = array();

$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 order by wr_id desc limit 0, $rows ";
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
//explain($sql);
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);

ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();

return $content;
}
?>
|

댓글 2개

<?
if (!defined('_GNUBOARD_')) exit;
?>

<?=latest('basic', 'product_01', 8, 26);?>



////////////////////////////////////////
위에처럼 바꿔 보세요
설명
<?=latest('basic', '게시판테이블명', 추출할 갯수, 제목길이);?>
네 그렇게 적용시켰는데도.. 4개가 나오네요..
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13년 전 조회 3,074
13년 전 조회 1,752
13년 전 조회 1,585
13년 전 조회 1,589
13년 전 조회 1,566
13년 전 조회 813
13년 전 조회 1,022
13년 전 조회 804
13년 전 조회 1,765
13년 전 조회 795
13년 전 조회 909
13년 전 조회 1,005
13년 전 조회 987
13년 전 조회 939
13년 전 조회 801
13년 전 조회 3,005
13년 전 조회 986
13년 전 조회 1,139
13년 전 조회 2,342
13년 전 조회 868