http://sir.co.kr/bbs/new.php 처럼, 댓글은 옅게, 게시글은 진하게 > 그누4 질문답변

그누4 질문답변

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

http://sir.co.kr/bbs/new.php 처럼, 댓글은 옅게, 게시글은 진하게 정보

http://sir.co.kr/bbs/new.php 처럼, 댓글은 옅게, 게시글은 진하게

본문

http://sir.co.kr/bbs/new.php 처럼,

댓글은 옅게, 게시글은 진하게 하고 싶습니다.

어떻게 하면 될까요?

또, 밑에 페이지 번호도 sir 처럼 하고 싶습니다.
  • 복사

댓글 전체

$list[$i][comment]
이게 코멘트에 관한 변수네요 G4기준..


아래의 코드를 for문의 echo 앞에다가 추가하시구요

if($list[$i][comment]) {
  //코멘트일경우의 css name
  $co_ccsname = 'co_css';
} else {
  //일반글일경우의 css name
  $co_ccsname = 'bo_css';
}

<style>
.bo_css{
  color : $ccc;
}
.bo_css {
 color : #00
}
</style>


요렇게 스타일을 추가해주시고
색은 알아서 변경하세요 -ㅂ-;;

그리고 아래의 코드를 수정합니다.

    <td width="">&nbsp;<a href='{$list[$i][href]}' class='{$co_cssname}'>{$list[$i][comment]}{$wr_subject}</a></td>




뭐 안되셔도 책임은 지지 않습니다. (책임회피 -_-;;)
답변 고맙습니다. 알려주신 소스를 아래처럼 약간 수정해 넣었습니다. 그런데, 하얀 백지 상태네요. ^^;;

어디가 잘못된걸까요?



<?
for ($i=0; $i<count($list); $i++)
{
// 자동치환
global $member;
if ($is_member) {
            $list[$i][subject] = str_replace("{닉네임}", $member[mb_nick], $list[$i][subject]);
$list[$i][subject] = str_replace("{별명}", $member[mb_nick], $list[$i][subject]);
        } else {
            $list[$i][subject] = str_replace("{닉네임}", "회원", $list[$i][subject]);
$list[$i][subject] = str_replace("{별명}", "회원", $list[$i][subject]);
        }     


    $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], 70));


if($list[$i][comment]) {
  //코멘트일경우의 css name
  $co_cssname = 'co_css';
} else {
  //일반글일경우의 css name
  $bo_cssname = 'bo_css';
}

<style>
.co_css{
  color : gray;
}
.bo_css {
 color : red;
}
</style>


    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]}' class='{$bo_cssname}'>{$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]}' class='{$co_cssname}'>{$list[$i][comment]}{$wr_subject}</a></td>
© SIRSOFT
현재 페이지 제일 처음으로