최근게시물 스킨에서 댓글이 0일때 숫자 안보이게 하려면.... 정보
최근게시물 스킨에서 댓글이 0일때 숫자 안보이게 하려면....
본문
new.skin.php 소스에서 댓글 수 출력 소스가 아래와 같습니다.
<?
for ($i=0; $i<count($list); $i++)
{
$gr_subject = cut_str($list[$i][gr_subject], 21);
$bo_subject = cut_str($list[$i][bo_subject], 21);
$wr_subject = get_text(cut_str($list[$i][wr_subject], 60));
echo <<<HEREDOC
<!-- 마우스 오버 -->
<tr onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#f8f8f9'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" height="30" colspan=3><a href='./new.php?gr_id={$list[$i][gr_id]}'><span style="color:#000000;">{$gr_subject}</a></td>
<td align="center" colspan=2 style="color:#000000;"><a href='./board.php?bo_table={$list[$i][bo_table]}'><span style="color:#000000;">{$bo_subject}</a></td>
<td width="">
HEREDOC;
if ($is_admin) {
if ($list[$i][comment])
echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][comment_id]}|{$list[$i][bo_table]}'>";
else
echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}|{$list[$i][bo_table]}'>";
}
echo <<<HEREDOC2
<a href='{$list[$i][href]}'>{$list[$i][comment]}{$wr_subject} <font color="#ff6600">+ {$list[$i][wr_comment]}</font></a>
위 소스 중 댓글 수 출력 부분이 바로 위 + {$list[$i][wr_comment]} 부분입니다.
어떻게 하면... 댓글 수가 0일 땐 최신글이나 최신댓글 목록에 0이란 숫자가 안보이게 할 수 있을까요?
<?
for ($i=0; $i<count($list); $i++)
{
$gr_subject = cut_str($list[$i][gr_subject], 21);
$bo_subject = cut_str($list[$i][bo_subject], 21);
$wr_subject = get_text(cut_str($list[$i][wr_subject], 60));
echo <<<HEREDOC
<!-- 마우스 오버 -->
<tr onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#f8f8f9'" onMouseOut="this.style.backgroundColor='#ffffff'">
<td align="center" height="30" colspan=3><a href='./new.php?gr_id={$list[$i][gr_id]}'><span style="color:#000000;">{$gr_subject}</a></td>
<td align="center" colspan=2 style="color:#000000;"><a href='./board.php?bo_table={$list[$i][bo_table]}'><span style="color:#000000;">{$bo_subject}</a></td>
<td width="">
HEREDOC;
if ($is_admin) {
if ($list[$i][comment])
echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][comment_id]}|{$list[$i][bo_table]}'>";
else
echo "<input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}|{$list[$i][bo_table]}'>";
}
echo <<<HEREDOC2
<a href='{$list[$i][href]}'>{$list[$i][comment]}{$wr_subject} <font color="#ff6600">+ {$list[$i][wr_comment]}</font></a>
위 소스 중 댓글 수 출력 부분이 바로 위 + {$list[$i][wr_comment]} 부분입니다.
어떻게 하면... 댓글 수가 0일 땐 최신글이나 최신댓글 목록에 0이란 숫자가 안보이게 할 수 있을까요?
댓글 전체

echo <<<HEREDOC2
<a href='{$list[$i][href]}'>{$list[$i][comment]}{$wr_subject} <font color="#ff6600">+ {$list[$i][wr_comment]}</font></a>
이부분을
echo(" <a href='{$list[$i][href]}'>{$list[$i][comment]}{$wr_subject} ");
echo($list[$i][wr_coment]?"<font color="#ff6600">+ {$list[$i][wr_comment]}</font>":"");
echo("</a>");
머 이런식으로 바꾸면 되겠네요

이렇게 했더니, 페이지 전체가 백지로 나오는데용. ^^;;;
불량학생님 답변이 맞는 것 같은데요.
잘 못 수정하신게 아닌지요.
잘 못 수정하신게 아닌지요.