최근게시물 스킨에서 댓글이 0일때 숫자 안보이게 하려면.... > 그누4 질문답변

그누4 질문답변

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

최근게시물 스킨에서 댓글이 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
    &nbsp;<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
    &nbsp;<a href='{$list[$i][href]}'>{$list[$i][comment]}{$wr_subject} <font color="#ff6600">+ {$list[$i][wr_comment]}</font></a> 


이부분을

echo("&nbsp;<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>");


머 이런식으로 바꾸면 되겠네요
© SIRSOFT
현재 페이지 제일 처음으로