처음으로 올려봅니다 ^^;;
스킨개념은 아니지만 최근글로 활용도가 있을듯하네요
그누를 간만에 만져보는거라 맞는지 모르겠네요. 돌아가긴 하던데,, ^^;;
미리보기는 같은 소스로 제로보드와 연동한 페이지로 대신합니다
그누가 설치된 곳이 로컬이라,, ^^
테스트를 익스6과 파폭 2버젼에서 했습니다
http://poshopzil.com/zb_test_bbs/roll_notice3.php
이하 소스입니다. 그럼 수고하세요~
<?
// 본인에 맞게 수정하세요
$_gnu_url = "http://".$_SERVER['HTTP_HOST']."/gnuboard4";
$g4_path = $_SERVER['DOCUMENT_ROOT']."/gnuboard4";
include_once("$g4_path/common.php");
$aj_bdid = "test_bd1"; // 게시판 아이디
$aj_con = "7"; // 몇개를 뽑을래
// 본인에 맞게 수정하세요 끝
$auc_result=mysql_query("select * from g4_write_$aj_bdid where wr_is_comment='0' and wr_option!='secret' order by wr_id desc limit $aj_con"); // 답변글이 아니고 비밀글이 아닌 것만
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css" media="all">
#rollDiv {width:200px; margin:0;}
#rollDiv ul{padding:0; margin:0; list-style-type:none; font-family:'돋움'; letter-spacing:-1px;}
#rollDiv_li_t{font:bold 12px '돋움'; color:#39c; border-bottom:2px solid #39c; padding:3px 0;}
.rollDiv_li_list{background-color:#fff; font-size:11px; color:#777; border-bottom:1px solid #eee; padding:0;}
.num_one{display:none; background-color:#f5f5f5; margin:0; padding:0; line-height:160%; overflow:hidden;}
.num_one div{padding:0; padding:5px;}
.num_two{margin:0; padding:5px 0; text-indent:5px;}
.num_two em {background-color:#edf1fa; font-size:11px; font-family:'돋움'; font-style:normal; color:#649CA6; padding:2px 5px 0 3px; border: 1px solid #ccdaee;}
</style>
</head>
<body>
<div id="rollDiv" onmouseover="rolling_song_stop();" onmouseout="go_rolling_song();">
<ul id="rollDiv_ul">
<li id="rollDiv_li_t" style="cursor:pointer;" onclick="location.href='<?=$g4[url]?>/<?=$g4[bbs]?>/board.php?bo_table=<?=$aj_bdid?>';" title="더 보기">
자유게시판
</li>
<?
$j = '1';
while($auc_data=mysql_fetch_array($auc_result)) {
$auc_no = $auc_data[wr_id];
$auc_data[wr_subject] = trim(strip_tags(stripslashes($auc_data[wr_subject])));
$auc_data[wr_content] = trim(strip_tags(stripslashes($auc_data[wr_content])));
$auc_subject=cut_str($auc_data[wr_subject], 28, ''); // 제목 자르고
$auc_memo=cut_str($auc_data[wr_content], 80, ''); // 내용 자르고
?>
<li class="rollDiv_li_list">
<div id="song_rank_<?=$j?>_h" onmouseover="song_rank_list_layer(<?=$j?>); rolling_song_stop();" class="num_two">
<em class="em_ss" title="<?=$j?>"><?=$j?></em> <?=$auc_subject?>
</div>
<div id="song_rank_<?=$j?>" class="num_one">
<div>
<?=$auc_memo?>
<span style="font-weight:bold; cursor:pointer;" onclick="location.href='<?=$g4[url]?>/<?=$g4[bbs]?>/board.php?bo_table=<?=$aj_bdid?>&wr_id=<?=$auc_no?>';" title="더 보기">더 보기</span>
<div>
</div>
</li>
<?
$j++;
}// end while
?>
</ul>
</div>
<script type="text/javascript" language="JavaScript">
<!--
var song_rank_list_rolling_num ;
var song_rank_list_rolling_is ;
var song_rank_list_rolling ;
var song_time = 3000; // 로테이션 시간
var song_height = 60; // 펼쳐졌을때 div의 세로 사이즈
var song_totla= <?=$aj_con?>; // total
song_rank_list_rolling_is = true ; // 로테이션 적용 여부 (true/false)
song_rank_list_rolling_num = 1;
function song_rank_list_layer( num ){
song_rank_list_layer_hidden();
document.getElementById("song_rank_"+num).style.display = "block";
document.getElementById("song_rank_"+num).style.height = song_height+"px";
document.getElementById("song_rank_"+num+"_h").style.display = "none";
song_rank_list_rolling_num = num ;
}
function song_rank_list_layer_hidden(){
var i ;
for ( i = 1 ; i < (song_totla+1) ; i++){
document.getElementById("song_rank_"+i+"_h").style.display = "block";
document.getElementById("song_rank_"+i).style.display = "none";
}
}
function rolling_song(){
song_rank_list_rolling_num += 1;
if( song_rank_list_rolling_num > song_totla ){
song_rank_list_rolling_num = 1;
}
song_rank_list_layer(song_rank_list_rolling_num) ;
}
function go_rolling_song(){
if (song_rank_list_rolling_is == true){
song_rank_list_rolling = window.setInterval("rolling_song()", song_time);
}
song_rank_list_rolling_is = false;
}
function rolling_song_stop(){
window.clearInterval(song_rank_list_rolling);
song_rank_list_rolling_is = true;
}
window.onload = function() {
song_rank_list_layer(1); // 1은 초기에 불러올 번호
go_rolling_song();
}
//-->
</script>
</body>
</html>
스킨개념은 아니지만 최근글로 활용도가 있을듯하네요
그누를 간만에 만져보는거라 맞는지 모르겠네요. 돌아가긴 하던데,, ^^;;
미리보기는 같은 소스로 제로보드와 연동한 페이지로 대신합니다
그누가 설치된 곳이 로컬이라,, ^^
테스트를 익스6과 파폭 2버젼에서 했습니다
http://poshopzil.com/zb_test_bbs/roll_notice3.php
이하 소스입니다. 그럼 수고하세요~
<?
// 본인에 맞게 수정하세요
$_gnu_url = "http://".$_SERVER['HTTP_HOST']."/gnuboard4";
$g4_path = $_SERVER['DOCUMENT_ROOT']."/gnuboard4";
include_once("$g4_path/common.php");
$aj_bdid = "test_bd1"; // 게시판 아이디
$aj_con = "7"; // 몇개를 뽑을래
// 본인에 맞게 수정하세요 끝
$auc_result=mysql_query("select * from g4_write_$aj_bdid where wr_is_comment='0' and wr_option!='secret' order by wr_id desc limit $aj_con"); // 답변글이 아니고 비밀글이 아닌 것만
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css" media="all">
#rollDiv {width:200px; margin:0;}
#rollDiv ul{padding:0; margin:0; list-style-type:none; font-family:'돋움'; letter-spacing:-1px;}
#rollDiv_li_t{font:bold 12px '돋움'; color:#39c; border-bottom:2px solid #39c; padding:3px 0;}
.rollDiv_li_list{background-color:#fff; font-size:11px; color:#777; border-bottom:1px solid #eee; padding:0;}
.num_one{display:none; background-color:#f5f5f5; margin:0; padding:0; line-height:160%; overflow:hidden;}
.num_one div{padding:0; padding:5px;}
.num_two{margin:0; padding:5px 0; text-indent:5px;}
.num_two em {background-color:#edf1fa; font-size:11px; font-family:'돋움'; font-style:normal; color:#649CA6; padding:2px 5px 0 3px; border: 1px solid #ccdaee;}
</style>
</head>
<body>
<div id="rollDiv" onmouseover="rolling_song_stop();" onmouseout="go_rolling_song();">
<ul id="rollDiv_ul">
<li id="rollDiv_li_t" style="cursor:pointer;" onclick="location.href='<?=$g4[url]?>/<?=$g4[bbs]?>/board.php?bo_table=<?=$aj_bdid?>';" title="더 보기">
자유게시판
</li>
<?
$j = '1';
while($auc_data=mysql_fetch_array($auc_result)) {
$auc_no = $auc_data[wr_id];
$auc_data[wr_subject] = trim(strip_tags(stripslashes($auc_data[wr_subject])));
$auc_data[wr_content] = trim(strip_tags(stripslashes($auc_data[wr_content])));
$auc_subject=cut_str($auc_data[wr_subject], 28, ''); // 제목 자르고
$auc_memo=cut_str($auc_data[wr_content], 80, ''); // 내용 자르고
?>
<li class="rollDiv_li_list">
<div id="song_rank_<?=$j?>_h" onmouseover="song_rank_list_layer(<?=$j?>); rolling_song_stop();" class="num_two">
<em class="em_ss" title="<?=$j?>"><?=$j?></em> <?=$auc_subject?>
</div>
<div id="song_rank_<?=$j?>" class="num_one">
<div>
<?=$auc_memo?>
<span style="font-weight:bold; cursor:pointer;" onclick="location.href='<?=$g4[url]?>/<?=$g4[bbs]?>/board.php?bo_table=<?=$aj_bdid?>&wr_id=<?=$auc_no?>';" title="더 보기">더 보기</span>
<div>
</div>
</li>
<?
$j++;
}// end while
?>
</ul>
</div>
<script type="text/javascript" language="JavaScript">
<!--
var song_rank_list_rolling_num ;
var song_rank_list_rolling_is ;
var song_rank_list_rolling ;
var song_time = 3000; // 로테이션 시간
var song_height = 60; // 펼쳐졌을때 div의 세로 사이즈
var song_totla= <?=$aj_con?>; // total
song_rank_list_rolling_is = true ; // 로테이션 적용 여부 (true/false)
song_rank_list_rolling_num = 1;
function song_rank_list_layer( num ){
song_rank_list_layer_hidden();
document.getElementById("song_rank_"+num).style.display = "block";
document.getElementById("song_rank_"+num).style.height = song_height+"px";
document.getElementById("song_rank_"+num+"_h").style.display = "none";
song_rank_list_rolling_num = num ;
}
function song_rank_list_layer_hidden(){
var i ;
for ( i = 1 ; i < (song_totla+1) ; i++){
document.getElementById("song_rank_"+i+"_h").style.display = "block";
document.getElementById("song_rank_"+i).style.display = "none";
}
}
function rolling_song(){
song_rank_list_rolling_num += 1;
if( song_rank_list_rolling_num > song_totla ){
song_rank_list_rolling_num = 1;
}
song_rank_list_layer(song_rank_list_rolling_num) ;
}
function go_rolling_song(){
if (song_rank_list_rolling_is == true){
song_rank_list_rolling = window.setInterval("rolling_song()", song_time);
}
song_rank_list_rolling_is = false;
}
function rolling_song_stop(){
window.clearInterval(song_rank_list_rolling);
song_rank_list_rolling_is = true;
}
window.onload = function() {
song_rank_list_layer(1); // 1은 초기에 불러올 번호
go_rolling_song();
}
//-->
</script>
</body>
</html>
첨부파일
|
댓글을 작성하시려면 로그인이 필요합니다.
댓글 51개
우왕~굿
익스8에서도 잘 보임@
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/hosting_users/celper/www/kornu/freeboard.php on line 43
아님 참고설명된곳이라도 링크좀 부탁합니다.
// 본인에 맞게 수정하세요
$_gnu_url = "http://".$_SERVER['HTTP_HOST']."/gnuboard4";
$g4_path = $_SERVER['DOCUMENT_ROOT']."/gnuboard4";
include_once("$g4_path/common.php");
...
...
// 본인에 맞게 수정하세요 끝
이부분 설명좀 해주실분 없나요??
특히 include_once("$g4_path/common.php"); 에 대한 에러 개념좀 잡아주실분
에러내용 :
Warning: include_once(C:/A_P_M_/APM_Setup/htdocs/gnuboard4/_common.php) [function.include-once]: failed to open stream: No such file or directory in C:\A_P_M_\APM_Setup\htdocs\shop2\index.php on line 15
Warning: include_once() [function.include]: Failed opening 'C:/A_P_M_/APM_Setup/htdocs/gnuboard4/_common.php' for inclusion (include_path='.') in C:\A_P_M_\APM_Setup\htdocs\shop2\index.php on line 15
예를들어 홈페이지 최상위 디렉터리에 g4라는 폴더명으로 그누보드를 설치하셨다면
$g4_path = $_SERVER['DOCUMENT_ROOT']."/g4"; 이렇게 적어주셔도 되고
$g4_path = "/g4"; 라고 적어주셔도 됩니다.
include_once("$g4_path/common.php"); 이 부분은
위에서 작성한 $g4_path(그누보드가 설치된 폴더)안에 있는 common.php 파일을
인클루드해라,, 입니다.
$g4_path의 경로를 제대로 적으셨다면 신경쓰실 부분은 아닙니다
결론은 본인이 설치한 그누보드까지의 경로를 잘 잡아주시면 됩니다.
물론 현제 로테이션도 작동이 되지 않구요.
작업진행사항
bbs >notice.php 으로 업데이트
include_once("./_common.php"); // bbs>new.php 파일에서 경로를 참고함.
$aj_bdid = "A"; // 게시판 아이디
위 사항만 수정하고 업데이트를 하였습니다.
그누보드가 설치된 곳은 index.php파일이 위치한 최상위 위치입니다.
같은 위치에(bbs, adm, skin, lib)에 있는 상태입니다.
http://leecon.nayana.com/bbs/NO.php
$_gnu_url = "http://".$_SERVER['HTTP_HOST']."";
$g4_path = $_SERVER['DOCUMENT_ROOT']."";
include_once("$g4_path/common.php");
문제점은 여전히 내용이 들어오지 않고 로테이션이 작동이 되지 않습니다.
http://www.shotbirdie.com/contents/bbs/board.php?bo_table=B25