undefined 이란 ? > 그누4 질문답변

그누4 질문답변

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

undefined 이란 ? 정보

undefined 이란 ?

본문

안녕하세요
 
현 sir 홈 스크롤 최신글처럼 사이트를 사용하였는데...
 
undefined  멧세지가 스크롤이 됩니다.
 
gallery 게시판에도 가끔씩 그런 현상이 생기는데 왜 일까요 ?
 
 
최신글 스크롤에 보면 undefined  이렇게 뜨면서 이 글자가 스크롤 됩니다.
 
오늘도 행복한 시간이 되세요...
 
scroll 되는 최신글에 모두가 그렇습니다.
 
현재 갤러리와 최신글 - 2개가 모두 undefined가 발생합니다.
 
아시는 분 답변 부탁드립니다.
 
 
  • 복사

댓글 전체

안녕하세요.
rolo님은 제 단골 교수같은 느낌이네요.
감사합니다.

메뉴의 자바를 지우면 원할한데... 자바와 문제인 것 같습니다.
그런데 어디서 부터 해야 하는지를 통 모르겠네요.
자바의 헤드에
stmenu.js를 넣어 주고

나머지 형성된 자바는 menu란 디렉토리에
stdom.js
stmenu.js
stfilter.js
sthilight.js
stie.js
stinit.js
stscroll.js
stslip.js
stwinels.js

라는 파일이 있는데요

여기서 그누보드의 스크롤에

latest.skin.php에 어떤 것과 충돌이 되는 것이 아닌지요.


<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

// 위로 스크롤되는 최신글

// 사용법 :
// 스킨, 게시판아이디, 출력라인, 글자수, "몇개라인,라인높이"
// latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")

// $rows(출력라인)는 $line_mod의 2의 배수 이상으로 설정하셔야 합니다.

// 유니크 값 (최신글은 한페이지에 여러개 둘 수 있으므로... 자바스크립트에서 함수, 변수 충돌을 방지)
$uni = md5(uniqid(rand(), true));

list($line_mod, $height) = explode(",", $options);

$box_height = (int)$line_mod * (int)$height;
?>

<table width=100% cellpadding=0 cellspacing=0 border=0>
<colgroup width=14>
<colgroup>
<colgroup width=37>
<colgroup width=14>
<tr><td>
<table width="300" cellpadding=0 cellspacing=0 bgcolor="#F9FAFF">
<tr>                    <td width="280" height=22>

                        <p align="center"><a href="./bbs/new.php"><b><font color="#339900">'사랑의 불씨' 최근 게시물 내용 보기</font></b></a>
</p>

<td width="5">&nbsp;</td></tr>
<tr><td colspan=2 align=center width="300"><table id=new_all width=98% cellpadding=0 cellspacing=0 bgcolor=#FFFFFF><tr><td style='padding:4px;'>
                <nobr style='display:block; overflow:hidden; width:247;'>


<? if (count($list) == 0) { ?>
    <tr><td colspan=4 align=center height=50>게시물이 없습니다.</td></tr>
<? } else { ?>

    <script language="javascript">
    var roll_height_<?=$uni?> = <?=$box_height?>;
    var total_area_<?=$uni?> = 0;
    var wait_flag_<?=$uni?> = true;

    var bMouseOver_<?=$uni?> = 1;
    var roll_speed_<?=$uni?> = 1;
    var waitingtime_<?=$uni?> = 3000;
    var s_tmp_<?=$uni?> = 0;
    var s_amount_<?=$uni?> = <?=(int)$height?>;
    var roll_text_<?=$uni?> = new Array();
    var startPanel_<?=$uni?> = 0;
    var n_panel_<?=$uni?> = 0;
    var i_<?=$uni?> = 0;

    function start_roll_<?=$uni?>()
    {
        i_<?=$uni?> = 0;
        for (i_<?=$uni?> in roll_text_<?=$uni?>)
            n_panel_<?=$uni?>++;

        n_panel_<?=$uni?> = n_panel_<?=$uni?> -1 ;
        startPanel_<?=$uni?> = Math.round(Math.random()*n_panel_<?=$uni?>);
        if(startPanel_<?=$uni?> == 0) {
            i_<?=$uni?> = 0;
            for (i_<?=$uni?> in roll_text_<?=$uni?>)
                insert_area_<?=$uni?>(total_area_<?=$uni?>, total_area_<?=$uni?>++);
        } else if(startPanel_<?=$uni?> == n_panel_<?=$uni?>) {
            insert_area_<?=$uni?>(startPanel_<?=$uni?>, total_area_<?=$uni?>);
            total_area_<?=$uni?>++;
            for (i_<?=$uni?>=0; i_<?=$uni?><startPanel_<?=$uni?>; i_<?=$uni?>++) {
                insert_area_<?=$uni?>(i_<?=$uni?>, total_area_<?=$uni?>);
                total_area_<?=$uni?>++;
            }
        } else if((startPanel_<?=$uni?> > 0) || (startPanel_<?=$uni?> < n_panel_<?=$uni?>)) {
            insert_area_<?=$uni?>(startPanel_<?=$uni?>, total_area_<?=$uni?>);
            total_area_<?=$uni?>++;
            for (i_<?=$uni?>=startPanel_<?=$uni?>+1; i_<?=$uni?><=n_panel_<?=$uni?>; i_<?=$uni?>++) {
                insert_area_<?=$uni?>(i_<?=$uni?>, total_area_<?=$uni?>);
                total_area_<?=$uni?>++;
            }
            for (i_<?=$uni?>=0; i_<?=$uni?><startPanel_<?=$uni?>; i_<?=$uni?>++) {
                insert_area_<?=$uni?>(i_<?=$uni?>, total_area_<?=$uni?>);
                total_area_<?=$uni?>++;
            }
        }
     
        if ( navigator.appName == "Microsoft Internet Explorer" ) {
            if ( navigator.appVersion.indexOf ( "MSIE 4" ) > -1 )
            return ;
        }
        window.setTimeout("rolling_<?=$uni?>()",waitingtime_<?=$uni?>);
    }

    function rolling_<?=$uni?>()
    {
        if (bMouseOver_<?=$uni?> && wait_flag_<?=$uni?>) {
            for (i_<?=$uni?>=0;i_<?=$uni?><total_area_<?=$uni?>;i_<?=$uni?>++) {
                tmp_<?=$uni?> = document.getElementById('scroll_area_<?=$uni?>'+i_<?=$uni?>).style;
                tmp_<?=$uni?>.top = parseInt(tmp_<?=$uni?>.top)-roll_speed_<?=$uni?>;
               
                if (parseInt(tmp_<?=$uni?>.top) <= -roll_height_<?=$uni?>) {
                    tmp_<?=$uni?>.top = roll_height_<?=$uni?>*(total_area_<?=$uni?>-1);
                }
               
                if (s_tmp_<?=$uni?>++ > (s_amount_<?=$uni?>-1)*roll_text_<?=$uni?>.length) {
                    wait_flag_<?=$uni?>=false;
                    window.setTimeout("wait_flag_<?=$uni?>=true;s_tmp_<?=$uni?>=0;",waitingtime_<?=$uni?>);
                }
            }
        }
        window.setTimeout("rolling_<?=$uni?>()", 1);
    }

    function insert_area_<?=$uni?>(idx_<?=$uni?>, n_<?=$uni?>)
    {
        document.write('<div style="left: 0px; width: 100%; position: absolute; top: '+(roll_height_<?=$uni?>*n_<?=$uni?>)+'px" id="scroll_area_<?=$uni?>'+n_<?=$uni?>+'">\n'+roll_text_<?=$uni?>[idx_<?=$uni?>]+'\n</div>\n');
    }

    <?
    unset($roll_text);
    for ($i=0; $i<count($list); $i++) {
        $href = "<a href='./?doc=$cart_dir/item.php&it_id=$row[it_id]' class=item>";

        $k = (int)($i / $line_mod);

        $roll_text[$k] .= "<div style=\"height:{$height}px; padding-top:5px;\">";
        $roll_text[$k] .= "<a href=\"{$list[$i][href]}\">";
        $roll_text[$k] .= "<img src=\"{$latest_skin_path}/img/latest_icon.gif\" align=absmiddle border=0>&nbsp;&nbsp;";
        $roll_text[$k] .= "[";
        $roll_text[$k] .= $list[$i][gr_subject];
        $roll_text[$k] .= "] ";
        $roll_text[$k] .= $list[$i][wr_subject];
        if ($list[$i][comment_cnt])
            $roll_text[$k] .= " {$list[$i][comment_cnt]}";
        $roll_text[$k] .= "</a>";
        $roll_text[$k] .= "</div>";
    }

    for ($i=0; $i<=$k; $i++) {
        echo "roll_text_{$uni}[$i] = '{$roll_text[$i]}';\n";
    }
    ?>
    </script>

    <div style="left: 0px; width: 100%; position: relative; top: 0px; height: <?=$box_height?>px; overflow:hidden;" onMouseover="bMouseOver_<?=$uni?>=0" onMouseout="bMouseOver_<?=$uni?>=1" id="latest_scroll_<?=$uni?>">
    <script language='javascript'>
    var no_script_flag_<?=$uni?> = false ;
    if ( navigator.appName == "Microsoft Internet Explorer" ) {
        if ( navigator.appVersion.indexOf ( "MSIE 4" ) > -1 ) {
            document.write ( roll_text_<?=$uni?>[0] ) ;
            no_script_flag_<?=$uni?> = true ;
        }
    }
    if ( no_script_flag_<?=$uni?> == false )
        start_roll_<?=$uni?>();
    </script>
    </div>  

<? } ?>

                </nobr></td></tr></table></td></tr>
</table></td>
</tr></table>


한번 부탁드립니다.

너무 갈수록 태산이네요....
오늘도 좋은 시간도세요.
© SIRSOFT
현재 페이지 제일 처음으로