From 0a64d941e687d41ce757c2cba168ba0e0b878b47 Mon Sep 17 00:00:00 2001 From: whitedot Date: Thu, 24 Jan 2013 16:38:56 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90:=20=EC=9D=B8?= =?UTF-8?q?=EB=8D=B1=EC=8A=A4=20=EC=B5=9C=EC=8B=A0=EA=B8=80=20=EC=99=84?= =?UTF-8?q?=EB=A3=8C=20#173?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/latest.lib.php | 6 +----- main.php | 19 ++++++++++++++----- skin/latest/neo/latest.skin.php | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/latest.lib.php b/lib/latest.lib.php index d1facaa4f..4692f4f66 100644 --- a/lib/latest.lib.php +++ b/lib/latest.lib.php @@ -2,13 +2,9 @@ if (!defined('_GNUBOARD_')) exit; // 최신글 추출 -function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40, $position='left') +function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40) { global $g4; - static $lt_count=0; - - if ($position == 'right') - $lt_count++; if (!$skin_dir) $skin_dir = 'basic'; $latest_skin_path = skin_path().'/latest/'.$skin_dir; diff --git a/main.php b/main.php index d375e19ec..194ce613d 100644 --- a/main.php +++ b/main.php @@ -12,12 +12,21 @@ include_once('./_head.php'); $sql = " select bo_table from {$g4['board_table']} order by gr_id, bo_table "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { - // 이 함수가 바로 최신글을 추출하는 역할을 합니다. - // 스킨은 입력하지 않을 경우 관리자 > 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다. + $lt_style = ""; + if ($i%2==1) $lt_style = "margin-left:20px"; + else $lt_style = ""; +?> +
+ 환경설정의 최신글 스킨경로를 기본 스킨으로 합니다. - // 사용방법 - // latest(스킨, 게시판아이디, 출력라인, 글자수); - echo latest("neo", $row['bo_table'], 5, 25, 'right'); + // 사용방법 + // latest(스킨, 게시판아이디, 출력라인, 글자수); + echo latest("neo", $row['bo_table'], 5, 25); + ?> +
+ diff --git a/skin/latest/neo/latest.skin.php b/skin/latest/neo/latest.skin.php index 77754f150..b99af123b 100644 --- a/skin/latest/neo/latest.skin.php +++ b/skin/latest/neo/latest.skin.php @@ -2,7 +2,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> -
+