제로보드와 그누보드 최신게시물을요. 정보
제로보드와 그누보드 최신게시물을요.
관련링크
본문
한페이지에서
제로보드 최근 게시물과 그누보드 최신게시물을 함께 사용하려고 하는데요.
자꾸 에러가 나네요. ㅎㅎ
최고로 꼭데기에
그누보드 최신게시물 뽑아오는 문구 써줫구요.
그 다음으로 제로보드 게시물 뽑아오는 문구를 써줫습니다.
제로보드를 그누보드로 바꾸고 싶지만... 그럴 상황이 아니라... 컨버터 하지 못하구 있어서.
같이 좋은 점만? 따다가 사요하려구 합니다.
도움주시면 정말 감사하겠습니다.
<?
include_once("./_common.php");
include_once("$g4[path]/lib/outlogin.lib.php"); // outlogin() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.
include_once("$g4[path]/lib/latest.lib.php"); // latest() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.
?>
<?
$_zb_url = "http://도메인.co.kr/bbs/";
$_zb_path = "/home/hosting_users/아이디/www/bbs/";
include $_zb_path."outlogin.php";
include $_zb_path."lat_bbs_thgallery/thumb_gallery.php";
require_once $_zb_path."_head.php";
require_once $_zb_path."gallery_thumbnail.php";
?>
제로보드 최근 게시물과 그누보드 최신게시물을 함께 사용하려고 하는데요.
자꾸 에러가 나네요. ㅎㅎ
최고로 꼭데기에
그누보드 최신게시물 뽑아오는 문구 써줫구요.
그 다음으로 제로보드 게시물 뽑아오는 문구를 써줫습니다.
제로보드를 그누보드로 바꾸고 싶지만... 그럴 상황이 아니라... 컨버터 하지 못하구 있어서.
같이 좋은 점만? 따다가 사요하려구 합니다.
도움주시면 정말 감사하겠습니다.
<?
include_once("./_common.php");
include_once("$g4[path]/lib/outlogin.lib.php"); // outlogin() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.
include_once("$g4[path]/lib/latest.lib.php"); // latest() 함수를 사용하여야 하므로 이 프로그램을 포함시킵니다.
?>
<?
$_zb_url = "http://도메인.co.kr/bbs/";
$_zb_path = "/home/hosting_users/아이디/www/bbs/";
include $_zb_path."outlogin.php";
include $_zb_path."lat_bbs_thgallery/thumb_gallery.php";
require_once $_zb_path."_head.php";
require_once $_zb_path."gallery_thumbnail.php";
?>
댓글 전체
그누보드에서 최신글 추출 부분입니다.--------------------------------------------------------------------------------------
latest.lib.php에서 이 부분을 복사해서 넣으시면 됩니다.
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
출력을 할때는 -------------------------------------------------------------------------------------------------------------------
index.php에서
<? echo latest("basic", "free_board", 3, 10);
echo "<p>\n";
echo latest("basic", "to_board", 3, 10);
?>
latest(스킨, 게시판아이디, 출력라인, 글자수); 이런식으로 사용하시면 됩니다.
제로보드는 써보지 않아서 잘 모르겠네요,,>ㅁ<;;;
도움이 되셨는지 모르겠습니다.
좋은 하루 보내세요^^
latest.lib.php에서 이 부분을 복사해서 넣으시면 됩니다.
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest($skin_dir="", $bo_table, $rows=10, $subject_len=40, $options="")
{
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_id desc limit 0, $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
출력을 할때는 -------------------------------------------------------------------------------------------------------------------
index.php에서
<? echo latest("basic", "free_board", 3, 10);
echo "<p>\n";
echo latest("basic", "to_board", 3, 10);
?>
latest(스킨, 게시판아이디, 출력라인, 글자수); 이런식으로 사용하시면 됩니다.
제로보드는 써보지 않아서 잘 모르겠네요,,>ㅁ<;;;
도움이 되셨는지 모르겠습니다.
좋은 하루 보내세요^^
두개를 같이 인쿠르드를 같이 하면 에러가 나요. ㅠㅠ
^^