diff --git a/adm/contentform.php b/adm/contentform.php index 8f00030ff..a20bf373e 100644 --- a/adm/contentform.php +++ b/adm/contentform.php @@ -19,6 +19,20 @@ if(!sql_query(" select co_tag_filter_use from {$g5['content_table']} limit 1 ", sql_query(" update {$g5['content_table']} set co_tag_filter_use = '1' "); } +// 모바일 내용 추가 +if(!sql_query(" select co_mobile_content from {$g5['content_table']} limit 1", false)) { + sql_query(" ALTER TABLE `{$g5['content_table']}` + ADD `co_mobile_content` longtext NOT NULL AFTER `co_content` ", true); +} + +// 스킨 설정 추가 +if(!sql_query(" select co_skin from {$g5['content_table']} limit 1 ", false)) { + sql_query(" ALTER TABLE `{$g5['content_table']}` + ADD `co_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_mobile_content`, + ADD `co_mobile_skin` varchar(255) NOT NULL DEFAULT '' AFTER `co_skin` ", true); + sql_query(" update {$g5['content_table']} set co_skin = 'basic', co_mobile_skin = 'basic' "); +} + $html_title = "내용"; $g5['title'] = $html_title.' 관리'; @@ -36,6 +50,8 @@ else { $html_title .= ' 입력'; $co['co_html'] = 2; + $co['co_skin'] = 'basic'; + $co['co_mobile_skin'] = 'basic'; } include_once (G5_ADMIN_PATH.'/admin.head.php'); @@ -69,6 +85,22 @@ include_once (G5_ADMIN_PATH.'/admin.head.php');
'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.
'; +} + if ($co['co_include_tail']) @include_once($co['co_include_tail']); else diff --git a/css/default.css b/css/default.css index a90193c32..9a9e4288c 100644 --- a/css/default.css +++ b/css/default.css @@ -252,13 +252,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .new_win .win_btn a {display:inline-block;padding:0 10px;height:30px;background:#4b545e;color:#fff;vertical-align:middle;line-height:2.4em} .new_win .win_btn a:focus, .new_win .win_btn a:hover {text-decoration:none} -/* 내용관리 */ -#ctt {margin:10px 0;padding:10px;border:1px solid #e9e9e9} -.ctt_admin {text-align:right} -#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} -#ctt_con {padding:10px 0} -.ctt_img {text-align:center} - /* 검색결과 색상 */ .sch_word {color:#ff3061} diff --git a/css/mobile.css b/css/mobile.css index 9d2b3328a..feb6f507f 100644 --- a/css/mobile.css +++ b/css/mobile.css @@ -225,13 +225,6 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} .new_win .win_btn button {display:inline-block;padding:0 10px;height:2.5em;border:0;background:#666;color:#fff;text-decoration:none;line-height:2.5em} .new_win .win_btn input {padding:0 10px;height:2.5em;line-height:2.5em} -/* 내용관리 */ -#ctt {margin:10px 0;padding:10px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9} -.ctt_admin {margin:0 5px;text-align:right} -#ctt header h1 {position:absolute;font-size:0;line-height:0;overflow:hidden} -#ctt_con {padding:10px 0} -.ctt_img {text-align:center} - /* 검색결과 색상 */ .sch_word {color:#ff3061} diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql index 5c1a5a2bb..731e6f53b 100644 --- a/install/gnuboard5.sql +++ b/install/gnuboard5.sql @@ -781,6 +781,9 @@ CREATE TABLE IF NOT EXISTS `g5_content` ( `co_html` tinyint(4) NOT NULL DEFAULT '0', `co_subject` varchar(255) NOT NULL DEFAULT '', `co_content` longtext NOT NULL, + `co_mobile_content` longtext NOT NULL, + `co_skin` varchar(255) NOT NULL DEFAULT '', + `co_mobile_skin` varchar(255) NOT NULL DEFAULT '', `co_tag_filter_use` tinyint(4) NOT NULL DEFAULT '0', `co_hit` int(11) NOT NULL DEFAULT '0', `co_include_head` varchar(255) NOT NULL, diff --git a/mobile/content.php b/mobile/content.php index 4ca181961..c789834b8 100644 --- a/mobile/content.php +++ b/mobile/content.php @@ -10,13 +10,13 @@ if (!$co['co_id']) $g5['title'] = $co['co_subject']; include_once('./_head.php'); -$str = conv_content($co['co_content'], $co['co_html'], $co['co_tag_filter_use']); +$co_content = $co['co_mobile_content'] ? $co['co_mobile_content'] : $co['co_content']; +$str = conv_content($co_content, $co['co_html'], $co['co_tag_filter_use']); // $src 를 $dst 로 변환 unset($src); unset($dst); $src[] = "/{{쇼핑몰명}}|{{홈페이지제목}}/"; -//$dst[] = $default[de_subject]; $dst[] = $config['cf_title']; $src[] = "/{{회사명}}|{{상호}}/"; $dst[] = $default['de_admin_company_name']; @@ -44,21 +44,20 @@ $src[] = "/{{정보관리책임자e-mail}}|{{정보책임자e-mail}}/i"; $dst[] = $default['de_admin_info_email']; $str = preg_replace($src, $dst, $str); -?> - -'.str_replace(G5_PATH.'/', '', $skin_file).'이 존재하지 않습니다.
'; +} - diff --git a/mobile/skin/content/basic/content.skin.php b/mobile/skin/content/basic/content.skin.php new file mode 100644 index 000000000..79d47d932 --- /dev/null +++ b/mobile/skin/content/basic/content.skin.php @@ -0,0 +1,18 @@ +', 0); + +?> + +