프

블로그 최신게시물을 스킨화 하기.

· 2007-05-13 (일) 02:11:03 · 4344
< 있는지 모르고 만들었습니다. >
 
1. 블로그의 최신게시물을 넣고 싶은곳에  아래 코드를..
 
 
        <!------------------블로그 최신글-------->
        <?
        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");
    if ($skin_dir)
        $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);
    ob_start();
    include "$latest_skin_path/latest.skin.php";
    $content = ob_get_contents();
    ob_end_clean();
    return $content;
}
 
?>
 
 
 
3. 스킨을 다운받으셔서 아래의 경로에 올려놓으세요.
 
g4/skin/blog_latest/basic
 
 
 
이상입니다.

첨부파일

blog_latest.zip (21.4 KB) 52회 2007-05-13 02:11
gblog_cf.extend.php (832 bytes) 26회 2007-05-13 02:34
|
댓글을 작성하시려면 로그인이 필요합니다.

팁

69건
+
제목 글쓴이 날짜 조회
08-01-10 조회 2,665
07-12-05 조회 3,544
07-11-03 조회 3,510
07-09-26 조회 4,374
07-09-11 조회 3,281
07-08-03 조회 4,417
07-06-26 조회 4.2만
07-06-01 조회 5,922
07-05-24 조회 5,178
07-05-13 조회 4,345
07-04-29 조회 7,520
07-04-27 조회 5,393
07-04-10 조회 4,328
07-04-08 조회 4,118
07-03-23 조회 3,981
07-03-18 조회 5,952
07-03-15 조회 3,627
07-02-18 조회 3,324
07-02-10 조회 4,379
07-02-09 조회 1.3만