From 2e8e1bc41ccfc48f4187a67d0ea0e19ec4c46a1a Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 22 Apr 2013 14:13:04 +0900 Subject: [PATCH 1/3] =?UTF-8?q?tail.sub.php=20=EC=9D=98=20=EB=A9=94?= =?UTF-8?q?=EB=89=B4=20=EC=9E=90=EB=B0=94=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=EB=A5=BC=20=EB=B3=84=EB=8F=84=EC=9D=98=20=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=EB=A1=9C=20=EB=B6=84=EB=A6=AC=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/jquery.menu.js | 106 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 js/jquery.menu.js diff --git a/js/jquery.menu.js b/js/jquery.menu.js new file mode 100644 index 000000000..8eeea4201 --- /dev/null +++ b/js/jquery.menu.js @@ -0,0 +1,106 @@ +$(function(){ + var hide_menu = false; + var mouse_event = false; + var oldX = oldY = 0; + + $(document).mousemove(function(e) { + if(oldX == 0) { + oldX = e.pageX; + oldY = e.pageY; + } + + if(oldX != e.pageX || oldY != e.pageY) { + mouse_event = true; + } + }); + + // 주메뉴 + var $gnb = $(".gnb_1depth > a"); + $gnb.mouseover(function() { + if(mouse_event) { + $(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on"); + $(this).parent().addClass("gnb_1depth_over gnb_1depth_on"); + menu_rearrange($(this).parent()); + hide_menu = false; + } + }); + + $gnb.mouseout(function() { + hide_menu = true; + }); + + $(".gnb_1depth li").mouseover(function() { + hide_menu = false; + }); + + $(".gnb_1depth li").mouseout(function() { + hide_menu = true; + }); + + $gnb.focusin(function() { + $(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on"); + $(this).parent().addClass("gnb_1depth_over gnb_1depth_on"); + menu_rearrange($(this).parent()); + hide_menu = false; + }); + + $gnb.focusout(function() { + hide_menu = true; + }); + + $(".gnb_1depth ul a").focusin(function() { + $(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on"); + var $gnb_li = $(this).closest(".gnb_1depth").addClass("gnb_1depth_over gnb_1depth_on"); + menu_rearrange($(this).closest(".gnb_1depth")); + hide_menu = false; + }); + + $(".gnb_1depth ul a").focusout(function() { + hide_menu = true; + }); + + $('#gnb_ul>li').bind('mouseleave',function(){ + submenu_hide(); + }); + + $(document).bind('click focusin',function(){ + if(hide_menu) { + submenu_hide(); + } + }); + + function submenu_hide() { + $(".gnb_1depth").removeClass("gnb_1depth_over gnb_1depth_over2 gnb_1depth_on"); + } + + // 텍스트 리사이즈 카운트 쿠키있으면 실행 + var resize_act; + var text_resize_count = parseInt(get_cookie("ck_font_resize_count")); + if(!isNaN(text_resize_count)) { + if(text_resize_count > 0) + resize_act = "increase"; + else if(text_resize_count < 0) + resize_act = "decrease"; + + if(Math.abs(text_resize_count) > 0) + font_resize2("container", resize_act, Math.abs(text_resize_count)); + } +}); + +function menu_rearrange(el) +{ + var width = $("#gnb_ul").width(); + var left = w1 = w2 = 0; + var idx = $(".gnb_1depth").index(el); + + for(i=0; i<=idx; i++) { + w1 = $(".gnb_1depth:eq("+i+")").outerWidth(); + w2 = $(".gnb_2depth > a:eq("+i+")").outerWidth(true); + + if((left + w2) > width) { + el.removeClass("gnb_1depth_over").addClass("gnb_1depth_over2"); + } + + left += w1; + } +} \ No newline at end of file From 113231ac78b3e388ce121ad6f469adbb9bf03272 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 22 Apr 2013 14:13:47 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=EB=B2=84=ED=8D=BC=EC=9D=98=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9=EC=97=90=EC=84=9C=20body=20=ED=83=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=A4=91=EA=B0=84=EC=9D=98=20=EC=99=B8=EB=B6=80=20css=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=9D=84=20CAPTURE=20=ED=95=98=EC=97=AC=20he?= =?UTF-8?q?ad=20=ED=83=9C=EA=B7=B8=EB=A1=9C=20=EC=9D=B4=EB=8F=99=EC=8B=9C?= =?UTF-8?q?=EC=BC=9C=EC=A4=80=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 10 +- head.sub.php | 45 ++----- lib/common.lib.php | 40 +++++++ lib/connect.lib.php | 1 + lib/poll.lib.php | 2 + skin/board/basic/list.skin.php | 2 + skin/board/basic/view.skin.php | 2 + skin/board/basic/write.skin.php | 2 + skin/connect/basic/connect.skin.php | 2 + skin/connect/basic/current_connect.skin.php | 2 + skin/connect/basic/style.css | 0 skin/member/basic/register_form.skin.php | 1 + skin/new/basic/new.skin.php | 2 + skin/poll/basic/poll.skin.php | 2 + skin/poll/basic/poll_result.skin.php | 2 + skin/search/basic/search.skin.php | 2 + tail.sub.php | 125 +------------------- 17 files changed, 75 insertions(+), 167 deletions(-) create mode 100644 skin/connect/basic/style.css diff --git a/common.php b/common.php index f816f4ade..7cf534946 100644 --- a/common.php +++ b/common.php @@ -436,9 +436,7 @@ if (G4_IS_MOBILE) { $new_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/new/'.$config['cf_mobile_new_skin']; $search_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/search/'.$config['cf_mobile_search_skin']; $connect_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/connect/'.$config['cf_mobile_connect_skin']; - $poll_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/poll/basic'; - if (isset($_GET['skin_dir'])) - $poll_skin_path = G4_MOBILE_PATH.'/'.G4_SKIN_DIR.'/poll/'.$_GET['skin_dir']; + $connect_skin_url = G4_MOBILE_URL.'/'.G4_SKIN_DIR.'/connect/'.$config['cf_mobile_connect_skin']; } else { $board_skin_path = G4_SKIN_PATH.'/board/'.$board['bo_skin']; $board_skin_url = G4_SKIN_URL .'/board/'.$board['bo_skin']; @@ -447,9 +445,7 @@ if (G4_IS_MOBILE) { $new_skin_path = G4_SKIN_PATH.'/new/'.$config['cf_new_skin']; $search_skin_path = G4_SKIN_PATH.'/search/'.$config['cf_search_skin']; $connect_skin_path = G4_SKIN_PATH.'/connect/'.$config['cf_connect_skin']; - $poll_skin_path = G4_SKIN_PATH.'/poll/basic'; - if (isset($_GET['skin_dir'])) - $poll_skin_path = G4_SKIN_PATH.'/poll/'.$_GET['skin_dir']; + $connect_skin_url = G4_SKIN_URL.'/connect/'.$config['cf_connect_skin']; } //============================================================================== @@ -466,6 +462,8 @@ while ($entry = $tmp->read()) { include_once(G4_EXTEND_PATH.'/'.$entry); } +ob_start('ob_gzhandler'); + // 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면 // 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음 header('Content-Type: text/html; charset=utf-8'); diff --git a/head.sub.php b/head.sub.php index 5e9c583fa..b811ed25f 100644 --- a/head.sub.php +++ b/head.sub.php @@ -32,35 +32,19 @@ header("Pragma: no-cache"); // HTTP/1.0 -<?=$g4_head_title?> + + + + + +<?=$g4_head_title?> - -"> - -"> - - @@ -78,24 +62,9 @@ var g4_cookie_domain = ""; ?> + -
diff --git a/skin/new/basic/new.skin.php b/skin/new/basic/new.skin.php index 329536eef..ca0b635f4 100644 --- a/skin/new/basic/new.skin.php +++ b/skin/new/basic/new.skin.php @@ -2,6 +2,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + +
상세검색 diff --git a/skin/poll/basic/poll.skin.php b/skin/poll/basic/poll.skin.php index 6ec6feeee..f5ee195e9 100644 --- a/skin/poll/basic/poll.skin.php +++ b/skin/poll/basic/poll.skin.php @@ -2,6 +2,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + + diff --git a/skin/poll/basic/poll_result.skin.php b/skin/poll/basic/poll_result.skin.php index 6e864af37..f4e8010aa 100644 --- a/skin/poll/basic/poll_result.skin.php +++ b/skin/poll/basic/poll_result.skin.php @@ -2,6 +2,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + +

diff --git a/skin/search/basic/search.skin.php b/skin/search/basic/search.skin.php index c2a7cc4e6..538976fec 100644 --- a/skin/search/basic/search.skin.php +++ b/skin/search/basic/search.skin.php @@ -2,6 +2,8 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 ?> + +
diff --git a/tail.sub.php b/tail.sub.php index af5d419c8..5c95f9774 100644 --- a/tail.sub.php +++ b/tail.sub.php @@ -21,133 +21,12 @@ $(function() { 0) sql_query(" OPTIMIZE TABLE $g4['login_table'] "); -} +// HTML 마지막 처리 함수 : 반드시 넣어주시기 바랍니다. +echo html_end(); ?> \ No newline at end of file From 809a8a6e9b77af4b379769cf1f820d13b8396665 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 22 Apr 2013 14:28:00 +0900 Subject: [PATCH 3/3] =?UTF-8?q?link=20=EC=97=90=EC=84=9C=20=EC=99=B8?= =?UTF-8?q?=EB=B6=80=20css=20=ED=8C=8C=EC=9D=BC=EC=9D=B4=20=EA=B2=B9?= =?UTF-8?q?=EC=B9=98=EB=8A=94=20=EA=B2=BD=EC=9A=B0=EA=B0=80=20=EC=9E=88?= =?UTF-8?q?=EC=96=B4=20=EB=B2=84=ED=8D=BC=EB=A7=81=20=EC=86=8C=EC=8A=A4?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=B3=B4=EC=99=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 7 ++++--- lib/latest.lib.php | 2 ++ skin/latest/basic/latest.skin.php | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/common.lib.php b/lib/common.lib.php index b1f75f4a0..056681f0a 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -1961,9 +1961,10 @@ function html_end() preg_match('#(.*)#is', $buffer, $bodys); preg_match_all('/]+>/i', $bodys[0], $links); $stylesheet = ''; - for ($i=0; $i$link) { + //$link = PHP_EOL.$links[0][$i]; + $stylesheet .= PHP_EOL.$link; $buffer = preg_replace('#'.$link.'#', '', $buffer); } return preg_replace('#()#', "$1$stylesheet", $buffer); diff --git a/lib/latest.lib.php b/lib/latest.lib.php index a22cc4fbf..eb82e7d65 100644 --- a/lib/latest.lib.php +++ b/lib/latest.lib.php @@ -39,11 +39,13 @@ function latest($skin_dir='', $bo_table, $rows=10, $subject_len=40) include_once($cache_file); + /* // 같은 스킨은 .css 를 한번만 호출한다. if (!in_array($skin_dir, $css) && is_file($latest_skin_path.'/style.css')) { echo ''; $css[] = $skin_dir; } + */ ob_start(); include $latest_skin_path.'/latest.skin.php'; diff --git a/skin/latest/basic/latest.skin.php b/skin/latest/basic/latest.skin.php index 51184902b..55e08d98d 100644 --- a/skin/latest/basic/latest.skin.php +++ b/skin/latest/basic/latest.skin.php @@ -2,6 +2,8 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> + +