별점댓글을 latest에 노출시켜 댓글을 작성을 했는데, 전체 게시물에 적용되는 문제 채택완료
qoqofh
4년 전
조회 2,242
https://sir.kr/g5_plugin/4797" rel="nofollow noreferrer noopener" target="_blank">https://sir.kr/g5_plugin/4797
여기의 별점관리 댓글 게시판을 사용하여 활용하고 있습니다.
시스템은 문제없이 잘 되었는데,
latest의 최신글을 https://sir.kr/g5_skin/7834" rel="nofollow noreferrer noopener" target="_blank">https://sir.kr/g5_skin/7834
이 스킨을 사용하여 팝업으로 노출하고 있는데,
</p>
<p><?php
$wri = $list[$j]['wr_id'];
$ref_table = $bo_table;
$ref_id = $wri;
include G5_PLUGIN_PATH.'/tl_star/star.php';</p>
<p> ?></p>
<p>
이렇게 별점 댓글을 latest페이지를 수정하여 노출을 하고 있는 상태입니다.
그런데, 문제가 노출은 되는데, 해당 bo_table의 전체 게시물에 충족된다고 해야하나요..?
만약 bo_table=pro_1의 게시판을 예를들면,
pro_1의 게시글이 약 10개정도 있다는 가정하에서,
별점댓글을 latest에 노출시켜 댓글을 작성을 했는데, 댓글을 작성한 게시물에만 들어가는게 아니라,
10개 전체에 들어가는 상태입니다...
무엇이 문제일까요...?
라테스트의 내부는 이렇습니다.
</p>
<p> </p>
<p> </p>
<p><?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');</p>
<p>// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$latest_skin_url.'/style.css?'.time().'" />', 0);
$thumb_width = 280;
$thumb_height = 200;
$list_count = (is_array($list) && $list) ? count($list) : 0;
?></p>
<p> </p>
<p> </p>
<p><ul class="program_wrap">
<?php for ($j=0; $j<$list_count; $j++) { ?>
<?php</p>
<p> //유튜브 ID 설정
$youtube_url = $list[$j]['wr_link1'];
$youtube_id = str_replace('<a href="http://youtu.be/','',$youtube_url);" target="_blank" rel="noopener noreferrer">http://youtu.be/','',$youtube_url);</a>
$youtube_id = str_replace('<a href="https://youtu.be/','',$youtube_id);" target="_blank" rel="noopener noreferrer">https://youtu.be/','',$youtube_id);</a>
$thumb = get_list_thumbnail($bo_table, $list[$j]['wr_id'], $thumb_width, $thumb_height, false, true);</p>
<p> if ($youtube_id) {
$img = "<a href="https://img.youtube.com/vi/".$youtube_id."/hqdefault.jpg";" target="_blank" rel="noopener noreferrer">https://img.youtube.com/vi/".$youtube_id."/hqdefault.jpg";</a>
} else if($thumb['src']) {
$img = $thumb['src'];
} else {
$img = G5_IMG_URL.'/no_img.png';
$thumb['alt'] = '이미지가 없습니다.';
}
$img_content = '<img src="'.$img.'" alt="'.$thumb['alt'].'" style="width:100%; height: auto;" />';
$wr_href = get_pretty_url($bo_table, $list[$j]['wr_id']);
?>
<li class="galley_li program" style="position:relative">
<div class="view"><div id="pop_<?=$j?>" style="cursor:pointer; position:absolute;width:100%;height:100%;top:0;left:0"></div></div>
<?php if ($youtube_id) { ?>
<a href="<?php echo $wr_href; ?>" class="lt_img img_wrap" id="pop_<?=$j?>"><?php echo run_replace('thumb_image_tag', $img_content, $thumb); ?><span><i class="fa fa-play-circle-o" aria-hidden="true"></i></span></a>
<?php } else { ?>
<a href="<?php echo $wr_href; ?>" class="lt_img img_wrap" id="pop_<?=$j?>"><?php echo run_replace('thumb_image_tag', $img_content, $thumb); ?></a>
<?php } ?>
<?php
echo "<a class='pro_tit' id='pop_".$j.">' href=\"".$wr_href."\" > ";
if ($list[$j]['is_notice'])
echo "<strong>".$list[$j]['subject']."</strong>";
else
echo $list[$j]['subject'].$list[$j]['wr_id'];
echo "</a>";
echo "<span class='pro_line'></span><p class='pro_txt'>".$list[$j]['wr_3']."</p>";</p>
<p> ?>
<!--레이어-->
<div id="popup_<?=$j?>">
<div class="guide"></p>
<p> <div class="close"><img src="<?=$latest_skin_url?>/img/close.png"></div>
<div class="con">
<span class="title"><?php echo cut_str(strip_tags($list[$j]['subject']), 50,'…'); ?></span>
<?=$list[$j]['wr_content'];?>
<?php
$wri = $list[$j]['wr_id'];
$ref_table = $bo_table;
$ref_id = $wri;
include G5_PLUGIN_PATH.'/tl_star/star.php';</p>
<p> ?>
</div>
</p>
<p>
</div></p>
<p> <div class="bg"></div></p>
<p> </div>
<!--//레이어-->
<script>
$(document).ready(function(){
$("#pop_<?=$j?>").click(function()
{
$("#popup_<?=$j?>").show();
});
$(".close").click(function()
{
$("#popup_<?=$j?>").hide();
});</p>
<p>});
</script></p>
<p>
</li>
<?php } ?></p>
<p>
<?php if ($list_count == 0) { //게시물이 없을 때 ?>
<li class="empty_li">게시물이 없습니다.</li>
<?php } ?></p>
<p>
</ul></p>
<p>
ref_id와 ref_table에 들어가는 값들도 다 충족되어 아래 이미지처럼 잘 들어가있는 상태입니다....
![]()
각각 게시물마다 해당 테이블과 wr_id에 맞춰 벨류값이 각각 잘 들어가있는 상태입니다.
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인