[초보]원하는 그룹 id 별로 최신글 자동으로 추출하기
<?
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "";
include_once("./_head.php");
$list_mod = 2; // 한라인에 몇개씩 출력할것인지?
?>
<table width="100%" cellpadding=0 cellspacing=0><tr>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '그룹아이디' order by bo_table "; //그룹 id 설정
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
// tr 바꾸기
if (($i > 0) && ($i % $list_mod == 0))
echo "</tr><tr>";
echo "
<td width=50% valign=top>
<table width=98% cellpadding=0 cellspacing=0 align=center>
<tr>
<td colspan=2>";
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
// 스킨은 입력하지 않을 경우 운영자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
echo latest("basic", $row[bo_table], 5, 50);
echo "</td></tr></table></td>";
}
if ($i > 0 && ($i % $list_mod == 1))
echo "<td width=50% valign=top> </td>";
?>
</td></tr></table>
<?
include_once("./_tail.php");
?>
include_once("./_common.php");
include_once("$g4[path]/lib/latest.lib.php");
$g4[title] = "";
include_once("./_head.php");
$list_mod = 2; // 한라인에 몇개씩 출력할것인지?
?>
<table width="100%" cellpadding=0 cellspacing=0><tr>
<?
// 최신글
$sql = " select bo_table, bo_subject from $g4[board_table] where gr_id = '그룹아이디' order by bo_table "; //그룹 id 설정
$result = sql_query($sql);
for ($i=0; $row=mysql_fetch_array($result); $i++) {
// tr 바꾸기
if (($i > 0) && ($i % $list_mod == 0))
echo "</tr><tr>";
echo "
<td width=50% valign=top>
<table width=98% cellpadding=0 cellspacing=0 align=center>
<tr>
<td colspan=2>";
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.
// 사용방법
// latest(스킨, 게시판아이디, 출력라인, 글자수);
// 스킨은 입력하지 않을 경우 운영자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다.
echo latest("basic", $row[bo_table], 5, 50);
echo "</td></tr></table></td>";
}
if ($i > 0 && ($i % $list_mod == 1))
echo "<td width=50% valign=top> </td>";
?>
</td></tr></table>
<?
include_once("./_tail.php");
?>
댓글 5개
odong0.com
20년 전
중복자료면 코멘트 남겨 주세요. 삭제하겠습니다.
맨위에 gr_id 를 한번 써주고..
$g4[title] = ""; 이곳에 해당 그룹 id 의 그룹 제목을 자동으로 뽑아왔으면 싶은데.. 혹시 아시면 한수 가르침을...
맨위에 gr_id 를 한번 써주고..
$g4[title] = ""; 이곳에 해당 그룹 id 의 그룹 제목을 자동으로 뽑아왔으면 싶은데.. 혹시 아시면 한수 가르침을...
hanpedro
20년 전
휴일에도 열심이시네요 ㅎ
감사하게 쓰겠습니다
감사하게 쓰겠습니다
영자 자료실
20년 전
[초보]원하는 그룹 id 별로 최신글 자동으로 추출하기
<? include_once(\"./_common.php\"); include_once(\"$g4[path]/lib/latest.lib.php\"); $g4[title] = \"\"; include_once(\"./_head.php\"); $list_mod = 2; // 한라인에 몇개씩 출력할것인지? ?> <table width=\"100%\" cellpadding=0 cells…
<? include_once(\"./_common.php\"); include_once(\"$g4[path]/lib/latest.lib.php\"); $g4[title] = \"\"; include_once(\"./_head.php\"); $list_mod = 2; // 한라인에 몇개씩 출력할것인지? ?> <table width=\"100%\" cellpadding=0 cells…
20년 전
좋은 정보 감사합니다~~!
ohora
19년 전
감사합니다.
게시판 목록
그누4 팁자료실
그누보드4와 관련된 팁을 여러분들과 함께 공유하세요.
나누면 즐거움이 커집니다.
나누면 즐거움이 커집니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 3289 | 9년 전 | 4818 | ||
| 3288 | 9년 전 | 5803 | ||
| 3287 |
|
9년 전 | 3507 | |
| 3286 |
또치하우스
|
9년 전 | 12303 | |
| 3285 | 9년 전 | 11505 | ||
| 3284 |
다람쥐7마리
|
10년 전 | 4682 | |
| 3283 |
블랙초콜렛더블샷
|
10년 전 | 5974 | |
| 3282 |
또치하우스
|
10년 전 | 10272 | |
| 3281 | 10년 전 | 9789 | ||
| 3280 | 10년 전 | 4994 | ||
| 3279 | 10년 전 | 4274 | ||
| 3278 | 10년 전 | 5359 | ||
| 3277 |
|
10년 전 | 5268 | |
| 3276 | 10년 전 | 5781 | ||
| 3275 | 10년 전 | 4352 | ||
| 3274 | 10년 전 | 5594 | ||
| 3273 | 10년 전 | 6909 | ||
| 3272 | 10년 전 | 7223 | ||
| 3271 | 10년 전 | 4936 | ||
| 3270 |
|
10년 전 | 5406 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기