아래 소스에 페이징 소스를 추가하고 싶습니다.
latest.skin.php파일에는
<div id="pagingNew"><?=$write_pages?></div>페이징소스 삽입
불러올 위치에서는 아래 소스로 불러옵니다.
<?
include_once("$g4[path]/skin/latest/GSG.GALLERY/inc_lib.php");
echo latest_cate("blog", "IDEA", 3, 20, "카테고리");
?>
=======================================
여기에 페이징 기능을 삽입하고 싶습니다.
<?
if (!defined('_GNUBOARD_')) exit;
function latest_cate($skin_dir="", $bo_table, $rows=10, $subject_len=40, $ca_name="")
{
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; // 게시판 테이블 전체이름
if ($ca_name)
$sql = " select * from $tmp_write_table where ca_name = '$ca_name' and wr_is_comment = 0 order by wr_num limit 0, $rows ";
else
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num 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;
}
?>
latest.skin.php파일에는
<div id="pagingNew"><?=$write_pages?></div>페이징소스 삽입
불러올 위치에서는 아래 소스로 불러옵니다.
<?
include_once("$g4[path]/skin/latest/GSG.GALLERY/inc_lib.php");
echo latest_cate("blog", "IDEA", 3, 20, "카테고리");
?>
=======================================
여기에 페이징 기능을 삽입하고 싶습니다.
<?
if (!defined('_GNUBOARD_')) exit;
function latest_cate($skin_dir="", $bo_table, $rows=10, $subject_len=40, $ca_name="")
{
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; // 게시판 테이블 전체이름
if ($ca_name)
$sql = " select * from $tmp_write_table where ca_name = '$ca_name' and wr_is_comment = 0 order by wr_num limit 0, $rows ";
else
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num 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;
}
?>
댓글 1개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기