mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-16 01:39:58 +09:00
document모듈에 20개의 확장 필드 추가 및 게시판모듈에서 이를 관리자가 설정하여 사용할 수 있게 수정
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1985 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
810db4b33a
commit
409d82fb49
40 changed files with 1027 additions and 13 deletions
|
|
@ -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 = "<script type=\"text/javascript\">//<![CDATA[\n".$js_code."\n//]]></script>";
|
||||
Context::addHtmlHeader($js_code);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,26 @@
|
|||
<condition operation="like_prefix" column="regdate" var="s_regdate" pipe="or" />
|
||||
<condition operation="like_prefix" column="last_update" var="s_last_update" pipe="or" />
|
||||
<condition operation="like_prefix" column="ipaddress" var="s_ipaddress" pipe="or" />
|
||||
<condition operation="like" column="extra_vars1" var="s_extra_vars1" pipe="or" />
|
||||
<condition operation="like" column="extra_vars2" var="s_extra_vars2" pipe="or" />
|
||||
<condition operation="like" column="extra_vars3" var="s_extra_vars3" pipe="or" />
|
||||
<condition operation="like" column="extra_vars4" var="s_extra_vars4" pipe="or" />
|
||||
<condition operation="like" column="extra_vars5" var="s_extra_vars5" pipe="or" />
|
||||
<condition operation="like" column="extra_vars6" var="s_extra_vars6" pipe="or" />
|
||||
<condition operation="like" column="extra_vars7" var="s_extra_vars7" pipe="or" />
|
||||
<condition operation="like" column="extra_vars8" var="s_extra_vars8" pipe="or" />
|
||||
<condition operation="like" column="extra_vars9" var="s_extra_vars9" pipe="or" />
|
||||
<condition operation="like" column="extra_vars10" var="s_extra_vars10" pipe="or" />
|
||||
<condition operation="like" column="extra_vars11" var="s_extra_vars11" pipe="or" />
|
||||
<condition operation="like" column="extra_vars12" var="s_extra_vars12" pipe="or" />
|
||||
<condition operation="like" column="extra_vars13" var="s_extra_vars13" pipe="or" />
|
||||
<condition operation="like" column="extra_vars14" var="s_extra_vars14" pipe="or" />
|
||||
<condition operation="like" column="extra_vars15" var="s_extra_vars15" pipe="or" />
|
||||
<condition operation="like" column="extra_vars16" var="s_extra_vars16" pipe="or" />
|
||||
<condition operation="like" column="extra_vars17" var="s_extra_vars17" pipe="or" />
|
||||
<condition operation="like" column="extra_vars18" var="s_extra_vars18" pipe="or" />
|
||||
<condition operation="like" column="extra_vars19" var="s_extra_vars19" pipe="or" />
|
||||
<condition operation="like" column="extra_vars20" var="s_extra_vars20" pipe="or" />
|
||||
</group>
|
||||
</conditions>
|
||||
<navigation>
|
||||
|
|
|
|||
|
|
@ -31,5 +31,25 @@
|
|||
<column name="allow_comment" var="allow_comment" default="Y" />
|
||||
<column name="lock_comment" var="lock_comment" default="N" />
|
||||
<column name="allow_trackback" var="allow_trackback" default="Y" />
|
||||
<column name="extra_vars1" var="extra_vars1" />
|
||||
<column name="extra_vars2" var="extra_vars2" />
|
||||
<column name="extra_vars3" var="extra_vars3" />
|
||||
<column name="extra_vars4" var="extra_vars4" />
|
||||
<column name="extra_vars5" var="extra_vars5" />
|
||||
<column name="extra_vars6" var="extra_vars6" />
|
||||
<column name="extra_vars7" var="extra_vars7" />
|
||||
<column name="extra_vars8" var="extra_vars8" />
|
||||
<column name="extra_vars9" var="extra_vars9" />
|
||||
<column name="extra_vars10" var="extra_vars10" />
|
||||
<column name="extra_vars11" var="extra_vars11" />
|
||||
<column name="extra_vars12" var="extra_vars12" />
|
||||
<column name="extra_vars13" var="extra_vars13" />
|
||||
<column name="extra_vars14" var="extra_vars14" />
|
||||
<column name="extra_vars15" var="extra_vars15" />
|
||||
<column name="extra_vars16" var="extra_vars16" />
|
||||
<column name="extra_vars17" var="extra_vars17" />
|
||||
<column name="extra_vars18" var="extra_vars18" />
|
||||
<column name="extra_vars19" var="extra_vars19" />
|
||||
<column name="extra_vars20" var="extra_vars20" />
|
||||
</columns>
|
||||
</query>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,26 @@
|
|||
<column name="allow_comment" var="allow_comment" default="Y" />
|
||||
<column name="lock_comment" var="lock_comment" default="N" />
|
||||
<column name="allow_trackback" var="allow_trackback" default="Y" />
|
||||
<column name="extra_vars1" var="extra_vars1" />
|
||||
<column name="extra_vars2" var="extra_vars2" />
|
||||
<column name="extra_vars3" var="extra_vars3" />
|
||||
<column name="extra_vars4" var="extra_vars4" />
|
||||
<column name="extra_vars5" var="extra_vars5" />
|
||||
<column name="extra_vars6" var="extra_vars6" />
|
||||
<column name="extra_vars7" var="extra_vars7" />
|
||||
<column name="extra_vars8" var="extra_vars8" />
|
||||
<column name="extra_vars9" var="extra_vars9" />
|
||||
<column name="extra_vars10" var="extra_vars10" />
|
||||
<column name="extra_vars11" var="extra_vars11" />
|
||||
<column name="extra_vars12" var="extra_vars12" />
|
||||
<column name="extra_vars13" var="extra_vars13" />
|
||||
<column name="extra_vars14" var="extra_vars14" />
|
||||
<column name="extra_vars15" var="extra_vars15" />
|
||||
<column name="extra_vars16" var="extra_vars16" />
|
||||
<column name="extra_vars17" var="extra_vars17" />
|
||||
<column name="extra_vars18" var="extra_vars18" />
|
||||
<column name="extra_vars19" var="extra_vars19" />
|
||||
<column name="extra_vars20" var="extra_vars20" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="document_srl" var="document_srl" filter="number" notnull="notnull" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue