최근게시물 질문입니다!! 정보
최근게시물 질문입니다!!본문
그누초짜입니다. 꾸벅(__)
다름이 아니라 head.php와 tail.php를 무시하고 그냥 index.htm파일을 자체적으로 만들어서
최근게시물을 불러오려고 합니다. 제로보드를 사용하는 거 처럼요.
상단에 불러와야 되는 소스가 head.php와 index.php에 어떤 소스를 가져와서 사용해야 하는지
좀 알려주시면 감사드리겠습니다~ㅠ_ㅠ
댓글 전체

index.php (확장자를 html -> php로)
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("$g4[path]/head.sub.php");
?>
<!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding=0 cellspacing=0><tr><td valign=top>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 12, 70);
echo "<p>\n";
}
?>
</td></tr></table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./tail.sub.php");
?>
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("$g4[path]/head.sub.php");
?>
<!-- 메인화면 최신글 시작 -->
<table width="100%" cellpadding=0 cellspacing=0><tr><td valign=top>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 12, 70);
echo "<p>\n";
}
?>
</td></tr></table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./tail.sub.php");
?>
말씀하신데로 작성을 해서 보니
select * from g4_write_ where wr_is_comment = 0 order by wr_num limit 0, 5
1146 : Table 'silfnia.g4_write_' doesn't exist
error file : /index.php
이런 오류 메세지가 뜹니다;
http://www.kbfsports.com
홈페이지 주소입니다.ㅠ_ㅠ
도와주세요~
select * from g4_write_ where wr_is_comment = 0 order by wr_num limit 0, 5
1146 : Table 'silfnia.g4_write_' doesn't exist
error file : /index.php
이런 오류 메세지가 뜹니다;
http://www.kbfsports.com
홈페이지 주소입니다.ㅠ_ㅠ
도와주세요~

// latest(스킨, 게시판아이디, 출력라인, 글자수);
echo latest("basic", $row['bo_table'], 12, 70);
게시판 생성하고
최신글 지정해야 최신글이 출력됩니다.
위 소스 사용시 전체 최신글이 모두 자동으로 출력됩니다.
개별로 출력하려면
<?
....
?>
위 꺽쇠부분 지우고
<?=latest('latest_skin','board', 4, 30); // 최신글스킨명 게시판명 라인줄수 제목글자수길이?>
echo latest("basic", $row['bo_table'], 12, 70);
게시판 생성하고
최신글 지정해야 최신글이 출력됩니다.
위 소스 사용시 전체 최신글이 모두 자동으로 출력됩니다.
개별로 출력하려면
<?
....
?>
위 꺽쇠부분 지우고
<?=latest('latest_skin','board', 4, 30); // 최신글스킨명 게시판명 라인줄수 제목글자수길이?>
게시판은 생성되었습니다;;
http://www.kbfsports.com/bbs/board.php?bo_table=notice
공지사항게시판이구요
echo latest("basic", $row['notice'], 12, 70);
로 입력했으나 같은 메세지가 나옵니다;;
그러나!
echo latest("basic", $row['bo_table'], 12, 70);
이렇게 입력하니 모든 게시판의 최근게시물이 생성되는군요;;;
제가 잘못 입력한건가요-0-?
http://www.kbfsports.com/bbs/board.php?bo_table=notice
공지사항게시판이구요
echo latest("basic", $row['notice'], 12, 70);
로 입력했으나 같은 메세지가 나옵니다;;
그러나!
echo latest("basic", $row['bo_table'], 12, 70);
이렇게 입력하니 모든 게시판의 최근게시물이 생성되는군요;;;
제가 잘못 입력한건가요-0-?

개별로 출력하려면
<?
....
?>
위 꺽쇠부분 지우고
<?=latest('basic','notice', 12, 70); // 최신글스킨명 게시판명 라인줄수 제목글자수길이?>
<?
....
?>
위 꺽쇠부분 지우고
<?=latest('basic','notice', 12, 70); // 최신글스킨명 게시판명 라인줄수 제목글자수길이?>
감사합니다!! 해결했습니다!!