http://sir.co.kr/bbs/new.php 처럼, 댓글은 옅게, 게시글은 진하게
http://sir.co.kr/bbs/new.php 처럼,
댓글은 옅게, 게시글은 진하게 하고 싶습니다.
어떻게 하면 될까요?
또, 밑에 페이지 번호도 sir 처럼 하고 싶습니다.
댓글은 옅게, 게시글은 진하게 하고 싶습니다.
어떻게 하면 될까요?
또, 밑에 페이지 번호도 sir 처럼 하고 싶습니다.
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 8개
페이지 번호도 마찬가지 입니다.
이게 코멘트에 관한 변수네요 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=""> <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
<a href='{$list[$i][href]}' class='{$co_cssname}'>{$list[$i][comment]}{$wr_subject}</a></td>