게시판 코멘수가 같은 페이지의 모든 게시물에 나타납니다.
게시판은
게시판의 어느 한군데 코멘트가 달리면
다른 게시물에도(코멘트가 없는 게시물등) 코멘트의 숫자가 표시됩니다.(링크도 걸림)
즉 코멘트가 달린 페이지 내의 모든 게시물에 코멘트 숫자가 달려 버립니다.
아래는 해당 스킨의 list.skin.php 의
코멘트 관련 구문입니다.
<? for ($i=0; $i<count($list); $i++) {
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$board_skin_path/img/no_image.gif";
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$board_skin_path/img/no_image.gif";
$content = cut_str(get_text($list[$i][wr_content]), 80);
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
if ($list[$i][comment_cnt])
$comm_cnt = "<a href={$list[$i][comment_href]}><span class=cmt>{$list[$i][comment_cnt]}</span></a>";
$comm_cnt = "<a href={$list[$i][comment_href]}><span class=cmt>{$list[$i][comment_cnt]}</span></a>";
$ca_wr10_href = "$g4[bbs_path]/board.php?bo_table=$board[bo_table]&sca=&sfl=wr_10&stx=".urlencode($list[$i][wr_10]);
?>
부탁 드리겠습니다.
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 2개
for ($i=0; $i<count($list); $i++) {
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if(!file_exists($img) || !$list[$i][file][0][file]) $img = "$board_skin_path/img/no_image.gif";
$content = cut_str(get_text($list[$i][wr_content]), 80);
$href="";
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
echo"<a href='$href'>링크로</a>";
$comm_cnt ="";
if($list[$i][comment_cnt])
$comm_cnt = "<a href={$list[$i][comment_href]}><span class=cmt>{$list[$i][comment_cnt]}</span></a>";
echo"$comm_cnt<br>";
$ca_wr10_href = "$g4[bbs_path]/board.php?bo_table=$board[bo_table]&sca=&sfl=wr_10&stx=".urlencode($list[$i][wr_10]);
}
?>
정말 감사합니다..
위의 구문으로 대체하니까
195번 라인이 에러라면서 출력이 되길래 포기 할려다가
어떻게 어떻게 지우고 테스트하다 보니까 수정되더군요...
정말 감사드립니다.
아래 구문이 올바른것인지는 잘모르겠습니다..만
현재는 정상적으로 코멘트수에 관한것은 수정이 되었습니다.
<? for ($i=0; $i<count($list); $i++) {
$img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
if (!file_exists($img) || !$list[$i][file][0][file])
$img = "$board_skin_path/img/no_image.gif";
$content = cut_str(get_text($list[$i][wr_content]), 80);
$href="";
$href = "$g4[bbs_path]/link.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&no=1";
$comm_cnt ="";
if ($list[$i][comment_cnt])
$comm_cnt = "<a href={$list[$i][comment_href]}><span class=cmt>{$list[$i][comment_cnt]}</span></a>";
$ca_wr10_href = "$g4[bbs_path]/board.php?bo_table=$board[bo_table]&sca=&sfl=wr_10&stx=".urlencode($list[$i][wr_10]);
?>