고수분들 좀 도와주세요 ㅠㅠ > 그누4 질문답변

그누4 질문답변

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

고수분들 좀 도와주세요 ㅠㅠ 정보

고수분들 좀 도와주세요 ㅠㅠ

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 : http://xpeedkorea.net/gnuboard4/test.php

위와같은 롤링 게시판 추출 소스를 만들었는데요 ..

롤링되는데 5개정도씩 로드 되는것 같아요

쭈욱 연결 되지않고 주루룩 나왔다가 끊긴다는말이죠 ㅠㅠ

test.php 소스는
--------------------------------------
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php"); // latest() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.

echo latest("mc_scroll", "qna", 10, 10); // basic 스킨으로 free 라는 게시판을 출력합니다.
?>
---------------------------------------

이거고 최근게시물 추출 소스 latest.skin.php 는

---------------------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">

DIV,blockquote {font-size:9pt; font-family:굴림; color:#666666; line-height:170%;}

A:link    {color:666666;text-decoration:none;}
A:visited {color:666666;text-decoration:none;}
A:active  {color:666666;text-decoration:none;}
A:hover  {color:gray;text-decoration:none;}

</style> 
<script language="javascript">
<!--
//Math.random()

    var scrollerheight=100; // 스크롤러의 세로
    var html,total_area=0,wait_flag=true;
   
    var bMouseOver = 1;
    var scrollspeed = 1; // Scrolling 속도
    var waitingtime = 2000; // 멈추는 시간
    var s_tmp = 0, s_amount = 40;
    var scroll_content=new Array();
    var startPanel=0, n_panel=0, i=0;
   
    function startscroll()
    { // 스크롤 시작
        i=0;
        for (i in scroll_content)
            n_panel++;
           
        n_panel = n_panel -1 ;
        startPanel = Math.round(Math.random()*n_panel);
        if(startPanel == 0)
        {
            i=0;
            for (i in scroll_content)
                insert_area(total_area, total_area++);
        }
        else if(startPanel == n_panel)
        {
            insert_area(startPanel, total_area);
            total_area++;
            for (i=0; i<startPanel; i++)
            {
                insert_area(i, total_area);
                total_area++;
            }
        }
        else if((startPanel > 0) || (startPanel < n_panel))
        {
            insert_area(startPanel, total_area);
            total_area++;
            for (i=startPanel+1; i<=n_panel; i++)
            {
                insert_area(i, total_area);
                total_area++;
            }
            for (i=0; i<startPanel; i++)
            {
                insert_area(i, total_area);
                total_area++;
            }
        }
        window.setTimeout("scrolling()",waitingtime);
    }
    function scrolling(){ // 실제로 스크롤 하는 부분
        if (bMouseOver && wait_flag)
        {
            for (i=0;i<total_area;i++){
                tmp = document.getElementById('scroll_area'+i).style;
                tmp.top = parseInt(tmp.top)-scrollspeed;
                if (parseInt(tmp.top) <= -scrollerheight){
                    tmp.top = scrollerheight*(total_area-1);
                }
                if (s_tmp++ > (s_amount-1)*scroll_content.length){
                    wait_flag=false;
                    window.setTimeout("wait_flag=true;s_tmp=0;",waitingtime);
                }
            }
        }
        window.setTimeout("scrolling()",1);
    }
    function insert_area(idx, n){ 
        html='<div style="left: 0px; width: 100%; position: absolute; top: '+(scrollerheight*n)+'px" id="scroll_area'+n+'">\n';
        html+=scroll_content[idx]+'\n';
        html+='</div>\n';
        document.write(html);
    }

    // 스크롤러에 들어갈 내용들을 태그와 함께 넣어 줍니다
<?
       
    //$rows = "10"; // 자료가 숫자보다 작으면 안됩니다. - 숫자변경은 10이상 5의 배수로 하세요
   
    $sql = " select *
              from {$g4[write_prefix]}{$bo_table}
              where wr_comment >= 0
              order by wr_id desc limit 0, $rows ";
$result = sql_query($sql);

$i = 0;$j = 0;

while($row = mysql_fetch_array($result)) {

        $list[i] = $row;
   
        $list[i][subject]=stripslashes(cut_str($row[wr_subject], 34)); //제목 글자수자르기
       
        if($row[wr_datetime] >= date("Y-m-d H:i:s", time() - 24 * 3600)) {//새글표시---제목색상변경
           
                $subject = "<font color=#323434>{$list[i][subject]}</font>"; //새글에 색상/진하게 등등을 적용하시려면 요기에서 하세요
           
                } else {
           
                $subject = $list[i][subject]; //새글이 아닐경우 그냥 나타남
            }
           
        $date1 = substr($list[$i][datetime],0,10); //날짜표시형식변경

        $date = explode("-", $date1);

            $year = $date[0];

            $month = $date[1];

            $day = $date[2];

            $latest_date = $month."월".$day."일";
       
            if($i==0) {
            echo "scroll_content[".$j."]=\"";
        }
        echo "<b>ㆍ</b><font color=#0080C0>[$latest_date]</font><a href='$g4[bbs_path]/board.php?bo_table=$board[bo_table]&wr_id=$row[wr_id]'>&nbsp;{$subject}</a><br>";
        $i++;
        if($i==5) {
            echo "\";\n\t";
            $i = 0; $j++;
        }
    }
    ?>

//-->
</script>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
    <tr>
        <td width="100%">
            <table border="0" cellpadding="0" cellspacing="0" width="100%" height="53">
                <tr>
                 
                    <td width="330" valign=top><div style="position: absolute; width: 330px; height: 500px; overflow:hidden;" onMouseover="bMouseOver=0" onMouseout="bMouseOver=1" id="scroll_image">
                    <script>
                    startscroll();
                    </script>
                    </div>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
--------------------------------------------------------------

이상입니다.

그리고 하나더 덧붙이자면 이글을 링크가 일반인들은 안되게 그냥 텍스트로만 출력하고 싶은데요 어떻게 방법이 없을지...ㅜㅜ

문제1 : 롤링이 툭툭 끊긴다-여백없이 연속된 롤링을 보여주고 싶어요 ㅠㅠ

문제2 : 최근게시물이라 방문자가 클릭이 가능하다-클릭하면 로그인창이 나오게 게시판 등급조정은 하고 있으나 아예 방문자는 클릭 자체가 안되도록 하고 싶어요 ㅠㅠ

이 두가지를 해결해 주시는 당신은 완전 멋쟁이!!

꼭 좀 부탁드립니다..
잠도못자고 매달려서 죽겠어요 ㅠㅠ

댓글 전체

전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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