답변 3개 / 댓글 9개
채택된 답변
+20 포인트
2018-04-24 (화) 14:10:52
list에 쓰실거면 이렇게 쓰세요.
view에 쓰실거면 $list[$i][wr_id] <-이걸 $wr_id 이걸로 바꾸시면 되구요.
Copy
<?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 "내가 쓴 댓글이 있네유";
}
?>
답변에 대한 댓글 5개
qwebvq
2018-04-24 (화) 14:29:53
2018-04-24 (화) 14:36:20
답을 다 드렸는데,
/skin/board/basic/list.skin.php 이파일에서.
[code]
<?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>";
}
?>
[/code]
/skin/board/basic/list.skin.php 이파일에서.
[code]
<?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>";
}
?>
[/code]
2018-04-24 (화) 14:57:03
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>";
}
?>
위에 것만 넣는게 아니라, 밑에 소스를 다 넣어셔야 해요.
<?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>";
}
?>
qwebvq
2018-04-24 (화) 15:00:50
네 그렇게 하였는데 사진처럼 댓글 달지도 않은 게시글에도 모두 빨간색으로 표시되어 나오네요..
새댓글에 사진입니다..
새댓글에 사진입니다..
![]()
답변에 대한 댓글 2개
2018-04-24 (화) 15:06:11
소스를 봐야 알겠네요.. 뭔가 잘못 된것 같아요.
댓글을 해당로그인한 아이디가 전부 다 단거 아닌가요?
<?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'];
}
?>
댓글을 해당로그인한 아이디가 전부 다 단거 아닌가요?
<?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'];
}
?>
2018-04-24 (화) 13:48:07
댓글을 통해서 예약 신청을 받으려고 하는데 => 유져가 신청할 때 댓글을 달게 되나요 게시글을 달게 되나요?
댓글이 게시글의 답변글을 말하는 것인가요?
게시글을 달게 되는 경우라면 자신의 게시글일 경우를 구분해서 특정 클래스(빨간색 글씨로 바꾸어주는)를 추가하는 방식으로 해야합니다.
개발이 필요한 상황입니다.
답변에 대한 댓글 2개
qwebvq
2018-04-24 (화) 14:27:54
유저가 신청을 하기위해서 댓글버튼을 눌러 댓글을 달게 됩니다
그리고 댓글로 신청을 한 게시글이 빨간색으로 나왔으면 합니다..
그리고 댓글로 신청을 한 게시글이 빨간색으로 나왔으면 합니다..
답변을 작성하려면 로그인이 필요합니다.
소스만 보면 그렇게 안되는거 같아서요..