sinbi

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

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

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

어떻게 하면 될까요?

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

댓글 8개

소스 보기 하셔서 원하시는 부분에 적용된 css 를 참고하시면 될 것 같네요.
페이지 번호도 마찬가지 입니다.
소스보기를 해서 알아낼 실력이면 질문도 안했죠. ^^;; 제가 왕초보라 ㅜㅜ
php의 간한한 if 문이라도 아셔야 할거 같은데요 -ㅂ-;;
<? if ($변수) { ?> 요로코롬 시작하는 건 대충 알겠는데, 변수를 어떻게 줘야 할지 몰라서리..ㅋ
$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>
style은 php구문안에 넣으심 안됩니다. -ㅂ-;;;
ㅎㅎ 그렇군요. 다시 시도해보고 문의드릴게요. 좋은 하루 되세요 ! ^^

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기
🐛 버그신고