최신글 스킨은 스킨별로 .css 한번만 로딩하도록 수정
This commit is contained in:
@ -5,6 +5,7 @@ if (!defined('_GNUBOARD_')) exit;
|
|||||||
function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40)
|
function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40)
|
||||||
{
|
{
|
||||||
global $g4;
|
global $g4;
|
||||||
|
static $css = array();
|
||||||
|
|
||||||
if (!$skin_dir) $skin_dir = 'basic';
|
if (!$skin_dir) $skin_dir = 'basic';
|
||||||
|
|
||||||
@ -38,6 +39,12 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40)
|
|||||||
|
|
||||||
include_once($cache_file);
|
include_once($cache_file);
|
||||||
|
|
||||||
|
// 같은 스킨은 .css 를 한번만 호출한다.
|
||||||
|
if (!in_array($skin_dir, $css)) {
|
||||||
|
echo '<link rel="stylesheet" href="'.$latest_skin_url.'/style.css">';
|
||||||
|
$css[] = $skin_dir;
|
||||||
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
include $latest_skin_path.'/latest.skin.php';
|
include $latest_skin_path.'/latest.skin.php';
|
||||||
$content = ob_get_contents();
|
$content = ob_get_contents();
|
||||||
|
|||||||
@ -2,8 +2,6 @@
|
|||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<link rel="stylesheet" href="<?=$latest_skin_url?>/style.css">
|
|
||||||
|
|
||||||
<div class="lt">
|
<div class="lt">
|
||||||
<strong class="lt_title"><a href="<?=G4_BBS_URL?>/board.php?bo_table=<?=$bo_table?>"><?=$bo_subject?></a></strong>
|
<strong class="lt_title"><a href="<?=G4_BBS_URL?>/board.php?bo_table=<?=$bo_table?>"><?=$bo_subject?></a></strong>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user