Merge branch 'master' of github.com:gnuboard/g5 into g5

This commit is contained in:
chicpro
2015-09-14 15:01:32 +09:00
13 changed files with 62 additions and 28 deletions

View File

@ -30,6 +30,9 @@ if ($w == "") {
alert('개인정보처리방침안내의 내용에 동의하셔야 회원가입 하실 수 있습니다.', G5_BBS_URL.'/register.php');
}
$agree = preg_replace('#[^0-9]#', '', $_POST['agree']);
$agree2 = preg_replace('#[^0-9]#', '', $_POST['agree2']);
$member['mb_birth'] = '';
$member['mb_sex'] = '';
$member['mb_name'] = '';

View File

@ -390,9 +390,17 @@ if ($is_guest) {
}
$is_dhtml_editor = false;
// 모바일에서는 DHTML 에디터 사용불가
if ($config['cf_editor'] && !G5_IS_MOBILE && $board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) {
$is_dhtml_editor_use = false;
$editor_content_js = '';
if(!G5_IS_MOBILE || defined('G5_IS_MOBILE_DHTML_USE') && G5_IS_MOBILE_DHTML_USE)
$is_dhtml_editor_use = true;
// 모바일에서는 G5_IS_MOBILE_DHTML_USE 설정에 따라 DHTML 에디터 적용
if ($config['cf_editor'] && $is_dhtml_editor_use && $board['bo_use_dhtml_editor'] && $member['mb_level'] >= $board['bo_html_level']) {
$is_dhtml_editor = true;
if(is_file(G5_EDITOR_PATH.'/'.$config['cf_editor'].'/autosave.editor.js'))
$editor_content_js = '<script src="'.G5_EDITOR_URL.'/'.$config['cf_editor'].'/autosave.editor.js"></script>'.PHP_EOL;
}
$editor_html = editor_html('wr_content', $content, $is_dhtml_editor);
$editor_js = '';

View File

@ -192,6 +192,9 @@ define('G5_THUMB_JPG_QUALITY', 90);
// 썸네일 png Compress 설정
define('G5_THUMB_PNG_COMPRESS', 5);
// 모바일 기기에서 DHTML 에디터 사용여부를 설정합니다.
define('G5_IS_MOBILE_DHTML_USE', false);
// ip 숨김방법 설정
/* 123.456.789.012 ip의 숨김 방법을 변경하는 방법은
\\1 은 123, \\2는 456, \\3은 789, \\4는 012에 각각 대응되므로

View File

@ -7,13 +7,18 @@ var save_wr_content = null;
function autosave() {
$("form#fwrite").each(function() {
if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
this.wr_content.value = CKEDITOR.instances.wr_content.getData();
} else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
this.wr_content.value = ed_wr_content.outputBodyHTML();
} else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors)!="undefined" && typeof(oEditors.getById['wr_content'])!="undefined" ) {
this.wr_content.value = oEditors.getById['wr_content'].getIR();
if(g5_editor != "") {
if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
this.wr_content.value = CKEDITOR.instances.wr_content.getData();
} else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
this.wr_content.value = ed_wr_content.outputBodyHTML();
} else {
if(typeof get_editor_wr_content == "function") {
this.wr_content.value = get_editor_wr_content();
}
}
}
// 변수에 저장해 놓은 값과 다를 경우에만 임시 저장함
if (save_wr_subject != this.wr_subject.value || save_wr_content != this.wr_content.value) {
$.ajax({
@ -78,14 +83,16 @@ $(function(){
var subject = $(data).find("item").find("subject").text();
var content = $(data).find("item").find("content").text();
$("#wr_subject").val(subject);
if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
CKEDITOR.instances.wr_content.setData(content);
} else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
ed_wr_content.putContents(content);
} else if (g5_editor.indexOf("smarteditor2") != -1 && typeof(oEditors)!="undefined" && typeof(oEditors.getById['wr_content'])!="undefined" ) {
oEditors.getById["wr_content"].exec("SET_CONTENTS", [""]);
//oEditors.getById["wr_content"].exec("SET_IR", [""]);
oEditors.getById["wr_content"].exec("PASTE_HTML", [content]);
if(g5_editor != "") {
if (g5_editor.indexOf("ckeditor4") != -1 && typeof(CKEDITOR.instances.wr_content)!="undefined") {
CKEDITOR.instances.wr_content.setData(content);
} else if (g5_editor.indexOf("cheditor5") != -1 && typeof(ed_wr_content)!="undefined") {
ed_wr_content.putContents(content);
} else {
if(typeof put_editor_wr_content == "function") {
put_editor_wr_content(content);
}
}
} else {
$("#fwrite #wr_content").val(content);
}

View File

@ -193,8 +193,7 @@ function html_auto_br(obj)
function fwrite_submit(f)
{
<?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
<?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
var subject = "";
var content = "";
@ -243,7 +242,7 @@ function fwrite_submit(f)
}
}
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
document.getElementById("btn_submit").disabled = "disabled";

View File

@ -192,8 +192,7 @@ function html_auto_br(obj)
function fwrite_submit(f)
{
<?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
<?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
var subject = "";
var content = "";
@ -242,7 +241,7 @@ function fwrite_submit(f)
}
}
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
document.getElementById("btn_submit").disabled = "disabled";

View File

@ -0,0 +1,13 @@
function get_editor_wr_content()
{
return oEditors.getById['wr_content'].getIR();;
}
function put_editor_wr_content(content)
{
oEditors.getById["wr_content"].exec("SET_CONTENTS", [""]);
//oEditors.getById["wr_content"].exec("SET_IR", [""]);
oEditors.getById["wr_content"].exec("PASTE_HTML", [content]);
return;
}

View File

@ -111,6 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
<?php if($editor_content_js) echo $editor_content_js; ?>
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
<div id="autosave_pop">
<strong>임시 저장된 글 목록</strong>

View File

@ -111,6 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
<?php if($editor_content_js) echo $editor_content_js; ?>
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
<div id="autosave_pop">
<strong>임시 저장된 글 목록</strong>

View File

@ -193,8 +193,7 @@ function html_auto_br(obj)
function fwrite_submit(f)
{
<?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
<?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
var subject = "";
var content = "";
@ -243,7 +242,7 @@ function fwrite_submit(f)
}
}
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
document.getElementById("btn_submit").disabled = "disabled";

View File

@ -192,8 +192,7 @@ function html_auto_br(obj)
function fwrite_submit(f)
{
<?php echo get_editor_js('wr_content', $is_dhtml_editor); ?>
<?php echo chk_editor_js('wr_content', $is_dhtml_editor); ?>
<?php echo $editor_js; // 에디터 사용시 자바스크립트에서 내용을 폼필드로 넣어주며 내용이 입력되었는지 검사함 ?>
var subject = "";
var content = "";
@ -242,7 +241,7 @@ function fwrite_submit(f)
}
}
<?php if ($is_guest) { echo chk_captcha_js(); } ?>
<?php echo $captcha_js; // 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함 ?>
document.getElementById("btn_submit").disabled = "disabled";

View File

@ -111,6 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
<?php if($editor_content_js) echo $editor_content_js; ?>
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
<div id="autosave_pop">
<strong>임시 저장된 글 목록</strong>

View File

@ -111,6 +111,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required" size="50" maxlength="255">
<?php if ($is_member) { // 임시 저장된 글 기능 ?>
<script src="<?php echo G5_JS_URL; ?>/autosave.js"></script>
<?php if($editor_content_js) echo $editor_content_js; ?>
<button type="button" id="btn_autosave" class="btn_frmline">임시 저장된 글 (<span id="autosave_count"><?php echo $autosave_count; ?></span>)</button>
<div id="autosave_pop">
<strong>임시 저장된 글 목록</strong>