최신 게시물 [코] 안나오게 정보
최신 게시물 [코] 안나오게관련링크
본문
안녕하세요..
게시물에 글을 등록하고 댓글을 달면 최신게시물에 [코] 이렇게 해서 리스트에 뿌려지는데요
[코] 댓글은 최신게시물 리스트에 안나오게 하는 방법좀 알려주세요
그누보드 기본스킨이구요
http://masta119.bcpark.net/html/gblog/bbs/new.php
몇번 같은 질문을 드린것 같은데.. 명쾌한 답변이 없어
다시 올립니다.
감사합니다.
게시물에 글을 등록하고 댓글을 달면 최신게시물에 [코] 이렇게 해서 리스트에 뿌려지는데요
[코] 댓글은 최신게시물 리스트에 안나오게 하는 방법좀 알려주세요
그누보드 기본스킨이구요
http://masta119.bcpark.net/html/gblog/bbs/new.php
몇번 같은 질문을 드린것 같은데.. 명쾌한 답변이 없어
다시 올립니다.
감사합니다.
댓글 전체
/lib/lastest.php
$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 ";
$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;
}
?>
<?
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_reply ='' and wr_is_comment = 0 order by wr_num limit 0, $rows ";
$sql = " select * from $tmp_write_table where wr_reply ='' and wr_is_comment = 0 order by wr_num limit 0, $rows ";
아 comment말씀이셨군요..
$sql = " select * from $tmp_write_table where wr_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 이분을 수정하면...... 아닌가.
혹시 bb/new.php 이분을 수정하면...... 아닌가.
lastest()함수 사용안하시네요 ;;
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 ");
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 ");
그렇게 하닌까 목록에 제목은 안나오는데 [코] 만 나와서 이빨 빠진것 처럼 보여요..
news.php 첨부한번 해보시죠..
수정이 안되서 링크로 걸어 드릴께요
http://masta119.bcpark.net/test.htm
이곳에 new / latest.skin / latest.bin 함께 넣었습니다.
http://masta119.bcpark.net/test.htm
이곳에 new / latest.skin / latest.bin 함께 넣었습니다.