Merge branch 'master' of github.com:gnuboard/g4s

This commit is contained in:
rollydream
2013-03-06 13:41:19 +09:00
11 changed files with 55 additions and 17 deletions

View File

@ -130,7 +130,7 @@ class gcaptcha
function get_captcha_filename()
{
return 'gcaptcha-'.abs_ip2long().'_'.$_COOKIE['PHPSESSID'];
return 'gcaptcha-'.abs_ip2long().'_'.session_id();
}
function make_wav($captcha_filename)
@ -165,15 +165,15 @@ $gcaptcha->run();
*/
// 캡챠이미지는 한개만 사용 가능함.
function captcha_html($class="captcha")
function captcha_html($class='captcha')
{
global $g4, $gcaptcha;
$obj = new gcaptcha();
$obj->run();
$jpg_file_url = G4_DATA_URL.'/cache/gcaptcha-'.$obj->captcha_filename.'.jpg';
$wav_file_url = G4_DATA_URL.'/cache/gcaptcha-'.$obj->captcha_filename.'.wav';
$jpg_file_url = G4_DATA_URL.'/cache/'.$obj->captcha_filename.'.jpg';
$wav_file_url = G4_DATA_URL.'/cache/'.$obj->captcha_filename.'.wav';
$html .= PHP_EOL.'<script>var g4_gcaptcha_url = "'.G4_GCAPTCHA_URL.'";</script>';
$html .= PHP_EOL.'<script src="'.G4_GCAPTCHA_URL.'/gcaptcha.js"></script>';

View File

@ -3,7 +3,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
$captcha_html = "";
if ($is_guest) {
if ($is_guest && $board['bo_comment_level'] < 2) {
$captcha_html = captcha_html('_comment');
}

View File

@ -26,6 +26,7 @@ h1 {margin-bottom:20px;color:#333;font-size:1.5em;font-family:"dotum";letter-spa
h2 {font-size:1.2em}
/* 화면낭독기 사용자용 */
#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden}
.sound_only {display:inline-block !important;margin:0 !important;padding:0 !important;width:1px !important;height:1px !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
/* 본문 바로가기 */
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}

View File

@ -19,6 +19,7 @@ a:focus,
a:active {color:#000;text-decoration:underline}
/* 화면낭독기 사용자용 */
#hd_login_msg {position:absolute;top:0;left:0;width:1px;height:1px;overflow:hidden}
.sound_only {display:inline-block !important;margin:0 !important;padding:0 !important;font-size:0;line-height:0;border:0 !important;overflow:hidden !important}
/* 본문 바로가기 */
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
@ -55,7 +56,7 @@ a:active {color:#000;text-decoration:underline}
#snb img {margin-right:3px}
/* gnb js off */
#gnb {background:#f0f4f8}
#gnb {margin-top:-1px;background:#f0f4f8}
#gnb h2 {margin:0;padding:0;width:1px;height:1px;font-size:0;line-height:0;overflow:hidden}
#gnb_ul {z-index:10;margin:0 auto;padding:0;width:980px}
.gnb_1depth {position:relative;margin-left:-1px;zoom:1}

View File

@ -22,6 +22,7 @@ hr {display:none}
pre {overflow-x:scroll;font-size:1.1em}
/* 화면낭독기 사용자용 */
#hd_login_msg {position:absolute;top:0;left:0;width:0;height:0;overflow:hidden}
.sound_only {display:inline-block;margin:0;padding:0;width:0;height:0;font-size:0;line-height:0;overflow:hidden}
/* 본문 바로가기 */
#to_content a {z-index:100000;position:absolute;top:0;left:0;font-size:0;line-height:0;overflow:hidden}
@ -41,7 +42,7 @@ pre {overflow-x:scroll;font-size:1.1em}
#logo {float:left;padding:0.3em 0;margin-left:1em}
#schall {position:absolute;top:0.7em;right:1em}
#schall_stx {padding-left:0.3em;width:100px;height:1.5em;border:1px solid #aaa;border-right:0;background:#f7f7f7;line-height:1.5em}
#schall_stx {padding-left:0.3em;width:100px;height:1.5em;border:1px solid #aaa;border-right:0;background:#f7f7f7;line-height:1.5em;-webkit-appearance:none}
#schall_submit {border:1px solid #aaa;border-left:0}
#snb {clear:both;border-top:1px solid #e7f1ed;background:#151515;text-align:center}
@ -207,12 +208,12 @@ input.required:focus {border:0;background:#21272e !important;color:#fff;line-hei
#ol_before {padding:0 0.5em}
#ol_before input[type=text],
#ol_before input[type=password] {display:block;margin-bottom:0.3em;padding:0;width:80%;height:1.8em;line-height:1.8em}
#ol_before input[type=password] {display:block;margin-bottom:0.3em;padding:0;width:80%;height:1.8em;border:1px solid #b8c9c2;background:#f7f7f7;vertical-align:middle;line-height:1.8em;-webkit-appearance:none}
#ol_before input[type=submit] {position:absolute;top:0em;right:0.5em;padding:0 !important;width:18%;height:4em;border:0;background:#333;color:#fff;letter-spacing:-0.1em;vertical-align:top;cursor:pointer;-webkit-appearance:none}
#ol_svc a {color:#000;text-decoration:none}
#ol_svc {margin:0.5em 0;text-align:right}
#ol_svc a {display:inline-block;margin:0 0 0 0.5em;color:#000;text-decoration:none;vertical-align:middle}
#ol_after {}
#ol_after_hd {}
#ol_after_hd strong {display:inline-block;padding:0 0.5em 0.5em}
#ol_after_hd .btn_admin {display:block;padding:0 !important;width:100%;text-align:center}
#ol_after_private {margin:0;padding:0;list-style:none;zoom:1}
#ol_after_private:after {display:block;visibility:hidden;clear:both;content:""}

View File

@ -24,8 +24,6 @@ if ($config['cf_include_head']) {
?>
<header id="hd">
<? if ($is_member) { ?><span class="sound_only"><?=$member['mb_nick']?>님 로그인 중</span><? } ?>
<h1><?=$config['cf_title']?></h1>
<div id="to_content"><a href="#container">본문 바로가기</a></div>

View File

@ -68,3 +68,4 @@ var g4_cookie_domain = "<?=G4_COOKIE_DOMAIN?>";
<? if (!defined('G4_IS_ADMIN')) { echo $config['cf_add_script']; } ?>
</head>
<body>
<? if ($is_member) { ?><span id="hd_login_msg"><?=$member['mb_nick']?>님 로그인 중</span><? } ?>

View File

@ -526,6 +526,9 @@ function font_resize(id, act)
{
var $elements = $("#"+id+" *");
$elements.removeClass("applied");
var count = parseInt(get_cookie("ck_font_resize_count"));
if(isNaN(count))
count = 0;
$elements.each(function() {
if($(this).hasClass("no_text_resize"))
@ -552,6 +555,28 @@ function font_resize(id, act)
}
}
});
// 텍스트 리사이즈 회수 쿠키에 기록
if(act == "increase")
count++;
else
count--;
set_cookie("ck_font_resize_count", count, 1, g4_cookie_domain);
}
/**
* font_resize 함수를 반복 할 때 사용
**/
function font_resize2(id, act, loop)
{
// fotn resize 카운트 초기화
set_cookie("ck_font_resize_count", 0, 1, g4_cookie_domain);
for(i=0; i<loop; i++) {
font_resize(id, act);
}
}

View File

@ -22,12 +22,12 @@ function wrestItemname(fld)
var text = el.innerHTML.replace(/[<].*[>].*[<]\/+.*[>]/gi, "");
if(text == '') {
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("alt") ? fld.getAttribute("alt") : fld.name );
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("placeholder") ? fld.getAttribute("placeholder") : fld.name );
} else {
return text;
}
} else {
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("alt") ? fld.getAttribute("alt") : fld.name );
return fld.getAttribute("title") ? fld.getAttribute("title") : ( fld.getAttribute("placeholder") ? fld.getAttribute("placeholder") : fld.name );
}
}

View File

@ -11,8 +11,6 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
?>
<header id="hd">
<? if ($is_member) { ?><span class="sound_only"><?=$member['mb_nick']?>님 로그인 중</span><? } ?>
<h1><?=$config['cf_title']?></h1>
<div id="to_content"><a href="#container">본문 바로가기</a></div>

View File

@ -93,6 +93,19 @@ $(function(){
$(".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)