<?
$g4_path = "./gnuboard4";
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "재목없음";
include_once("./heade.php");
?>
<!-- 메인화면 최신글 시작 -->
</td>
<td width="340" height="204"></td>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where bo_table = '$bo_table'";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("jepae", $row['$bo_table'], 1, 40, "4,25");
echo "<p>\n";
}
?>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./taile.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 ";
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
//explain($sql);
$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;
}
?>
$g4_path = "./gnuboard4";
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "재목없음";
include_once("./heade.php");
?>
<!-- 메인화면 최신글 시작 -->
</td>
<td width="340" height="204"></td>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where bo_table = '$bo_table'";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("jepae", $row['$bo_table'], 1, 40, "4,25");
echo "<p>\n";
}
?>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./taile.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 ";
// 위의 코드 보다 속도가 빠름
$sql = " select * from $tmp_write_table where wr_is_comment = 0 order by wr_num limit 0, $rows ";
//explain($sql);
$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;
}
?>
댓글 4개
일단 $sql = " select bo_table, bo_subject from $g4[board_table] where bo_table = '$bo_table'";
아래에 echo "sql : ".$sql."<br>";
이라고 해보세요. $bo_table 값이 들어 있는지부터 확인해 보셔야 하겠습니다.
위에 작성하신 소스로만 보면 원 소스에서 필요하신 부분만 두고 지우신 듯 한데..
where 구문으로 bo_table 을 지정하셨다면 for 문으로 돌릴 필요없이 하나의 레코드만 나올텐데요.
아래에 echo "sql : ".$sql."<br>";
이라고 해보세요. $bo_table 값이 들어 있는지부터 확인해 보셔야 하겠습니다.
위에 작성하신 소스로만 보면 원 소스에서 필요하신 부분만 두고 지우신 듯 한데..
where 구문으로 bo_table 을 지정하셨다면 for 문으로 돌릴 필요없이 하나의 레코드만 나올텐데요.
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기