24시간 이내에 달린 코멘트가 있을경우 ... 코멘트에 갯수의 색상을 바꾸고 싶어요... 정보
24시간 이내에 달린 코멘트가 있을경우 ... 코멘트에 갯수의 색상을 바꾸고 싶어요...본문
어지간히 사이트를 다 만들고 나니...몇가지 욕심이 생기네요. 스킨을 cheditor를 쓰고 있는데
그누에서는 코멘트가 최근에 붙었는지 확인할 방법이 마땅하지 않쟎아요???
그래서, 일부를 수정해서 24시간이내에 새로운 코멘트가 달렸으면 코멘트 갯수를 적색으로
바꾸고 싶은데 방법이 없을까요?
skin 디렉토리의 list.skin.php를 열어보니 ... 엄두가 나지 않네요. -.-a
댓글 전체

팁란의 http://www.sir.co.kr/bbs/tb.php/g4_tiptech/2752 이 글을 참고하시면 해결하실수 있습니다.
감사합니다. 저는 아무리 검색해도 팁이 안보여서... -.-a
넙순님 조언대로 skin에 아래와 같이 넣으니까 됩니다. ^^a
무한 감사 드립니다...
if ($list[$i][comment_cnt])
{
$co_wr_parent = $list[$i][wr_id];
$co_wr_comment =substr($list[$i][comment_cnt],1,1);
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));
$sqlcomm = "SELECT count(*) AS cnt FROM $write_table WHERE wr_is_comment = '1' and wr_parent = '$co_wr_parent' and wr_datetime >='$intime'";
$row = sql_fetch($sqlcomm);
if ($row[cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'><font color='#F36B2D'><b>{$list[$i][comment_cnt]}</b></font></span></a>";
else
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
}
넙순님 조언대로 skin에 아래와 같이 넣으니까 됩니다. ^^a
무한 감사 드립니다...
if ($list[$i][comment_cnt])
{
$co_wr_parent = $list[$i][wr_id];
$co_wr_comment =substr($list[$i][comment_cnt],1,1);
$intime = date("Y-m-d H:i:s", time() - (int)(60 * 60 * 24));
$sqlcomm = "SELECT count(*) AS cnt FROM $write_table WHERE wr_is_comment = '1' and wr_parent = '$co_wr_parent' and wr_datetime >='$intime'";
$row = sql_fetch($sqlcomm);
if ($row[cnt])
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'><font color='#F36B2D'><b>{$list[$i][comment_cnt]}</b></font></span></a>";
else
echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:7pt;'>{$list[$i][comment_cnt]}</span></a>";
}