블로그 최신게시물을 스킨화 하기. 정보
블로그 최신게시물을 스킨화 하기.첨부파일
본문
< 있는지 모르고 만들었습니다. >
1. 블로그의 최신게시물을 넣고 싶은곳에 아래 코드를..
<!------------------블로그 최신글-------->
<?
echo latest_blog("basic", "블로그최근게시물","5", "$dv_id", "");
?>
<!-----------------//블로그 최신글---->
<?
echo latest_blog("basic", "블로그최근게시물","5", "$dv_id", "");
?>
<!-----------------//블로그 최신글---->
2. expand 에 아래를 넣어 놓으세요.
<?
// 블로그 최신글 축출
function latest_blog($skin_dir="", $blog_subjec ="", $blog_row, $options="", $options2="")
{
global $current, $gb4, $config, $member, $g4, $urlencode, $is_admin;
include_once("$g4[path]/lib/blog.lib.php");
function latest_blog($skin_dir="", $blog_subjec ="", $blog_row, $options="", $options2="")
{
global $current, $gb4, $config, $member, $g4, $urlencode, $is_admin;
include_once("$g4[path]/lib/blog.lib.php");
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/blog_latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/blog_latest/basic";
$latest_skin_path = "$g4[path]/skin/blog_latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/blog_latest/basic";
//
$dv_id = $options;
if ($dv_id)
$sql_dv_id = " and division_id='$dv_id' ";
$sql = " select * from {$gb4['post_table']} where secret=1 $sql_dv_id order by id desc limit 15 ";
$result = sql_query($sql);
$dv_id = $options;
if ($dv_id)
$sql_dv_id = " and division_id='$dv_id' ";
$sql = " select * from {$gb4['post_table']} where secret=1 $sql_dv_id order by id desc limit 15 ";
$result = sql_query($sql);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
$content = ob_get_contents();
ob_end_clean();
return $content;
}
}
?>
3. 스킨을 다운받으셔서 아래의 경로에 올려놓으세요.
g4/skin/blog_latest/basic
이상입니다.
댓글 전체