diff --git a/common/js/xml_js_filter.js b/common/js/xml_js_filter.js index 181810e7d..cae55c14c 100644 --- a/common/js/xml_js_filter.js +++ b/common/js/xml_js_filter.js @@ -9,6 +9,7 @@ var alertMsg = new Array(); var target_type_list = new Array(); +var notnull_list = new Array(); /** * @function filterAlertMessage @@ -224,6 +225,10 @@ function XmlJsFilterCheckFieldItem() { var equalto = item[4]; var filter = item[5].split(","); + for(var j=0; jact); unset($extra_var->page); unset($extra_var->board_name); + unset($extra_var->module_srl); + + // 확장변수(20개로 제한된 고정 변수) 체크 + $user_defined_extra_vars = array(); + foreach($extra_var as $key => $val) { + if(substr($key,0,11)!='extra_vars_') continue; + preg_match('/^extra_vars_([0-9]+)_(.*)$/i', $key, $matches); + if(!$matches[1] || !$matches[2]) continue; + + $user_defined_extra_vars[$matches[1]]->{$matches[2]} = $val; + unset($extra_var->{$key}); + } + for($i=1;$i<=20;$i++) if(!$user_defined_extra_vars[$i]->name) unset($user_defined_extra_vars[$i]); + $extra_var->extra_vars = $user_defined_extra_vars; // module_srl이 넘어오면 원 모듈이 있는지 확인 if($args->module_srl) { diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 00b4d42ae..05ed0d72a 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -44,6 +44,22 @@ // 권한 체크 if(!$this->grant->list) return $this->dispBoardMessage('msg_not_permitted'); + // 템플릿에서 사용할 검색옵션 세팅 + $count_search_option = count($this->search_option); + for($i=0;$i<$count_search_option;$i++) { + $search_option[$this->search_option[$i]] = Context::getLang($this->search_option[$i]); + } + + // 확장변수에서도 검색이 설정되어 있는지 확인 + for($i=1;$i<=20;$i++) { + $ex_name = $this->module_info->extra_vars[$i]->name; + $ex_search = $this->module_info->extra_vars[$i]->search; + if($ex_name && $ex_search == 'Y') { + $search_option['extra_vars'.$i] = $ex_name; + } + } + Context::set('search_option', $search_option); + // 목록 구현에 필요한 변수들을 가져온다 $document_srl = Context::get('document_srl'); $page = Context::get('page'); @@ -120,13 +136,6 @@ Context::set('document_list', $output->data); Context::set('page_navigation', $output->page_navigation); - // 템플릿에서 사용할 검색옵션 세팅 - $count_search_option = count($this->search_option); - for($i=0;$i<$count_search_option;$i++) { - $search_option[$this->search_option[$i]] = Context::getLang($this->search_option[$i]); - } - Context::set('search_option', $search_option); - // 관리자일 경우 체크한 문서들의 목록을 세팅 if($this->grant->is_admin) { Context::set('check_list',$_SESSION['document_management'][$this->module_srl]); @@ -172,6 +181,10 @@ $editor = $oEditorModel->getEditor($document_srl, $option); Context::set('editor', $editor); + // 확장변수처리를 위해 xml_js_filter를 직접 header에 적용 + $oDocumentController = &getController('document'); + $oDocumentController->addXmlJsFilter($this->module_info); + $this->setTemplateFile('write_form'); } diff --git a/modules/board/skins/default/extra_var_form.html b/modules/board/skins/default/extra_var_form.html new file mode 100644 index 000000000..4f2f31455 --- /dev/null +++ b/modules/board/skins/default/extra_var_form.html @@ -0,0 +1,65 @@ + + + + + {@ $val->default = explode(',',$val->default) } + + + +{@ $val->column_name = "extra_vars".$key} + + +{@ $val->value = $oDocument->getExtraValue($key)} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{zdate($val->value,"Y-m-d")}
+ {$lang->cmd_open_calendar} + + + +

{$val->desc}

+ diff --git a/modules/board/skins/default/extra_var_value.html b/modules/board/skins/default/extra_var_value.html new file mode 100644 index 000000000..1e09aca59 --- /dev/null +++ b/modules/board/skins/default/extra_var_value.html @@ -0,0 +1,55 @@ + + + +{@ $val->column_name = "extra_vars".$key} + + +{@ $val->value = $oDocument->getExtraValue($key)} + + + + {htmlspecialchars($val->value)} + + + + + {$val->value} + +   + + + + + + {$val->value} + +   + + + + + {htmlspecialchars($val->value[0])} + - + {htmlspecialchars($val->value[1])} + - + {htmlspecialchars($val->value[2])} + + + + {nl2br(htmlspecialchars($val->value))} + + + + + {@ $_tmp_value[] = htmlspecialchars($v)} + + {implode(",",$_tmp_value)} + + + + {htmlspecialchars($val->value)} + + + + {zdate($val->value,"Y-m-d")} + diff --git a/modules/board/skins/default/filter/insert.xml b/modules/board/skins/default/filter/insert.xml index 85d1ed4ce..5e9ed7356 100644 --- a/modules/board/skins/default/filter/insert.xml +++ b/modules/board/skins/default/filter/insert.xml @@ -7,6 +7,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/modules/board/skins/default/view_document.html b/modules/board/skins/default/view_document.html index d5af5baa4..c3a789cbb 100644 --- a/modules/board/skins/default/view_document.html +++ b/modules/board/skins/default/view_document.html @@ -39,6 +39,17 @@ {$lang->voted_count} {$oDocument->get('voted_count')} + + + + {$val->name} + + + + + + + {$lang->content} {$oDocument->getContent()} diff --git a/modules/board/skins/default/write_form.html b/modules/board/skins/default/write_form.html index c25b5d33e..5dae162f4 100644 --- a/modules/board/skins/default/write_form.html +++ b/modules/board/skins/default/write_form.html @@ -91,6 +91,20 @@ {$lang->about_tag} + + + + + {$val->name} + * + + + + + + + + diff --git a/modules/board/skins/xe_gallery/css/white.css b/modules/board/skins/xe_gallery/css/white.css index 83e37efee..64a96c137 100644 --- a/modules/board/skins/xe_gallery/css/white.css +++ b/modules/board/skins/xe_gallery/css/white.css @@ -119,6 +119,15 @@ Jeong, Chan Myeong 070601~070630 .boardRead .dateAndModify ul { display:inline;} .boardRead .dateAndModify ul li { float:left; margin-left:.3em; list-style:none;} +/* extraVars list */ +.extraVarsList { width:100%; border:1px solid #e0e1db; clear:both; margin-bottom:1em;} +.extraVarsList tr.notice { background:#f8f8f8;} +.extraVarsList tr.notice .num { font-size:.9em; font-weight:bold;} +.extraVarsList tr.bg1 { background:#ffffff} +.extraVarsList tr.bg2 { background:#fbfbfb;} +.extraVarsList th { color:#3e3f3e; font-weight:bold; padding:.8em .5em .5em .5em; border-bottom:1px solid #eff0ed; border-right:1px solid #eff0ed;} +.extraVarsList td { border-bottom:1px solid #eff0ed; padding:.5em .5em .5em 1em;} + /* boardSearch */ .boardSearch { text-align:center; clear:both; width:100%;} .boardSearch fieldset { border:none; display:inline; overflow:visible; position:relative;} @@ -252,7 +261,11 @@ Jeong, Chan Myeong 070601~070630 .boardWrite .tag label { display:block; float:left; color:#333333; font-weight:bold; padding:.4em 0 0 1.5em; width:11em;} .boardWrite .tag .inputTypeText { width:50%;} .boardWrite .tag .help { vertical-align:middle;} -.boardWrite .tag .info { padding:.5em 0 0 .6em; margin-left:8.5em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} +.boardWrite .tag .info { padding:.5em 0 0 .6em; margin-left:14em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} +.boardWrite .extra_vars { clear:both; border-top:1px solid #eff0ed; padding:.8em 0;} +.boardWrite .extra_vars label { display:block; float:left; color:#333333; font-weight:bold; padding:.4em 0 0 1.5em; width:11em;} +.boardWrite .extra_vars .info { clear:both; padding:.5em 0 0 .6em; margin-left:14em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} +.boardWrite .extra_vars ul li { float:left; margin-right:1em; } .smallBox { border:1px solid #e0e1db; margin:5em auto 1em auto;} .smallBox.w268 { width:268px;} diff --git a/modules/board/skins/xe_gallery/extra_var_form.html b/modules/board/skins/xe_gallery/extra_var_form.html new file mode 100644 index 000000000..564cec9d9 --- /dev/null +++ b/modules/board/skins/xe_gallery/extra_var_form.html @@ -0,0 +1,65 @@ + + + + + {@ $val->default = explode(',',$val->default) } + + + +{@ $val->column_name = "extra_vars".$key} + + +{@ $val->value = $oDocument->getExtraValue($key)} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
  • value)&&in_array($v, $val->value))-->checked="checked"/> {$v}
  • + +
+ + + + + + + + + +
{zdate($val->value,"Y-m-d")}
+ {$lang->cmd_open_calendar} + + + +

{$val->desc}

+ diff --git a/modules/board/skins/xe_gallery/extra_var_value.html b/modules/board/skins/xe_gallery/extra_var_value.html new file mode 100644 index 000000000..0d5b21657 --- /dev/null +++ b/modules/board/skins/xe_gallery/extra_var_value.html @@ -0,0 +1,57 @@ + + + +{@ $val->column_name = "extra_vars".$key} + + +{@ $val->value = $oDocument->getExtraValue($key)} + + + + {htmlspecialchars($val->value)} + + + + + {$val->value} + +   + + + + + + {$val->value} + +   + + + + + {htmlspecialchars($val->value[0])} + - + {htmlspecialchars($val->value[1])} + - + {htmlspecialchars($val->value[2])} + + + + {nl2br(htmlspecialchars($val->value))} + + + + + {@ $_tmp_value[] = htmlspecialchars($v)} + + {implode(",",$_tmp_value)} + + + + {htmlspecialchars($val->value)} + + + + {zdate($val->value,"Y-m-d")} + + +  diff --git a/modules/board/skins/xe_gallery/view_document.html b/modules/board/skins/xe_gallery/view_document.html index 8eb7fddbe..50c0e72bf 100644 --- a/modules/board/skins/xe_gallery/view_document.html +++ b/modules/board/skins/xe_gallery/view_document.html @@ -49,6 +49,24 @@ + + + + + + + + + + + + +
{$val->name} + + +
+ +
{$oDocument->getContent()}
diff --git a/modules/board/skins/xe_gallery/write_form.html b/modules/board/skins/xe_gallery/write_form.html index d394a8bba..2f36ec6e9 100644 --- a/modules/board/skins/xe_gallery/write_form.html +++ b/modules/board/skins/xe_gallery/write_form.html @@ -87,6 +87,16 @@

{$lang->about_tag}

+ + +
+ + + +
+ + +
diff --git a/modules/board/skins/xe_list/css/white.css b/modules/board/skins/xe_list/css/white.css index 211cac887..573d41f51 100644 --- a/modules/board/skins/xe_list/css/white.css +++ b/modules/board/skins/xe_list/css/white.css @@ -119,6 +119,15 @@ Jeong, Chan Myeong 070601~070630 .boardRead .dateAndModify ul { display:inline;} .boardRead .dateAndModify ul li { float:left; margin-left:.3em; list-style:none;} +/* extraVars list */ +.extraVarsList { width:100%; border:1px solid #e0e1db; clear:both; margin-bottom:1em;} +.extraVarsList tr.notice { background:#f8f8f8;} +.extraVarsList tr.notice .num { font-size:.9em; font-weight:bold;} +.extraVarsList tr.bg1 { background:#ffffff} +.extraVarsList tr.bg2 { background:#fbfbfb;} +.extraVarsList th { color:#3e3f3e; font-weight:bold; padding:.8em .5em .5em .5em; border-bottom:1px solid #eff0ed; border-right:1px solid #eff0ed;} +.extraVarsList td { border-bottom:1px solid #eff0ed; padding:.5em .5em .5em 1em;} + /* boardSearch */ .boardSearch { text-align:center; clear:both; width:100%;} .boardSearch fieldset { border:none; display:inline; overflow:visible; position:relative;} @@ -252,7 +261,11 @@ Jeong, Chan Myeong 070601~070630 .boardWrite .tag label { display:block; float:left; color:#333333; font-weight:bold; padding:.4em 0 0 1.5em; width:11em;} .boardWrite .tag .inputTypeText { width:50%;} .boardWrite .tag .help { vertical-align:middle;} -.boardWrite .tag .info { padding:.5em 0 0 .6em; margin-left:8.5em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} +.boardWrite .tag .info { padding:.5em 0 0 .6em; margin-left:14em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} +.boardWrite .extra_vars { clear:both; border-top:1px solid #eff0ed; padding:.8em 0;} +.boardWrite .extra_vars label { display:block; float:left; color:#333333; font-weight:bold; padding:.4em 0 0 1.5em; width:11em;} +.boardWrite .extra_vars .info { clear:both; padding:.5em 0 0 .6em; margin-left:14em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} +.boardWrite .extra_vars ul li { float:left; margin-right:1em; } .smallBox { border:1px solid #e0e1db; margin:5em auto 1em auto;} .smallBox.w268 { width:268px;} diff --git a/modules/board/skins/xe_list/extra_var_form.html b/modules/board/skins/xe_list/extra_var_form.html new file mode 100644 index 000000000..564cec9d9 --- /dev/null +++ b/modules/board/skins/xe_list/extra_var_form.html @@ -0,0 +1,65 @@ + + + + + {@ $val->default = explode(',',$val->default) } + + + +{@ $val->column_name = "extra_vars".$key} + + +{@ $val->value = $oDocument->getExtraValue($key)} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
  • value)&&in_array($v, $val->value))-->checked="checked"/> {$v}
  • + +
+ + + + + + + + + +
{zdate($val->value,"Y-m-d")}
+ {$lang->cmd_open_calendar} + + + +

{$val->desc}

+ diff --git a/modules/board/skins/xe_list/extra_var_value.html b/modules/board/skins/xe_list/extra_var_value.html new file mode 100644 index 000000000..0d5b21657 --- /dev/null +++ b/modules/board/skins/xe_list/extra_var_value.html @@ -0,0 +1,57 @@ + + + +{@ $val->column_name = "extra_vars".$key} + + +{@ $val->value = $oDocument->getExtraValue($key)} + + + + {htmlspecialchars($val->value)} + + + + + {$val->value} + +   + + + + + + {$val->value} + +   + + + + + {htmlspecialchars($val->value[0])} + - + {htmlspecialchars($val->value[1])} + - + {htmlspecialchars($val->value[2])} + + + + {nl2br(htmlspecialchars($val->value))} + + + + + {@ $_tmp_value[] = htmlspecialchars($v)} + + {implode(",",$_tmp_value)} + + + + {htmlspecialchars($val->value)} + + + + {zdate($val->value,"Y-m-d")} + + +  diff --git a/modules/board/skins/xe_list/list.html b/modules/board/skins/xe_list/list.html index 99ab3c9f0..db6a8e4be 100644 --- a/modules/board/skins/xe_list/list.html +++ b/modules/board/skins/xe_list/list.html @@ -70,7 +70,7 @@ - {$no} + {$no} diff --git a/modules/board/skins/xe_list/view_document.html b/modules/board/skins/xe_list/view_document.html index 8eb7fddbe..50c0e72bf 100644 --- a/modules/board/skins/xe_list/view_document.html +++ b/modules/board/skins/xe_list/view_document.html @@ -49,6 +49,24 @@
+ + + + + + + + + + + + +
{$val->name} + + +
+ +
{$oDocument->getContent()}
diff --git a/modules/board/skins/xe_list/write_form.html b/modules/board/skins/xe_list/write_form.html index d394a8bba..2f36ec6e9 100644 --- a/modules/board/skins/xe_list/write_form.html +++ b/modules/board/skins/xe_list/write_form.html @@ -87,6 +87,16 @@

{$lang->about_tag}

+ + +
+ + + +
+ + +
diff --git a/modules/board/skins/xe_webzine/css/white.css b/modules/board/skins/xe_webzine/css/white.css index 83e37efee..8dc6ed464 100644 --- a/modules/board/skins/xe_webzine/css/white.css +++ b/modules/board/skins/xe_webzine/css/white.css @@ -119,6 +119,15 @@ Jeong, Chan Myeong 070601~070630 .boardRead .dateAndModify ul { display:inline;} .boardRead .dateAndModify ul li { float:left; margin-left:.3em; list-style:none;} +/* extraVars list */ +.extraVarsList { width:100%; border:1px solid #e0e1db; clear:both; margin-bottom:1em;} +.extraVarsList tr.notice { background:#f8f8f8;} +.extraVarsList tr.notice .num { font-size:.9em; font-weight:bold;} +.extraVarsList tr.bg1 { background:#ffffff} +.extraVarsList tr.bg2 { background:#fbfbfb;} +.extraVarsList th { color:#3e3f3e; font-weight:bold; padding:.8em .5em .5em .5em; border-bottom:1px solid #eff0ed; border-right:1px solid #eff0ed;} +.extraVarsList td { border-bottom:1px solid #eff0ed; padding:.5em .5em .5em 1em;} + /* boardSearch */ .boardSearch { text-align:center; clear:both; width:100%;} .boardSearch fieldset { border:none; display:inline; overflow:visible; position:relative;} @@ -252,8 +261,11 @@ Jeong, Chan Myeong 070601~070630 .boardWrite .tag label { display:block; float:left; color:#333333; font-weight:bold; padding:.4em 0 0 1.5em; width:11em;} .boardWrite .tag .inputTypeText { width:50%;} .boardWrite .tag .help { vertical-align:middle;} -.boardWrite .tag .info { padding:.5em 0 0 .6em; margin-left:8.5em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} - +.boardWrite .tag .info { padding:.5em 0 0 .6em; margin-left:14em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} +.boardWrite .extra_vars { clear:both; border-top:1px solid #eff0ed; padding:.8em 0;} +.boardWrite .extra_vars label { display:block; float:left; color:#333333; font-weight:bold; padding:.4em 0 0 1.5em; width:11em;} +.boardWrite .extra_vars .info { clear:both; padding:.5em 0 0 .6em; margin-left:14em; font-size:.9em; color:#999999; background:url(../images/white/iconArrowD8.gif) no-repeat left center;} +.boardWrite .extra_vars ul li { float:left; margin-right:1em; } .smallBox { border:1px solid #e0e1db; margin:5em auto 1em auto;} .smallBox.w268 { width:268px;} .smallBox .header { position:relative; _width:100%; background:#ffffff url(../images/normal/bgH3.gif) no-repeat left bottom; overflow:hidden;} diff --git a/modules/board/skins/xe_webzine/extra_var_form.html b/modules/board/skins/xe_webzine/extra_var_form.html new file mode 100644 index 000000000..564cec9d9 --- /dev/null +++ b/modules/board/skins/xe_webzine/extra_var_form.html @@ -0,0 +1,65 @@ + + + + + {@ $val->default = explode(',',$val->default) } + + + +{@ $val->column_name = "extra_vars".$key} + + +{@ $val->value = $oDocument->getExtraValue($key)} + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
  • value)&&in_array($v, $val->value))-->checked="checked"/> {$v}
  • + +
+ + + + + + + + + +
{zdate($val->value,"Y-m-d")}
+ {$lang->cmd_open_calendar} + + + +

{$val->desc}

+ diff --git a/modules/board/skins/xe_webzine/extra_var_value.html b/modules/board/skins/xe_webzine/extra_var_value.html new file mode 100644 index 000000000..0d5b21657 --- /dev/null +++ b/modules/board/skins/xe_webzine/extra_var_value.html @@ -0,0 +1,57 @@ + + + +{@ $val->column_name = "extra_vars".$key} + + +{@ $val->value = $oDocument->getExtraValue($key)} + + + + {htmlspecialchars($val->value)} + + + + + {$val->value} + +   + + + + + + {$val->value} + +   + + + + + {htmlspecialchars($val->value[0])} + - + {htmlspecialchars($val->value[1])} + - + {htmlspecialchars($val->value[2])} + + + + {nl2br(htmlspecialchars($val->value))} + + + + + {@ $_tmp_value[] = htmlspecialchars($v)} + + {implode(",",$_tmp_value)} + + + + {htmlspecialchars($val->value)} + + + + {zdate($val->value,"Y-m-d")} + + +  diff --git a/modules/board/skins/xe_webzine/list.html b/modules/board/skins/xe_webzine/list.html index 79b2dabf4..d646da9d7 100644 --- a/modules/board/skins/xe_webzine/list.html +++ b/modules/board/skins/xe_webzine/list.html @@ -98,7 +98,7 @@ - {$no} + {$no} diff --git a/modules/board/skins/xe_webzine/view_document.html b/modules/board/skins/xe_webzine/view_document.html index 8eb7fddbe..50c0e72bf 100644 --- a/modules/board/skins/xe_webzine/view_document.html +++ b/modules/board/skins/xe_webzine/view_document.html @@ -49,6 +49,24 @@
+ + + + + + + + + + + + +
{$val->name} + + +
+ +
{$oDocument->getContent()}
diff --git a/modules/board/skins/xe_webzine/write_form.html b/modules/board/skins/xe_webzine/write_form.html index d394a8bba..2f36ec6e9 100644 --- a/modules/board/skins/xe_webzine/write_form.html +++ b/modules/board/skins/xe_webzine/write_form.html @@ -87,6 +87,16 @@

{$lang->about_tag}

+ + +
+ + + +
+ + +
diff --git a/modules/board/tpl/board_info.html b/modules/board/tpl/board_info.html index 2ed514cbf..f5639c5e6 100644 --- a/modules/board/tpl/board_info.html +++ b/modules/board/tpl/board_info.html @@ -71,3 +71,48 @@ {$lang->cmd_board_list}
+ + +++ + + + + + + +
{$lang->extra_vars}
{$lang->extra_vars} {$i} + + {@ $extra_vars_name = $module_info->extra_vars[$i]->name} + {@ $extra_vars_type = $module_info->extra_vars[$i]->type} + {@ $extra_vars_is_required = $module_info->extra_vars[$i]->is_required=='Y'?'Y':'N'} + {@ $extra_vars_default_value = $module_info->extra_vars[$i]->default?$module_info->extra_vars[$i]->default:' '} + {@ $extra_vars_desc = $module_info->extra_vars[$i]->desc?$module_info->extra_vars[$i]->desc:' '} + {@ $extra_vars_search = $module_info->extra_vars[$i]->search=='Y'?'Y':'N'} + +
    +
  • {$lang->column_name}
  • +
  • {$extra_vars_name}
  • +
  • {$lang->column_type}
  • +
  • {$extra_vars_type}
  • +
  • {$lang->is_required}
  • +
  • {$extra_vars_is_required}
  • +
  • {$lang->default_value}
  • +
  • {$extra_vars_default_value}
  • +
  • {$lang->description}
  • +
  • {$extra_vars_desc}
  • +
  • {$lang->cmd_search}
  • +
  • {$extra_vars_search}
  • +
+ + {$lang->not_exists} + +
+ + diff --git a/modules/board/tpl/board_insert.html b/modules/board/tpl/board_insert.html index 9dcbe1ded..59c69316f 100644 --- a/modules/board/tpl/board_insert.html +++ b/modules/board/tpl/board_insert.html @@ -136,6 +136,58 @@ + + + + + + + + + + +
{$lang->extra_vars}
{$lang->extra_vars} {$i} + + {@ $extra_vars_name = $module_info->extra_vars[$i]->name} + {@ $extra_vars_type = $module_info->extra_vars[$i]->type} + {@ $extra_vars_is_required = $module_info->extra_vars[$i]->is_required} + {@ $extra_vars_default_value = $module_info->extra_vars[$i]->default} + {@ $extra_vars_desc = $module_info->extra_vars[$i]->desc} + {@ $extra_vars_search = $module_info->extra_vars[$i]->search} + +
    +
  • {$lang->column_name}
  • +
  • +
  • {$lang->column_type}
  • +
  • + +
  • +
  • {$lang->is_required}
  • +
  • checked="checked" /> +
  • {$lang->default_value}
  • +
  • + +

    {$lang->about_extra_vars_default_value}

    +
  • + +
  • {$lang->description}
  • +
  • + +
  • +
  • {$lang->cmd_search}
  • +
  • checked="checked" /> +
+ + {$lang->not_exists} + +
+
diff --git a/modules/board/tpl/filter/insert_board.xml b/modules/board/tpl/filter/insert_board.xml index 64c88109d..f103aa627 100644 --- a/modules/board/tpl/filter/insert_board.xml +++ b/modules/board/tpl/filter/insert_board.xml @@ -21,6 +21,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index c3d01f884..6b788be54 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -409,5 +409,25 @@ $args->document_count = $document_count; return executeQuery('document.updateCategoryCount', $args); } + + /** + * @brief document의 20개 확장변수를 xml js filter 적용을 위해 직접 적용 + * 모듈정보를 받아서 20개의 확장변수를 체크하여 type, required등의 값을 체크하여 header에 javascript 코드 추가 + **/ + function addXmlJsFilter($module_info) { + $extra_vars = $module_info->extra_vars; + if(!$extra_vars) return; + + $js_code = ""; + + foreach($extra_vars as $key => $val) { + $js_code .= sprintf('alertMsg["extra_vars%d"] = "%s";', $key, $val->name); + $js_code .= sprintf('target_type_list["extra_vars%d"] = "%s";', $key, $val->type); + if($val->is_required == 'Y') $js_code .= sprintf('notnull_list[notnull_list.length] = "extra_vars%s";',$key); + } + + $js_code = ""; + Context::addHtmlHeader($js_code); + } } ?> diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 49f805d72..4e1f19de4 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -167,6 +167,19 @@ } } + function isExtraVarsExists() { + for($i=1;$i<=20;$i++) { + if($this->get('extra_vars'.$i)) return true; + } + return false; + } + + function getExtraValue($key) { + $val = $this->get('extra_vars'.$key); + if(strpos($val,'|@|')!==false) $val = explode('|@|', $val); + return $val; + } + function getCommentCount() { if(!$this->isGranted() && $this->isSecret()) return 0; return $this->get('comment_count'); diff --git a/modules/document/document.model.php b/modules/document/document.model.php index e6868347a..40787bc76 100644 --- a/modules/document/document.model.php +++ b/modules/document/document.model.php @@ -164,6 +164,12 @@ case 'ipaddress' : $args->s_ipaddress= $search_keyword; break; + default : + preg_match('/^extra_vars([0-9]+)$/',$search_target,$matches); + if($matches[1]) { + $args->{"s_extra_vars".$matches[1]} = $search_keyword; + } + break; } } diff --git a/modules/document/queries/getDocumentList.xml b/modules/document/queries/getDocumentList.xml index bef060e22..52a133639 100644 --- a/modules/document/queries/getDocumentList.xml +++ b/modules/document/queries/getDocumentList.xml @@ -28,6 +28,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/modules/document/queries/insertDocument.xml b/modules/document/queries/insertDocument.xml index f9a4ee7cb..e6a3039de 100644 --- a/modules/document/queries/insertDocument.xml +++ b/modules/document/queries/insertDocument.xml @@ -31,5 +31,25 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/modules/document/queries/updateDocument.xml b/modules/document/queries/updateDocument.xml index 35a51679b..e80f98ab3 100644 --- a/modules/document/queries/updateDocument.xml +++ b/modules/document/queries/updateDocument.xml @@ -24,6 +24,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/modules/module/lang/en.lang.php b/modules/module/lang/en.lang.php index a189b037d..b68c93360 100644 --- a/modules/module/lang/en.lang.php +++ b/modules/module/lang/en.lang.php @@ -62,4 +62,6 @@ $lang->about_grant = 'If you disable all objects having specific permissions, all members even not logined may have permission.'; $lang->about_open_rss = 'You can select RSS on the current module to be open to the public.\nNo matter the view permission of article , RSS will be open to the public by its option.'; $lang->about_module = "All of Zeroboard XE except the basic library consist of module.\n [Manage module] module will show all installed modules and help you to manage them.\nThrough [Add shortcut] feature, you can manage frequently used modules easily."; + + $lang->about_extra_vars_default_value = '다중/단일 선택등 기본값이 여러개가 필요한 경우 , (콤마)로 연결하시면 됩니다'; ?> diff --git a/modules/module/lang/jp.lang.php b/modules/module/lang/jp.lang.php index 08d727034..c3b18073f 100644 --- a/modules/module/lang/jp.lang.php +++ b/modules/module/lang/jp.lang.php @@ -62,4 +62,6 @@ $lang->about_grant = '特定権限の対象をすべて解除するとログインしていない会員ユーザまで権限が与えられます。'; $lang->about_open_rss = '現在のモジュールに対して「RSS配信」を選択することができます。書き込みの内容が読める権限とは関係なくオプションによってRSSが配信されます。'; $lang->about_module = "ゼロボードXEは、基本ライブラリの他は、すべてモジュールで構成されています。モジュール管理用のモジュールはインストールされたすべてを表示し、管理できるようにします。頻繁に使うモジュールは、【ショットカット追加】で行うと管理しやすなります。"; + + $lang->about_extra_vars_default_value = '다중/단일 선택등 기본값이 여러개가 필요한 경우 , (콤마)로 연결하시면 됩니다'; ?> diff --git a/modules/module/lang/ko.lang.php b/modules/module/lang/ko.lang.php index fa609c8f4..f00e69a6e 100644 --- a/modules/module/lang/ko.lang.php +++ b/modules/module/lang/ko.lang.php @@ -62,4 +62,6 @@ $lang->about_grant = '특정 권한의 대상을 모두 해제하시면 로그인하지 않은 회원까지 권한을 가질 수 있습니다'; $lang->about_open_rss = '현재 모듈에 대한 RSS 공개를 선택하실 수 있습니다. 글 보는 권한과 상관없이 옵션에 따라 RSS가 공개됩니다'; $lang->about_module = "제로보드XE는 기본 라이브러리를 제외한 나머지는 모두 모듈로 구성되어 있습니다.\n모듈관리 모듈은 설치된 모든 모듈을 보여주고 관리를 도와줍니다.\n자주 쓰는 모듈은 [바로가기 추가]를 통해서 편하게 관리하실 수 있습니다."; + + $lang->about_extra_vars_default_value = '다중/단일 선택등 기본값이 여러개가 필요한 경우 , (콤마)로 연결하시면 됩니다'; ?> diff --git a/modules/module/lang/zh-CN.lang.php b/modules/module/lang/zh-CN.lang.php index 0d88728a3..eb7d6cd0e 100644 --- a/modules/module/lang/zh-CN.lang.php +++ b/modules/module/lang/zh-CN.lang.php @@ -62,4 +62,6 @@ $lang->about_grant = '全部解除特定权限的对象会没有登录的会员也有相关权限'; $lang->about_open_rss = '可以选择对该模块的RSS的公开。不相关查看内容的权限按RSS的选项指定'; $lang->about_module = "zeroboard XE是除了基本library以外全部是以模块构成。\n模块管理的模块是帮助显示全部已安装的模块以及管理。\n经常使用的模块通过『添加到左侧快捷菜单』可以方便管理。"; + + $lang->about_extra_vars_default_value = '다중/단일 선택등 기본값이 여러개가 필요한 경우 , (콤마)로 연결하시면 됩니다'; ?>