제로보드에서 사용하던 것을 그누보드에서 사용할 수 있을까요? > 그누4 질문답변

그누4 질문답변

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

제로보드에서 사용하던 것을 그누보드에서 사용할 수 있을까요? 정보

제로보드에서 사용하던 것을 그누보드에서 사용할 수 있을까요?

본문

제로보드에서 최근 게시물을 이미지, 제목, 내용을 뽑아서 슬라이드로 보여주는 것인데 그누보드에서 사용하려면 어느곳을 수정해야 합니까?

그누보드가 처음이라  그러니 누가 간단하게 설명 좀 부탁드립니다.

<script Language="javascript">
var msgs = new Array();
var chkOver = true;

var step = 1; // 간격 조정
var layerHeight = 100; // 레이어 높이
var interval = 1; // 간격 조정(속도)

<?
$_zb_url = "http://홈주소/bbs/";
$_zb_path = "/제로보드경로/bbs/";
include $_zb_path."outlogin.php";

$howmany = 5; //추출 게시물 숫자
$bid = test; //게시판 이름

$result = mysql_query("select * from zetyx_board_$bid where headnum >-2000000000 order by no desc limit $howmany", $connect) or die(mysql_error());
$i = 0;
while($i < $howmany) {
        $data=mysql_fetch_array($result);
        $data[subject] = cut_str($data[subject], 20); //제목글자 20자로 자르기
                $subject = strip_tags(stripslashes($data[subject]));
                $name =  $data[name];
                $data[memo] = cut_str($data[memo], 180); //내용글자 180자로 자르기
                $memo = strip_tags(stripslashes($data[memo]));
                $filename = $data[file_name1];
                $reg_date = date("m/d",$data[reg_date]);

        if($data[file_name1]) {
                echo "msgs[$i]=\"<div id='msg_$i' style='position:absolute; z-index:2;cursor:hand;'><table width='450' border='0' cellspacing='0' cellpadding='0' height='100'><tr><td width='100' valign=top><img src=../bbs/".$filename." width='100' height='100' border='0'></td><td width='343' valign='top' style='padding-left:5px;'><a href=".$_zb_url."view.php?id=$bid&no=".$data[no]."><b>".$subject."</b></a> <font color=#c0c0c0>+ ".$name." (".$reg_date.")</font><br>".$memo."</td></tr></table></div>\"";
        } else {
                 echo "msgs[$i]=\"<div id='msg_$i' style='position:absolute; z-index:2;cursor:hand;'><table width='450' border='0' cellspacing='0' cellpadding='0' height='100'><tr><td width='450' valign='top'><a href=".$_zb_url."view.php?id=$bid&no=".$data[no]."><b>".$subject."</b></a> <font color=#c0c0c0>+ ".$name." (".$reg_date.")</font><br>".$memo."</td></tr></table></div>\"";
                }
                
                if($i < $howmany) echo "\r\n";
        $i++;
}
?>


function stopLayer()
{
        chkOver = false;
}

function startLayer()
{
        chkOver=true;
        moveLayer()
}

function initMsg()
{
        for (i=0;i < msgs.length;i++)
        {
                document.all['outerLayer'].innerHTML += msgs[i];
                Obj = eval("document.all['msg_"+i+"']");
                Obj.style.top = i * layerHeight;
        }
        moveLayer();
}
function moveLayer()
{
        for (i=0;i < msgs.length;i++)
        {
                Obj = eval("document.all['msg_"+i+"']");
                Obj.style.top = Obj.style.top.substr(0,Obj.style.top.length - 2) - step;
                if (Obj.style.top.substr(0,Obj.style.top.length - 2) == -layerHeight) Obj.style.top = (msgs.length - 1) * layerHeight;
                if(Obj.style.top == '0px')
                        {
                                stopLayer();
                                setTimeout("startLayer()", 2000) ;
                        }
        }
        if (chkOver) setTimeout("moveLayer()",interval);
}
</script>

<body bgcolor="#ffffff" text="#666666" Onload="initMsg()">
<table width="450" border="0" cellspacing="0" cellpadding="0" height="100">
  <tr>
        <td align="left" valign="top">
          <div id="outerLayer" style="position:absolute; width:100%; height:100; z-index:1; clip: rect(0 450 100 0);padding:0px"></div>
      </td>
    </tr>
  </table>
</body>
</html>
  • 복사

댓글 전체

© SIRSOFT
현재 페이지 제일 처음으로