유

최신사진에서 코멘트 안나오게 어떻게 하나요? 갤러리 최신게시판

아래의 소스
에서 코멘트는 사진이 없는데요. 메인 화면에 배곱 모양으로 코멘트를 가져 오더라구요
 
그래서 코멘트는 가져 오지 않는 방법을 알려주세요
latest.skin.php 입니다.
 
급해요....^^
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script language="javascript">
    var roll_height_s = 145;
    var total_area_s = 0;
    var wait_flag_s = true;
    var bMouseOver_s = 1;
    var roll_speed_s = 1;
    var waitingtime_s = 3000; //스피드
    var s_tmp_s = 0;
    var s_amount_s = 145;
    var roll_text_s = new Array();
    var startPanel_s = 0;
    var n_panel_s = 0;
    var i_s = 0;
    function start_roll_s()
    {
        i_s = 0;
        for (i_s in roll_text_s)
            n_panel_s++;
        n_panel_s = n_panel_s -1 ;
        startPanel_s = Math.round(Math.random()*n_panel_s);
        if(startPanel_s == 0)
        {
            i_s = 0;
            for (i_s in roll_text_s)
                insert_area_s(total_area_s, total_area_s++); // area 삽입
        }
        else if(startPanel_s == n_panel_s)
        {
            insert_area_s(startPanel_s, total_area_s);
            total_area_s++;
            for (i_s=0; i_s<startPanel_s; i_s++)
            {
                insert_area_s(i_s, total_area_s); // area 삽입
                total_area_s++;
            }
        }
        else if((startPanel_s > 0) || (startPanel_s < n_panel_s))
        {
            insert_area_s(startPanel_s, total_area_s);
            total_area_s++;
            for (i_s=startPanel_s+1; i_s<=n_panel_s; i_s++)
            {
                insert_area_s(i_s, total_area_s); // area 삽입
                total_area_s++;
            }
            for (i_s=0; i_s<startPanel_s; i_s++)
            {
                insert_area_s(i_s, total_area_s); // area 삽입
                total_area_s++;
            }
       }
        if ( navigator.appName == "Microsoft Internet Explorer" )
        {
            if ( navigator.appVersion.indexOf ( "MSIE 4" ) > -1 )
            return ;
        }
        window.setTimeout("rolling_s()",waitingtime_s);
    }
    function rolling_s()
    {
        if (bMouseOver_s && wait_flag_s)
        {
            for (i_s=0;i_s<total_area_s;i_s++){
                tmp_s = document.getElementById('scroll_area_s'+i_s).style;
                tmp_s.top = parseInt(tmp_s.top)-roll_speed_s;
                if (parseInt(tmp_s.top) <= -roll_height_s){
                    tmp_s.top = roll_height_s*(total_area_s-1);
                }
                if (s_tmp_s++ > (s_amount_s-1)*roll_text_s.length){
                    wait_flag_s=false;
                    window.setTimeout("wait_flag_s=true;s_tmp_s=0;",waitingtime_s);
                }
            }
        }
        window.setTimeout("rolling_s()", 1);
    }
    function insert_area_s(idx_s, n_s)
    {
        document.write('<div style="left: 0px; width: 100%; position: absolute; top: '+(roll_height_s*n_s)+'px" id="scroll_area_s'+n_s+'">\n'+roll_text_s[idx_s]+'\n</div>\n');
    }
<?
$java_script = "";
for ($i=0; $i<count($list); $i++) {
$image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
$ooo='<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td width=100%><table width=100%  cellpadding=0 cellspacing=0 border=0><tr><td width=50%  align=left><a href='.$list[$i][href].'><img src=\"'."$g4[path]/data/file/$bo_table/$image".'\" width=\"163\" height=\"100\" border=0 align=left></a></td></tr></table></td></tr><tr><td><table border=0 width=100% cellpadding=0 cellspacing=0><tr><td width=100% height=5></td> </tr><tr><td width=100% align=left><img src='.$latest_skin_path.'/img/notice_icon2.gif'.' align=absmiddle><span style="font-size:9pt;">제품가격</span></font> : <font color=#1A50B8><span style="font-size:9pt;">'.$list[$i][subject].'</span></font><BR><img src='.$latest_skin_path.'/img/notice_icon2.gif'.' align=absmiddle></td></tr><tr><td width=100% height=5></td></tr></table></td></tr></table>';
$java_script .= "roll_text_s[$i]='$ooo'\n";
}
echo $java_script;
?>
</script>
<span style="font-size:9pt;"><table width='110' border='0' cellspacing='0' cellpadding='0'>
<table width='110' border='0' cellspacing='0' cellpadding='0'>
              <tr>
                <td>
        <table width=10 align="right" border=0>
         <tr>
    <td width="10"></td><td width="50"><div style="center: 0px; position: relative; top: 0px; height: 120px; overflow:hidden; left: 0px; width: 150;" onmouseover="bMouseOver_s=0" onmouseout="bMouseOver_s=1" id="scroll_image_s">
      <script>
        var no_script_flag_s = false ;
        if ( navigator.appName == "Microsoft Internet Explorer" )
        {
            if ( navigator.appVersion.indexOf ( "MSIE 4" ) > -1 )
            {
                document.write ( roll_text_s[0] ) ;
                no_script_flag_s = true ;
            }
        }
        if ( no_script_flag_s == false )
            start_roll_s();
    </script>
    </div>
 </td>
    <td> </td>
         </tr>
</table>
</table></span>
|

댓글 1개

이것은 root님의 팁입니다.
응용 가능할지 모르겠군요.^^
http://www.sir.co.kr/bbs/tb.php/g4_skin/2385

for ($i=0; $i<count($list); $i++) {
if($list[$i][wr_comment] <= 0) { // 코멘트가 아닌것만 출력해라 // 만약 코멘트인것만 출력하고자 할경우 위의 부등호를 ">" 로 바꾸시면 됩니다.
댓글을 작성하시려면 로그인이 필요합니다.

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
06-07-10 조회 1,298
06-07-10 조회 1,492
06-07-10 조회 1,530
06-07-10 조회 1,289
06-07-10 조회 1,604
06-07-10 조회 1,652
06-07-10 조회 1,631
06-07-10 조회 1,638
06-07-10 조회 1,107
06-07-10 조회 1,707
06-07-09 조회 1,658
06-07-09 조회 5,252
06-07-09 조회 1,260
06-07-09 조회 1,255
06-07-09 조회 1,096
06-07-09 조회 1,057
06-07-09 조회 1,252
06-07-09 조회 1,636
06-07-09 조회 1,590
06-07-09 조회 1,574