내가 쓴 코멘트에 bg색

내가 쓴 코멘트에 bg색

QA

내가 쓴 코멘트에 bg색

본문

 
 
3.jpg
 
 
 
<li <?=$cmt_replay?><? if($list[mb_id]==$member[mb_id]) echo "style='background:#f5f5f5;'";
 
   ?>>
   <div class="cmt_hd">
    <div class="ft_left" ><?
                if($cmt_replay) echo "<img src='$g4[path]/images/icon_reply.png' align='absmiddle'>";
?>
 <span class="c_<?=$list[$i]['wr_id']?>"></span><strong><?=$list[name]?> (<?=$list[mb_id]?>) </strong><?=date("m-d",strtotime($list[wr_datetime]))?> <span>| </span><?=date("H:i",strtotime($list[wr_datetime]))?></div>
     <div class="ft_right"><?=$is_reply?> <?=$is_edit?> <?=$is_del?></div>
   </div>
   <div class="clr line"></div>
           <div class="cmt_centent">
    <?
    if ($list[wr_mobile])
    echo "<img src='{$g4[path]}/images/mobile_c.png' align=top>";  
    if (strstr($list[wr_option], "secret")) echo "<span style='color:#ff6600;'>*</span> ";
                $str = $list[content];
                if (strstr($list[wr_option], "secret"))
                    $str = "<span class='small' style='color:#ff6600;'>$str</span>";
                $str = 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>", $str);
                // FLASH XSS 공격에 의해 주석 처리 - 110406
                //$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
                $str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);' border='0'>", $str);
                echo $str;
    ?>
   </div>
   <? if ($list[trackback]) { echo "<p>".$list[trackback]."</p>"; } ?>
                <span id='edit_<?=$comment_id?>' style='display:none;'></span><!-- 수정 -->
                <span id='reply_<?=$comment_id?>' style='display:none;'></span><!-- 답변 -->
        
                <input type=hidden id='secret_comment_<?=$comment_id?>' value="<?=strstr($list[wr_option],"secret")?>">
                <textarea rows="4" id='save_comment_<?=$comment_id?>' style='display:none;'><?=get_text($list[content1], 0)?></textarea>
   </li>
 
 
컴퓨터상에서는 내가 쓴 댓글마다 색상이 잘 적용되어있는데
 
위 이미지는 pc에서의 캡쳐본 입니다
 
a 회원 댓글 작성 회색배경
 
b 회원이 답댓글 작성 미적용
 
a 회원이 b회원에 답댓글 작성 회색배경...
 
--------------------------------------
 
그런데 휴대폰으로 보면....내가 쓴 댓글 처음만 적용될뿐 답댓글에는 적용이 안되더라구요
 
 
 
 

이 질문에 댓글 쓰기 :

답변 3

그누4라구해서 들어왓는데 5인가 ;;;;;
근데 소스상에 $i 는 다 어디로 갔죠?
이렇게로도 출력에는 이상이 없나요?
아니면 댓글출력 for문을 수정하신건지.....암튼 모르겟네요 ;;;;;;;
 
내가 알고잇는 지식에 살짝 멘붕이 오긴하는데
글구 질문에 이해가 조금 안가지만
 
첫째줄
if($list[mb_id]==$member[mb_id]) 이걸
if($list[$i][mb_id]==$member[mb_id]) // 댓글쓴사람이 현재 보고잇는 회원이라면
이걸로바꿔보세요.
혹시나하는 마음에 다시 댓글 달아요......내가 느끼는게 맞다면
 
<li <?=$cmt_replay?><? if($list[$i][mb_id]==$member[mb_id]) echo "style='background:#f5f5f5;'";
 
   ?>>
   <div class="cmt_hd">
    <div class="ft_left" ><?
                if($cmt_replay) echo "<img src='$g4[path]/images/icon_reply.png' align='absmiddle'>";
?>
 <span class="c_<?=$list[$i]['wr_id']?>"></span><strong><?=$list[$i][name]?> (<?=$list[$i][mb_id]?>) </strong><?=date("m-d",strtotime($list[$i][wr_datetime]))?> <span>| </span><?=date("H:i",strtotime($list[$i][wr_datetime]))?></div>
     <div class="ft_right"><?=$is_reply?> <?=$is_edit?> <?=$is_del?></div>
   </div>
   <div class="clr line"></div>
           <div class="cmt_centent">
    <?
    if ($list[$i][wr_mobile])
    echo "<img src='{$g4[path]}/images/mobile_c.png' align=top>";  
    if (strstr($list[$i][wr_option], "secret")) echo "<span style='color:#ff6600;'>*</span> ";
                $str = $list[$i][content];
                if (strstr($list[$i][wr_option], "secret"))
                    $str = "<span class='small' style='color:#ff6600;'>$str</span>";
                $str = 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>", $str);
                // FLASH XSS 공격에 의해 주석 처리 - 110406
                //$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
                $str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);' border='0'>", $str);
                echo $str;
    ?>
   </div>
   <? if ($list[$i][trackback]) { echo "<p>".$list[$i][trackback]."</p>"; } ?>
                <span id='edit_<?=$comment_id?>' style='display:none;'></span><!-- 수정 -->
                <span id='reply_<?=$comment_id?>' style='display:none;'></span><!-- 답변 -->
        
                <input type=hidden id='secret_comment_<?=$comment_id?>' value="<?=strstr($list[$i][wr_option],"secret")?>">
                <textarea rows="4" id='save_comment_<?=$comment_id?>' style='display:none;'><?=get_text($list[$i][content1], 0)?></textarea>
   </li>
 
빨간코드 추가해서 이렇게 되야 정상같습니다만......아니면 어쩔수 없구요.
구조를 모르니;;;;;;;;

그그글쎄요...

<? if($list[mb_id]==$member[mb_id]) echo "style='background:#f5f5f5;'"; ?>

이 내용은 림스모바일에서 추가적으로 제가 삽입한거라...

쨋든 [$i] 를 기재하면 pc화면 스마트폰 둘다 적용이 안되네요 ㅠㅠ

제가 림스 모바일 다운받아서 확인해봐도 모든 코드에 $i 가 적용된게 맞습니다.
그리고 pc화면상의 그누와 림스 모바일과는 별개입니다. 각각 수정해줘야하는게 맞는걸로 알아요.
혹시 몰라서 제가 확인한 림스 모바일의 코멘트부분입니다.
 
 
<?php
if (!defined("_WZ_MOBILE_")) exit; // 개별 페이지 접근 불가
?>
 
 <?php if ($is_comment_write || $view["wr_comment"] > 0) { ?>
 <div class="commentbox">
  <div class="tabs">
   <a href="#none" style="width:50%;" class="active"><span>댓글 (<?php echo $view["wr_comment"];?>)</span></a>
   <a href="./write.comment.php?bo_table=<?php echo $bo_table;?>&wr_parent=<?php echo $wr_id;?>&w=c&<?php echo $qstr;?>" style="width:50%;"><span>코멘트쓰기</span></a>
  </div>
  <ul id="clist">
   <?php for ($i=0; $i<count($list); $i++) { ?>
   <li>
    <div class="list" style="background-color:#fff;">
     <span class="wcsubject" style='line-height:20px; word-break:break-all; overflow:hidden; clear:both;'>
      <?
      if (strstr($list[$i][wr_option], "secret")) echo "<span style='color:#ff6600;'>*</span> ";
      $str = $list[$i][content];
      if (strstr($list[$i][wr_option], "secret"))
       $str = "<span class='small' style='color:#ff6600;'>$str</span>";
      $str = 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>", $str);
      // FLASH XSS 공격에 의해 주석 처리 - 110406
      //$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(swf)\".*\<\/a\>\]/i", "<script>doc_write(flash_movie('$1://$2.$3'));</script>", $str);
      $str = preg_replace("/\[\<a\s*href\=\"(http|https|ftp)\:\/\/([^[:space:]]+)\.(gif|png|jpg|jpeg|bmp)\"\s*[^\>]*\>[^\s]*\<\/a\>\]/i", "<img src='$1://$2.$3' id='target_resize_image[]' onclick='image_window(this);' border='0'>", $str);
      echo $str;
      ?>
     </span>
     <span class="wcinfo">
      <?=$list[$i][wr_name]?> <span class="vbar">|</span> <?=$list[$i][datetime]?>
     </span>
     
     <div class="cbtn">
      <?php if ($list[$i][is_del]) { ?>
      <div class="btn_recomm">
       <button class="inner" onclick="comment_delete('<?php echo $list[$i][del_link];?>');"><span class="txt">삭제</span></button>
      </div>
      <?php } ?>
     </div>
    </div>
   </li>
   <?php }
   
   if ($i==0) {
       echo "<li style='text-align:center;line-height:40px;height:40px;background-color:#fff;'>등록된 코멘트가 존재하지 않습니다.</li>";
   }
   ?>
  </ul>
 </div>
 <div style="height:10px;"></div> 
 <script type="text/javascript">
 <!--
  function comment_delete(url) {
   if (confirm("이 코멘트를 삭제하시겠습니까?")) location.href = url;
  }
 //-->
 </script>
 <?php } ?>
답변을 작성하시기 전에 로그인 해주세요.
전체 125,873 | RSS
QA 내용 검색

회원로그인

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