자신이 댓글을 단 게시글은 제목 부분을 빨간색으로 표시할 수 있을까요?

자신이 댓글을 단 게시글은 제목 부분을 빨간색으로 표시할 수 있을까요?

QA

자신이 댓글을 단 게시글은 제목 부분을 빨간색으로 표시할 수 있을까요?

본문

댓글을 통해서 예약 신청을 받으려고 하는데

 

자신이 어디에 예약했는지 알기 위해서

 

자신이 댓글 신청을 한 게시글은 제목 부분을 빨간색으로 표시할 수 있을까요?

이 질문에 댓글 쓰기 :

답변 3

list에 쓰실거면 이렇게 쓰세요.

view에 쓰실거면 $list[$i][wr_id] <-이걸 $wr_id 이걸로 바꾸시면 되구요.


<?php
$mb_id_comment = sql_fetch(" select count(*) as cnt from {$write_table} where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = 1 and mb_id = '{$member[mb_id]}'");
if($mb_id_comment){
 echo "내가 쓴 댓글이 있네유";
}
?>

답을 다 드렸는데,

/skin/board/basic/list.skin.php 이파일에서.


<?php echo $list[$i]['subject'] ?> //이부분을 밑에껄로 바꾸세요.

<?php
$mb_id_comment = sql_fetch(" select count(*) as cnt from {$write_table} where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = 1 and mb_id = '{$member[mb_id]}'");
if($mb_id_comment){
   echo "<font color='red'>".$list[$i]['subject']."</font>";
}
?>

echo "<font color='red'>".$list[$i]['subject']."</font>";
위에 것만 넣는게 아니라, 밑에 소스를 다 넣어셔야 해요.

<?php
$mb_id_comment = sql_fetch(" select count(*) as cnt from {$write_table} where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = 1 and mb_id = '{$member[mb_id]}'");
if($mb_id_comment){
  echo "<font color='red'>".$list[$i]['subject']."</font>";
}
?>

댓글을 통해서 예약 신청을 받으려고 하는데 => 유져가 신청할 때 댓글을 달게 되나요 게시글을 달게 되나요?
댓글이 게시글의 답변글을 말하는 것인가요?

게시글을 달게 되는 경우라면 자신의 게시글일 경우를 구분해서 특정 클래스(빨간색 글씨로 바꾸어주는)를 추가하는 방식으로 해야합니다. 
개발이 필요한 상황입니다.

thumb-3659974726_1524549660.174_730x631.jpg

소스를 봐야 알겠네요.. 뭔가 잘못 된것 같아요.
댓글을 해당로그인한 아이디가 전부 다 단거 아닌가요?

<?php
$mb_id_comment = sql_fetch(" select count(*) as cnt from {$write_table} where wr_parent = '{$list[$i][wr_id]}' and wr_is_comment = 1 and mb_id = '{$member[mb_id]}'");
if($mb_id_comment){
  echo "<font color='red'>".$list[$i]['subject']."</font>";
}else{
  echo $list[$i]['subject'];
}
?>

답변을 작성하시기 전에 로그인 해주세요.
전체 88
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT