게시판 설정에 모바일관련 설정 추가
This commit is contained in:
@ -1,21 +1,25 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*
|
||||
// 게시판 관리의 상단 파일 경로
|
||||
if ($board['bo_include_head']) {
|
||||
@include ($board['bo_include_head']);
|
||||
@include ($board['bo_include_head']);
|
||||
}
|
||||
|
||||
// 게시판 관리의 상단 이미지 경로
|
||||
if ($board['bo_image_head']) {
|
||||
echo '<img src="'.G4_DATA_PATH.'/file/'.$bo_table.'/'.$board['bo_image_head'].'">';
|
||||
}
|
||||
*/
|
||||
|
||||
// 게시판 관리의 상단 내용
|
||||
if (G4_IS_MOBILE) {
|
||||
// 모바일의 경우 설정을 따르지 않는다.
|
||||
include_once('./_head.php');
|
||||
} else if ($board['bo_content_head']) {
|
||||
echo stripslashes($board['bo_content_head']);
|
||||
echo stripslashes($board['bo_mobile_content_head']);
|
||||
} else {
|
||||
@include ($board['bo_include_head']);
|
||||
echo stripslashes($board['bo_content_head']);
|
||||
}
|
||||
?>
|
||||
@ -1,21 +1,25 @@
|
||||
<?
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*
|
||||
// 게시판 관리의 하단 내용
|
||||
if ($board['bo_content_tail']) {
|
||||
echo stripslashes($board['bo_content_tail']);
|
||||
echo stripslashes($board['bo_content_tail']);
|
||||
}
|
||||
|
||||
// 게시판 관리의 하단 이미지 경로
|
||||
if ($board['bo_image_tail']) {
|
||||
echo '<img src="'.G4_DATA_PATH.'/file/'.$bo_table.'/'.$board['bo_image_tail'].'">';
|
||||
}
|
||||
*/
|
||||
|
||||
// 게시판 관리의 하단 파일 경로
|
||||
if (G4_IS_MOBILE) {
|
||||
echo stripslashes($board['bo_mobile_content_tail']);
|
||||
// 모바일의 경우 설정을 따르지 않는다.
|
||||
include_once('./_tail.php');
|
||||
} else if ($board['bo_include_tail']) {
|
||||
@include ($board['bo_include_tail']);
|
||||
echo stripslashes($board['bo_content_tail']);
|
||||
@include ($board['bo_include_tail']);
|
||||
}
|
||||
?>
|
||||
20
bbs/list.php
20
bbs/list.php
@ -52,9 +52,15 @@ if ($sca || $stx) {
|
||||
$total_count = $board['bo_count_write'];
|
||||
}
|
||||
|
||||
$total_page = ceil($total_count / $board['bo_page_rows']); // 전체 페이지 계산
|
||||
if(G4_IS_MOBILE) {
|
||||
$page_rows = $board['bo_mobile_page_rows'];
|
||||
} else {
|
||||
$page_rows = $board['bo_page_rows'];
|
||||
}
|
||||
|
||||
$total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
|
||||
if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
|
||||
$from_record = ($page - 1) * $board['bo_page_rows']; // 시작 열을 구함
|
||||
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함
|
||||
|
||||
// 관리자라면 CheckBox 보임
|
||||
$is_checkbox = false;
|
||||
@ -90,9 +96,9 @@ if ($sst) {
|
||||
}
|
||||
|
||||
if ($sca || $stx) {
|
||||
$sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, {$board['bo_page_rows']} ";
|
||||
$sql = " select distinct wr_parent from {$write_table} where {$sql_search} {$sql_order} limit {$from_record}, $page_rows ";
|
||||
} else {
|
||||
$sql = " select * from {$write_table} where wr_is_comment = 0 {$sql_order} limit {$from_record}, {$board['bo_page_rows']} ";
|
||||
$sql = " select * from {$write_table} where wr_is_comment = 0 {$sql_order} limit {$from_record}, $page_rows ";
|
||||
}
|
||||
$result = sql_query($sql);
|
||||
|
||||
@ -111,7 +117,7 @@ if (!$sca && !$stx) {
|
||||
|
||||
if (!$row['wr_id']) continue;
|
||||
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, $board['bo_subject_len']);
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, G4_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
|
||||
$list[$i]['is_notice'] = true;
|
||||
|
||||
$i++;
|
||||
@ -126,12 +132,12 @@ while ($row = sql_fetch_array($result))
|
||||
if ($sca || $stx)
|
||||
$row = sql_fetch(" select * from {$write_table} where wr_id = '{$row['wr_parent']}' ");
|
||||
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, $board['bo_subject_len']);
|
||||
$list[$i] = get_list($row, $board, $board_skin_url, G4_IS_MOBILE ? $board['bo_mobile_subject_len'] : $board['bo_subject_len']);
|
||||
if (strstr($sfl, 'subject')) {
|
||||
$list[$i]['subject'] = search_font($stx, $list[$i]['subject']);
|
||||
}
|
||||
$list[$i]['is_notice'] = false;
|
||||
$list[$i]['num'] = $total_count - ($page - 1) * $board['bo_page_rows'] - $k;
|
||||
$list[$i]['num'] = $total_count - ($page - 1) * $page_rows - $k;
|
||||
|
||||
$i++;
|
||||
$k++;
|
||||
|
||||
Reference in New Issue
Block a user