★지블로그 불당버전을 사용하는데요...블러그최신글을 블러그메인이 아닌
홈페이지 메인에도 올릴수 있게 할 수 없는지요...
홈메인에 신규글..신규블로그등 블러그메인에 있는 것처럼 할수잇게 도움부탁드립니다.
5000포인트 걸겟습니다
홈메인에 신규글..신규블로그등 블러그메인에 있는 것처럼 할수잇게 도움부탁드립니다.
5000포인트 걸겟습니다
댓글 4개
15년 전
불당님께서 최신글 형태로 블로그 포스팅 보기라는 제목으로 그누4 환경에서 지블로그 포스팅을 볼 수 있게 만든 소스인데요 사용법은 최신글과 같은 스킨도 최신글 스킨 쓰면 됩니다라고 하시네요 ^^
소스는 아래와 같구요...
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest_gblog($skin_dir="", $mb_id="", $rows=10, $subject_len=40, $gallery_view=0, $options="")
{
global $g4;
include_once("$g4[path]/blog/gblog.config.php");
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
if ($mb_id) {
$sql = " select id from $gb4[blog_table] where mb_id = '$mb_id' ";
$result1 = sql_fetch($sql);
$where_sql = " where id = $result1[id] ";
} else {
$where_sql = " ";
}
$sql = " select * from $gb4[post_table] $where_sql order by id desc limit $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
if ($mb_id) {
$list[$i][bo_name] = $result1[blog_name];
$blog_id = $mb_id;
} else {
$result2 = sql_fetch(" select * from $gb4[blog_table] where id = '$row[blog_id]' ");
$list[$i][bo_name] = $result2[blog_name];
$blog_id = $result2[mb_id];
}
$list[$i][subject] = conv_subject($row[title], $subject_len, "…");
$list[$i][datetime] = substr($row[post_date],0,10);
if ($row[comment_count] > 0)
$list[$i][comment_cnt] = "($row[comment_count])";
// 비밀글
if ($row[secret]==0)
$list[$i][icon_secret] = "<img src='$skin_path/img/icon_secret.gif' align='absmiddle'>";
$list[$i][href] = "$gb4[path]/?mb_id=$blog_id&id=$row[id]";
}
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
더 자세한 질문은 이 곳에 직접하시면 확실할겁니다 ㅎㅎ
http://opencode.co.kr/bbs/board.php?bo_table=gblog&wr_id=76
소스는 아래와 같구요...
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest_gblog($skin_dir="", $mb_id="", $rows=10, $subject_len=40, $gallery_view=0, $options="")
{
global $g4;
include_once("$g4[path]/blog/gblog.config.php");
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
if ($mb_id) {
$sql = " select id from $gb4[blog_table] where mb_id = '$mb_id' ";
$result1 = sql_fetch($sql);
$where_sql = " where id = $result1[id] ";
} else {
$where_sql = " ";
}
$sql = " select * from $gb4[post_table] $where_sql order by id desc limit $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
if ($mb_id) {
$list[$i][bo_name] = $result1[blog_name];
$blog_id = $mb_id;
} else {
$result2 = sql_fetch(" select * from $gb4[blog_table] where id = '$row[blog_id]' ");
$list[$i][bo_name] = $result2[blog_name];
$blog_id = $result2[mb_id];
}
$list[$i][subject] = conv_subject($row[title], $subject_len, "…");
$list[$i][datetime] = substr($row[post_date],0,10);
if ($row[comment_count] > 0)
$list[$i][comment_cnt] = "($row[comment_count])";
// 비밀글
if ($row[secret]==0)
$list[$i][icon_secret] = "<img src='$skin_path/img/icon_secret.gif' align='absmiddle'>";
$list[$i][href] = "$gb4[path]/?mb_id=$blog_id&id=$row[id]";
}
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
더 자세한 질문은 이 곳에 직접하시면 확실할겁니다 ㅎㅎ
http://opencode.co.kr/bbs/board.php?bo_table=gblog&wr_id=76
해피투게더
15년 전
네..불당님께서도 최신글 방식이라고하는데...인클루드한 다음 해당함수를 불러오라는데 그게 어케불러오는건지...
lib파일을 blog안에잇는 lib폴더가 아닌 상위폴더 lib에 집어넣고 메인 인덱스에 들어갈 자리에
<? echo latest_gblog("basic", "블로그최근게시물","5", "$dv_id", ""); ?>게 불러와도 안되고
<? include_once("$g4[path]/blog/gblog.new_post.php");?>불러와도 안되고...
에거 답답해 죽겟습니다..어케해야 하는건지...이것땜시 홈페이지 진도가 꽉막혀버렷네요...
지블로그를 포기할까도 생각중입니다..
어케해야하나요
lib파일을 blog안에잇는 lib폴더가 아닌 상위폴더 lib에 집어넣고 메인 인덱스에 들어갈 자리에
<? echo latest_gblog("basic", "블로그최근게시물","5", "$dv_id", ""); ?>게 불러와도 안되고
<? include_once("$g4[path]/blog/gblog.new_post.php");?>불러와도 안되고...
에거 답답해 죽겟습니다..어케해야 하는건지...이것땜시 홈페이지 진도가 꽉막혀버렷네요...
지블로그를 포기할까도 생각중입니다..
어케해야하나요
15년 전
어려워요
15년 전
불당님께서 최신글 형태로 블로그 포스팅 보기라는 제목으로 그누4 환경에서 지블로그 포스팅을 볼 수 있게 만든 소스인데요 사용법은 최신글과 같은 스킨도 최신글 스킨 쓰면 됩니다라고 하시네요 ^^
소스는 아래와 같구요...
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest_gblog($skin_dir="", $mb_id="", $rows=10, $subject_len=40, $gallery_view=0, $options="")
{
global $g4;
include_once("$g4[path]/blog/gblog.config.php");
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
if ($mb_id) {
$sql = " select id from $gb4[blog_table] where mb_id = '$mb_id' ";
$result1 = sql_fetch($sql);
$where_sql = " where id = $result1[id] ";
} else {
$where_sql = " ";
}
$sql = " select * from $gb4[post_table] $where_sql order by id desc limit $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
if ($mb_id) {
$list[$i][bo_name] = $result1[blog_name];
$blog_id = $mb_id;
} else {
$result2 = sql_fetch(" select * from $gb4[blog_table] where id = '$row[blog_id]' ");
$list[$i][bo_name] = $result2[blog_name];
$blog_id = $result2[mb_id];
}
$list[$i][subject] = conv_subject($row[title], $subject_len, "…");
$list[$i][datetime] = substr($row[post_date],0,10);
if ($row[comment_count] > 0)
$list[$i][comment_cnt] = "($row[comment_count])";
// 비밀글
if ($row[secret]==0)
$list[$i][icon_secret] = "<img src='$skin_path/img/icon_secret.gif' align='absmiddle'>";
$list[$i][href] = "$gb4[path]/?mb_id=$blog_id&id=$row[id]";
}
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
더 자세한 질문은 이 곳에 직접하시면 확실할겁니다 ㅎㅎ
http://opencode.co.kr/bbs/board.php?bo_table=gblog&wr_id=76
불당님께서 최신글 형태로 블로그 포스팅 보기라는 제목으로 그누4 환경에서 지블로그 포스팅을 볼 수 있게 만든 소스인데요 사용법은 최신글과 같은 스킨도 최신글 스킨 쓰면 됩니다라고 하시네요 ^^
소스는 아래와 같구요...
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest_gblog($skin_dir="", $mb_id="", $rows=10, $subject_len=40, $gallery_view=0, $options="")
{
global $g4;
include_once("$g4[path]/blog/gblog.config.php");
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
if ($mb_id) {
$sql = " select id from $gb4[blog_table] where mb_id = '$mb_id' ";
$result1 = sql_fetch($sql);
$where_sql = " where id = $result1[id] ";
} else {
$where_sql = " ";
}
$sql = " select * from $gb4[post_table] $where_sql order by id desc limit $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
if ($mb_id) {
$list[$i][bo_name] = $result1[blog_name];
$blog_id = $mb_id;
} else {
$result2 = sql_fetch(" select * from $gb4[blog_table] where id = '$row[blog_id]' ");
$list[$i][bo_name] = $result2[blog_name];
$blog_id = $result2[mb_id];
}
$list[$i][subject] = conv_subject($row[title], $subject_len, "…");
$list[$i][datetime] = substr($row[post_date],0,10);
if ($row[comment_count] > 0)
$list[$i][comment_cnt] = "($row[comment_count])";
// 비밀글
if ($row[secret]==0)
$list[$i][icon_secret] = "<img src='$skin_path/img/icon_secret.gif' align='absmiddle'>";
$list[$i][href] = "$gb4[path]/?mb_id=$blog_id&id=$row[id]";
}
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
더 자세한 질문은 이 곳에 직접하시면 확실할겁니다 ㅎㅎ
http://opencode.co.kr/bbs/board.php?bo_table=gblog&wr_id=76
소스는 아래와 같구요...
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest_gblog($skin_dir="", $mb_id="", $rows=10, $subject_len=40, $gallery_view=0, $options="")
{
global $g4;
include_once("$g4[path]/blog/gblog.config.php");
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
if ($mb_id) {
$sql = " select id from $gb4[blog_table] where mb_id = '$mb_id' ";
$result1 = sql_fetch($sql);
$where_sql = " where id = $result1[id] ";
} else {
$where_sql = " ";
}
$sql = " select * from $gb4[post_table] $where_sql order by id desc limit $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
if ($mb_id) {
$list[$i][bo_name] = $result1[blog_name];
$blog_id = $mb_id;
} else {
$result2 = sql_fetch(" select * from $gb4[blog_table] where id = '$row[blog_id]' ");
$list[$i][bo_name] = $result2[blog_name];
$blog_id = $result2[mb_id];
}
$list[$i][subject] = conv_subject($row[title], $subject_len, "…");
$list[$i][datetime] = substr($row[post_date],0,10);
if ($row[comment_count] > 0)
$list[$i][comment_cnt] = "($row[comment_count])";
// 비밀글
if ($row[secret]==0)
$list[$i][icon_secret] = "<img src='$skin_path/img/icon_secret.gif' align='absmiddle'>";
$list[$i][href] = "$gb4[path]/?mb_id=$blog_id&id=$row[id]";
}
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
더 자세한 질문은 이 곳에 직접하시면 확실할겁니다 ㅎㅎ
http://opencode.co.kr/bbs/board.php?bo_table=gblog&wr_id=76
불당님께서 최신글 형태로 블로그 포스팅 보기라는 제목으로 그누4 환경에서 지블로그 포스팅을 볼 수 있게 만든 소스인데요 사용법은 최신글과 같은 스킨도 최신글 스킨 쓰면 됩니다라고 하시네요 ^^
소스는 아래와 같구요...
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function latest_gblog($skin_dir="", $mb_id="", $rows=10, $subject_len=40, $gallery_view=0, $options="")
{
global $g4;
include_once("$g4[path]/blog/gblog.config.php");
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
$list = array();
if ($mb_id) {
$sql = " select id from $gb4[blog_table] where mb_id = '$mb_id' ";
$result1 = sql_fetch($sql);
$where_sql = " where id = $result1[id] ";
} else {
$where_sql = " ";
}
$sql = " select * from $gb4[post_table] $where_sql order by id desc limit $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
if ($mb_id) {
$list[$i][bo_name] = $result1[blog_name];
$blog_id = $mb_id;
} else {
$result2 = sql_fetch(" select * from $gb4[blog_table] where id = '$row[blog_id]' ");
$list[$i][bo_name] = $result2[blog_name];
$blog_id = $result2[mb_id];
}
$list[$i][subject] = conv_subject($row[title], $subject_len, "…");
$list[$i][datetime] = substr($row[post_date],0,10);
if ($row[comment_count] > 0)
$list[$i][comment_cnt] = "($row[comment_count])";
// 비밀글
if ($row[secret]==0)
$list[$i][icon_secret] = "<img src='$skin_path/img/icon_secret.gif' align='absmiddle'>";
$list[$i][href] = "$gb4[path]/?mb_id=$blog_id&id=$row[id]";
}
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
더 자세한 질문은 이 곳에 직접하시면 확실할겁니다 ㅎㅎ
http://opencode.co.kr/bbs/board.php?bo_table=gblog&wr_id=76
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기