head.sub.php 파일 등을 사용자가 설정할 수 있도록 상수 추가

This commit is contained in:
chicpro
2015-01-23 09:48:36 +09:00
parent de00ac1622
commit aa86158caf
3 changed files with 20 additions and 0 deletions

8
extend/user.config.php Normal file
View File

@ -0,0 +1,8 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// head.sub.php, tail.sub.php 파일의 이름을 지정할 수 있습니다.
// 지정된 파일은 head.sub.php, tail.sub.php 파일과 동일한 위치에 존재해야 합니다.
//define('G5_HEAD_SUB_FILE', 'user.head.sub.php');
//define('G5_TAIL_SUB_FILE', 'user.tail.sub.php');
?>

View File

@ -4,6 +4,12 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$begin_time = get_microtime(); $begin_time = get_microtime();
// 사용자가 지정한 head.sub.php 파일이 있다면 include
if(defined('G5_HEAD_SUB_FILE') && is_file(G5_PATH.'/'.G5_HEAD_SUB_FILE)) {
include_once(G5_PATH.'/'.G5_HEAD_SUB_FILE);
return;
}
if (!isset($g5['title'])) { if (!isset($g5['title'])) {
$g5['title'] = $config['cf_title']; $g5['title'] = $config['cf_title'];
$g5_head_title = $g5['title']; $g5_head_title = $g5['title'];

View File

@ -1,5 +1,11 @@
<?php <?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 사용자가 지정한 tail.sub.php 파일이 있다면 include
if(defined('G5_TAIL_SUB_FILE') && is_file(G5_PATH.'/'.G5_TAIL_SUB_FILE)) {
include_once(G5_PATH.'/'.G5_TAIL_SUB_FILE);
return;
}
?> ?>
<?php if ($is_admin == 'super') { ?><!-- <div style='float:left; text-align:center;'>RUN TIME : <?php echo get_microtime()-$begin_time; ?><br></div> --><?php } ?> <?php if ($is_admin == 'super') { ?><!-- <div style='float:left; text-align:center;'>RUN TIME : <?php echo get_microtime()-$begin_time; ?><br></div> --><?php } ?>