안녕하세요
위스킨 적용 전에는 댓글 갯수가 잘노출되었는데
댓글 갯수가 카운트 안되는데
이유를 알수있을까요?
부탁드립니다.
기존거파일을 따로 저장을 안해놔서요 ㅠㅠ
https://sir.kr/g5_skin/58690?sfl=wr_subject&stx=%EB%8C%93%EA%B8%80
답변 3개 / 댓글 10개

댓글수 정상 적으로 호출을하고잇는데 안나오신다라는것인가요?
답변에 대한 댓글 2개
요소를 체크해보시던가 아니면
<button type="button" class="cmt_btn">
<span class="total">
<b>영업활동</b> <?php echo $view['wr_comment'] ? $view['wr_comment'] : 0; ?>
</span>
<span class="cmt_more"></span>
</button>이렇게 해보시던해보세요
파일이랑 댓글이랑 따로 저장하는거 같네요. 파일만 올리실때 카운트가 안되는거면 파일은 따로 테이블에 저장되서 댓글 카운트에 추가 안되는거 같네요.
답변에 대한 댓글 1개
댓글 갯수를따로 카운트 하지않습니다. 할필요성이 없지않을까요? 만약 댓글갯수를 가져와야한다면 작성자체가 갯수이니 그수를 별도로 누적합을 구해서 출력을해야하겟지요 말그대로 작성된 수가 댓글수가 된다라는뜻이지요 하여 현재 그누보드는 댓글의 수를 정상 출력을하고있습니다.
답변에 대한 댓글 7개
<button type="button" class="cmt_btn"><span class="total"><b>댓글</b> <?php echo $view['wr_comment']; ?></span><span class="cmt_more"></span></button>
<?php echo $view['wr_comment']; ?> 출력을 하고잇을것입니다. 없으면 넣어주세요
$cmt_amt = count($list);
for ($i=0; $i<$cmt_amt; $i++) {
$comment_id = $list[$i]['wr_id'];
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 50;
$comment = $list[$i]['content'];
/*
if (strstr($list[$i]['wr_option'], "secret")) {
$str = $str;
}
*/
$comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment);
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
?>
목록상단에 정의되어잇는지 삭제되어잇는지확인해보시고 없으면 고대로넣어주세요
<button type="button" class="cmt_btn"><span class="total"><b>영업활동</b> <?php echo $view['wr_comment']; ?></span><span class="cmt_more"></span></button>
<!-- 영업활동 시작 { -->
<section id="bo_vc">
<h2>영업활동목록</h2>
<?php
$cmt_amt = count($list);
for ($i=0; $i<$cmt_amt; $i++) {
$comment_id = $list[$i]['wr_id'];
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 50;
$comment = $list[$i]['content'];
/*
if (strstr($list[$i]['wr_option'], "secret")) {
$str = $str;
}
*/
$comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment);
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
?>
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
<div class="cm_wrap">
<header style="z-index:<?php echo $cmt_sv; ?>">
<h2><?php echo get_text($list[$i]['wr_name']); ?>님의 <?php if ($cmt_depth) { ?><span class="sound_only">영업활동의</span><?php } ?> 영업활동</h2>
<?php echo $list[$i]['name'] ?>
<span class="sound_only">작성일</span>
<span class="bo_vc_hdinfo"> <time datetime="<?php echo date('Y-m-d\TH:i:s+09:00', strtotime($list[$i]['datetime'])) ?>"><?php echo $list[$i]['datetime'] ?></time></span>
<br>
<?php
// 파일 출력
$file_comm = get_file($bo_table, $list[$i]['wr_id']);
?>
<?php if (!empty($file_comm[0]['file'])): ?>
<img src="../data/file/<?=$bo_table?>/<?=$file_comm[0]['file']?>" width="100" height="100" border="0" alt="">
<?php endif; ?>
<?php
include(G5_SNS_PATH.'/view_comment_list.sns.skin.php');
?>
</header>
<?php
$sql = "SELECT COUNT(*) AS comment_count FROM {$g5['write_prefix']}{$bo_table} WHERE wr_parent = '{$view['wr_id']}' AND wr_is_comment = 1";
$result = sql_query($sql);
$row = sql_fetch_array($result);
$comment_count = $row['comment_count'];
echo "댓글 수: " . $comment_count;
?>
답변을 작성하려면 로그인이 필요합니다.
<?php
$sql = "SELECT COUNT(*) AS comment_count FROM {$g5['write_prefix']}{$bo_table} WHERE wr_parent = '{$view['wr_id']}' AND wr_is_comment = 1";
$result = sql_query($sql);
$row = sql_fetch_array($result);
$comment_count = $row['comment_count'];
echo "댓글 수: " . $comment_count;
?>
<button type="button" class="cmt_btn"><span class="total"><b>영업활동</b> <?php echo $view['wr_comment']; ?></span><span class="cmt_more"></span></button>
<!-- 영업활동 시작 { -->
<section id="bo_vc">
<h2>영업활동목록</h2>
<?php
$cmt_amt = count($list);
for ($i=0; $i<$cmt_amt; $i++) {
$comment_id = $list[$i]['wr_id'];
$cmt_depth = strlen($list[$i]['wr_comment_reply']) * 50;
$comment = $list[$i]['content'];
/*
if (strstr($list[$i]['wr_option'], "secret")) {
$str = $str;
}
*/
$comment = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $comment);
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
?>