인덱스 최근글 문의 정보
인덱스 최근글 문의본문
index.php 를 수정중입니다
기존소스에다가 게시판아이디만 수정했는데 현재 스샷을 보시면 게시판이 3개가 출력이 됩니다
1개만 출력하게 하려면 어떻게 수정해야하는지 문의 드립니다
index.php소스
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head.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", custom1 , 10, 70);
echo "<p>\n";
}
?>
</td>
<td>
</td>
</tr>
</table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./_tail.php");
?>
기존소스에다가 게시판아이디만 수정했는데 현재 스샷을 보시면 게시판이 3개가 출력이 됩니다
1개만 출력하게 하려면 어떻게 수정해야하는지 문의 드립니다
index.php소스
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4['title'] = "";
include_once("./_head.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", custom1 , 10, 70);
echo "<p>\n";
}
?>
</td>
<td>
</td>
</tr>
</table>
<!-- 메인화면 최신글 끝 -->
<?
include_once("./_tail.php");
?>
댓글 전체
<?
// 최신글
$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", custom1 , 10, 70);
echo "<p>\n";
}
?>
이부분을 업애시고요
<?
echo latest("basic", custom1 , 10, 70);
?>
이렇게만 하시면 됩니다.
// 최신글
$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", custom1 , 10, 70);
echo "<p>\n";
}
?>
이부분을 업애시고요
<?
echo latest("basic", custom1 , 10, 70);
?>
이렇게만 하시면 됩니다.
해결되었습니다