자료첨부합니다..도와주세욤..ㅠ.ㅠ최근게시물이 왜안나올까요?? 정보
자료첨부합니다..도와주세욤..ㅠ.ㅠ최근게시물이 왜안나올까요??본문
<?
$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;
}
?>
댓글 전체
참고로 where bo_table = '$bo_table'"; 처음했던 order by gr_id, bo_table ";
적용해도 안되네요.ㅠ..ㅠ
적용해도 안되네요.ㅠ..ㅠ
소스상에 include_once("./heade.php"); 에서 head.php 파일이 아닐런지요?
그리고 어디까지는 되는데 어디부분 부터 제대로 안나오는 등의 확인이 필요합니다.
echo "1";
등으로 소스상에서 한줄 한줄 확인해 보세요
그리고 어디까지는 되는데 어디부분 부터 제대로 안나오는 등의 확인이 필요합니다.
echo "1";
등으로 소스상에서 한줄 한줄 확인해 보세요
echo"1"확인은 어떻게 하나요.?????
일단 $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 문으로 돌릴 필요없이 하나의 레코드만 나올텐데요.