최신 게시물 [코] 안나오게

· 2013-03-08 (금) 13:22:08 · 1685 · 10
안녕하세요..
게시물에 글을 등록하고 댓글을 달면 최신게시물에 [코] 이렇게 해서 리스트에 뿌려지는데요
[코] 댓글은 최신게시물 리스트에 안나오게 하는 방법좀 알려주세요

그누보드 기본스킨이구요

http://masta119.bcpark.net/html/gblog/bbs/new.php

몇번 같은 질문을 드린것 같은데.. 명쾌한 답변이 없어
다시 올립니다.

감사합니다.
|

댓글 10개

2013-03-08 (금) 13:56:15
/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 ";
2013-03-08 (금) 14:25:37
감사합니다.. 그런데 그케해도 안돼네요..ㅠㅠ

<?
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;
}
?>
2013-03-08 (금) 14:39:57
$sql = " select * from $tmp_write_table where wr_reply ='' and wr_is_comment = 0 order by wr_num limit 0, $rows ";
이렇게 해보세요..
2013-03-08 (금) 14:44:05
그래도 나오는데요..ㅠㅠ

$sql = " select * from $tmp_write_table where wr_reply ='' and wr_is_comment = 0 order by wr_num limit 0, $rows ";
2013-03-08 (금) 14:51:08
아 comment말씀이셨군요..

$sql = " select * from $tmp_write_table where wr_comment=0 order by wr_num limit 0, $rows ";
2013-03-08 (금) 14:57:31
그래도 안돼네요..ㅠㅠ

혹시 bb/new.php 이분을 수정하면...... 아닌가.
2013-03-08 (금) 15:09:11
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 ");
2013-03-08 (금) 15:18:55
그렇게 하닌까 목록에 제목은 안나오는데 [코] 만 나와서 이빨 빠진것 처럼 보여요..
2013-03-08 (금) 15:20:57
news.php 첨부한번 해보시죠..
2013-03-08 (금) 16:04:27
수정이 안되서 링크로 걸어 드릴께요
http://masta119.bcpark.net/test.htm
이곳에 new / latest.skin / latest.bin 함께 넣었습니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

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

+
제목 글쓴이 날짜 조회
13-03-08 조회 1,717
13-03-08 조회 1,049
13-03-08 조회 835
13-03-08 조회 870
13-03-08 조회 1,014
13-03-08 조회 1,037
13-03-08 조회 1,673
13-03-08 조회 1,654
13-03-08 조회 1,064
13-03-08 조회 899
13-03-08 조회 1,624
13-03-08 조회 1,097
13-03-08 조회 1,686
13-03-08 조회 1,025
13-03-08 조회 1,041
13-03-08 조회 1,939
13-03-07 조회 1,284
13-03-08 조회 2,087
13-03-08 조회 1,615
13-03-08 조회 1,545