별점댓글을 latest에 노출시켜 댓글을 작성을 했는데, 전체 게시물에 적용되는 문제

별점댓글을 latest에 노출시켜 댓글을 작성을 했는데, 전체 게시물에 적용되는 문제

QA

별점댓글을 latest에 노출시켜 댓글을 작성을 했는데, 전체 게시물에 적용되는 문제

본문

https://sir.kr/g5_plugin/4797

여기의 별점관리 댓글 게시판을 사용하여 활용하고 있습니다.

시스템은 문제없이 잘 되었는데, 

latest의 최신글을 https://sir.kr/g5_skin/7834

이 스킨을 사용하여 팝업으로 노출하고 있는데, 

 


<?php
                                $wri = $list[$j]['wr_id'];                            
                                $ref_table = $bo_table;
                                $ref_id = $wri;
                                                
                                 include G5_PLUGIN_PATH.'/tl_star/star.php';
                            ?>

이렇게 별점 댓글을 latest페이지를 수정하여 노출을 하고 있는 상태입니다. 

 

그런데, 문제가 노출은 되는데, 해당 bo_table의 전체 게시물에 충족된다고 해야하나요..? 

 

만약 bo_table=pro_1의 게시판을 예를들면,

pro_1의 게시글이 약 10개정도 있다는 가정하에서,

별점댓글을 latest에 노출시켜 댓글을 작성을 했는데, 댓글을 작성한 게시물에만 들어가는게 아니라,

10개 전체에 들어가는 상태입니다...

 

무엇이 문제일까요...?

 

라테스트의 내부는 이렇습니다.


 
 
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G5_LIB_PATH.'/thumbnail.lib.php');
// 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;
?>
 
 
<ul class="program_wrap">
            
            <?php for ($j=0; $j<$list_count; $j++) { ?>
    <?php
          //유튜브 ID 설정
        $youtube_url = $list[$j]['wr_link1'];
        $youtube_id = str_replace('http://youtu.be/','',$youtube_url);
        $youtube_id = str_replace('https://youtu.be/','',$youtube_id);
        $thumb = get_list_thumbnail($bo_table, $list[$j]['wr_id'], $thumb_width, $thumb_height, false, true);
             if ($youtube_id) {
            $img = "https://img.youtube.com/vi/".$youtube_id."/hqdefault.jpg";
        } 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>";
            ?>
            
            <!--레이어-->
                <div id="popup_<?=$j?>">
                    
                    <div class="guide">
                        <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><br><br>
                            <?=$list[$j]['wr_content'];?>
                            
                            <br>
                            
                            <?php
                                $wri = $list[$j]['wr_id'];                            
                                $ref_table = $bo_table;
                                $ref_id = $wri;
                                                
                                 include G5_PLUGIN_PATH.'/tl_star/star.php';
                            ?>
   
                            
                        </div>
                        
                        

                    </div>
                    <div class="bg"></div>
                </div>
                <!--//레이어-->
                
                
<script>
$(document).ready(function(){
    $("#pop_<?=$j?>").click(function()
      {
        $("#popup_<?=$j?>").show();
      });
    $(".close").click(function()
      {
        $("#popup_<?=$j?>").hide();
      });
});
</script>

        </li>
        
        <?php } ?>

    <?php if ($list_count == 0) { //게시물이 없을 때  ?>
    <li class="empty_li">게시물이 없습니다.</li>
    <?php }  ?>
                
            </ul>

 

ref_id와 ref_table에 들어가는 값들도 다 충족되어 아래 이미지처럼 잘 들어가있는 상태입니다....

3543063980_1626929888.6899.png

 

각각 게시물마다 해당 테이블과 wr_id에 맞춰 벨류값이 각각 잘 들어가있는 상태입니다.

이 질문에 댓글 쓰기 :

답변 1

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

회원로그인

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