최신 게시물 [코] 안나오게
안녕하세요..
게시물에 글을 등록하고 댓글을 달면 최신게시물에 [코] 이렇게 해서 리스트에 뿌려지는데요
[코] 댓글은 최신게시물 리스트에 안나오게 하는 방법좀 알려주세요
그누보드 기본스킨이구요
http://masta119.bcpark.net/html/gblog/bbs/new.php
몇번 같은 질문을 드린것 같은데.. 명쾌한 답변이 없어
다시 올립니다.
감사합니다.
게시물에 글을 등록하고 댓글을 달면 최신게시물에 [코] 이렇게 해서 리스트에 뿌려지는데요
[코] 댓글은 최신게시물 리스트에 안나오게 하는 방법좀 알려주세요
그누보드 기본스킨이구요
http://masta119.bcpark.net/html/gblog/bbs/new.php
몇번 같은 질문을 드린것 같은데.. 명쾌한 답변이 없어
다시 올립니다.
감사합니다.
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 10개
$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_reply is null and wr_is_comment = 0 order by wr_num limit 0, $rows ";
<?
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 ";
$sql = " select * from $tmp_write_table where wr_reply is null and 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;
}
?>
이렇게 해보세요..
$sql = " select * from $tmp_write_table where wr_reply ='' and wr_is_comment = 0 order by wr_num limit 0, $rows ";
$sql = " select * from $tmp_write_table where wr_comment=0 order by wr_num limit 0, $rows ";
혹시 bb/new.php 이분을 수정하면...... 아닌가.
new.php를 직접 수정하세요
else // 코멘트
{
$comment = "[코] ";
$comment_link = "#c_{$row[wr_id]}";
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_parent]' ");
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from $tmp_write_table where wr_id = '$row[wr_id]' ");
이부분에서
else // 코멘트
{
$comment = "[코] ";
$comment_link = "#c_{$row[wr_id]}";
$row2 = sql_fetch(" select * from $tmp_write_table where wr_id = '$row[wr_parent]' and wr_comment=0");
$row3 = sql_fetch(" select mb_id, wr_name, wr_email, wr_homepage, wr_datetime from $tmp_write_table where wr_id = '$row[wr_id]' and wr_comment=0 ");
http://masta119.bcpark.net/test.htm
이곳에 new / latest.skin / latest.bin 함께 넣었습니다.