삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
28
modules/integration_search/conf/info.xml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module version="0.1">
|
||||
<title xml:lang="ko">통합검색</title>
|
||||
<title xml:lang="zh-CN">搜索</title>
|
||||
<title xml:lang="jp">統合検索</title>
|
||||
<title xml:lang="en">Integration Search</title>
|
||||
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 7. 24">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<description xml:lang="ko">
|
||||
선택한 모듈들을 대상으로 통합검색을 지원합니다.
|
||||
선택된 모듈의 글중 비밀글만 검색을 하지 않고 나머지는 모두 검색을 하기에 공개되지 않은 모듈은 대상에 포함하지 않도록 하셔야 합니다.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
把被选模块作为搜索对象进行搜索。
|
||||
被选模块当中只有密帖不会被搜索,因此请注意选择您不想搜索的模块。
|
||||
</description>
|
||||
<description xml:lang="jp">
|
||||
選択されたモジュールを対象に統合検索を行う機能をサポートします。選択されたモジュールのコンテンツ(書き込み)の中で、非公開コンテンツのみ検索から除外されますので、未公開のモジュールは対象にしないようにしてください。
|
||||
</description>
|
||||
<description xml:lang="en">
|
||||
It supports integration search for chosen modules.
|
||||
All articles except secret articles will be searched, so you need to be careful not to include secret module to target .
|
||||
</description>
|
||||
</author>
|
||||
</module>
|
||||
26
modules/integration_search/conf/module.xml
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<grants>
|
||||
<grant name="list" default="guest">
|
||||
<title xml:lang="ko">목록</title>
|
||||
<title xml:lang="zh-CN">目录</title>
|
||||
<title xml:lang="jp">リスト</title>
|
||||
<title xml:lang="en">list</title>
|
||||
</grant>
|
||||
<grant name="manager" default="root">
|
||||
<title xml:lang="ko">관리</title>
|
||||
<title xml:lang="zh-CN">管理</title>
|
||||
<title xml:lang="jp">管理</title>
|
||||
<title xml:lang="en">manager</title>
|
||||
</grant>
|
||||
</grants>
|
||||
<actions>
|
||||
<action name="IS" type="view" standalone="true" />
|
||||
<action name="dispIntegration_searchAdminContent" type="view" admin_index="true" />
|
||||
<action name="dispIntegration_searchAdminGrantInfo" type="view" />
|
||||
<action name="dispIntegration_searchAdminSkinInfo" type="view" />
|
||||
|
||||
<action name="procIntegration_searchAdminInsertConfig" type="controller" />
|
||||
<action name="procIntegration_searchAdminInsertSkin" type="controller" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
<?php
|
||||
/**
|
||||
* @class integration_searchAdminController
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief integration_search module의 admin view class
|
||||
*
|
||||
* 통합검색 관리
|
||||
*
|
||||
**/
|
||||
|
||||
class integration_searchAdminController extends integration_search {
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {}
|
||||
|
||||
/**
|
||||
* @brief 설정 저장
|
||||
**/
|
||||
function procIntegration_searchAdminInsertConfig() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args->skin = Context::get('skin');
|
||||
$args->target_mid = explode('|@|',Context::get('target_mid'));
|
||||
$args->skin_vars = $config->skin_vars;
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
return $oModuleController->insertModuleConfig('integration_search',$args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스킨 정보 저장
|
||||
**/
|
||||
function procIntegration_searchAdminInsertSkin() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args->skin = $config->skin;
|
||||
$args->target_mid = $config->target_mid;
|
||||
|
||||
// 스킨의 정보를 구해옴 (extra_vars를 체크하기 위해서)
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $config->skin);
|
||||
|
||||
// 입력받은 변수들을 체크 (mo, act, module_srl, page등 기본적인 변수들 없앰)
|
||||
$obj = Context::getRequestVars();
|
||||
unset($obj->act);
|
||||
unset($obj->module_srl);
|
||||
unset($obj->page);
|
||||
|
||||
// 원 skin_info에서 extra_vars의 type이 image일 경우 별도 처리를 해줌
|
||||
if($skin_info->extra_vars) {
|
||||
foreach($skin_info->extra_vars as $vars) {
|
||||
if($vars->type!='image') continue;
|
||||
|
||||
$image_obj = $obj->{$vars->name};
|
||||
|
||||
// 삭제 요청에 대한 변수를 구함
|
||||
$del_var = $obj->{"del_".$vars->name};
|
||||
unset($obj->{"del_".$vars->name});
|
||||
if($del_var == 'Y') {
|
||||
@unlink($module_info->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
|
||||
// 업로드 되지 않았다면 이전 데이터를 그대로 사용
|
||||
if(!$image_obj['tmp_name']) {
|
||||
$obj->{$vars->name} = $module_info->{$vars->name};
|
||||
continue;
|
||||
}
|
||||
|
||||
// 정상적으로 업로드된 파일이 아니면 무시
|
||||
if(!is_uploaded_file($image_obj['tmp_name'])) {
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
|
||||
// 이미지 파일이 아니어도 무시
|
||||
if(!eregi("\.(jpg|jpeg|gif|png)$", $image_obj['name'])) {
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
|
||||
// 경로를 정해서 업로드
|
||||
$path = sprintf("./files/attach/images/%s/", $module_srl);
|
||||
|
||||
// 디렉토리 생성
|
||||
if(!FileHandler::makeDir($path)) return false;
|
||||
|
||||
$filename = $path.$image_obj['name'];
|
||||
|
||||
// 파일 이동
|
||||
if(!move_uploaded_file($image_obj['tmp_name'], $filename)) {
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
|
||||
// 변수를 바꿈
|
||||
unset($obj->{$vars->name});
|
||||
$obj->{$vars->name} = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
// serialize하여 저장
|
||||
$args->skin_vars = serialize($obj);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
return $oModuleController->insertModuleConfig('integration_search',$args);
|
||||
}
|
||||
}
|
||||
?>
|
||||
71
modules/integration_search/integration_search.admin.view.php
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
/**
|
||||
* @class integration_searchAdminView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief integration_search module의 admin view class
|
||||
*
|
||||
* 통합검색 관리
|
||||
*
|
||||
**/
|
||||
|
||||
class integration_searchAdminView extends integration_search {
|
||||
|
||||
var $config = null;
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$this->config = $oModuleModel->getModuleConfig('integration_search');
|
||||
if(!$this->config->target_mid) $this->config->target_mid = array();
|
||||
Context::set('config',$this->config);
|
||||
|
||||
$this->setTemplatePath($this->module_path."/tpl/");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈 선정 및 스킨 설정
|
||||
**/
|
||||
function dispIntegration_searchAdminContent() {
|
||||
// 스킨 목록을 구해옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins($this->module_path);
|
||||
Context::set('skin_list',$skin_list);
|
||||
|
||||
// 생성된 mid목록을 구함
|
||||
$mid_list = $oModuleModel->getMidList();
|
||||
Context::set('mid_list',$mid_list);
|
||||
|
||||
// 샘플코드
|
||||
Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword" class="inputTypeText" value="{$is_keyword}" /><span class="button"><input type="submit" value="{$lang->cmd_search}" /></span></a>') );
|
||||
|
||||
$this->setTemplateFile("index");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 스킨 설정
|
||||
**/
|
||||
function dispIntegration_searchAdminSkinInfo() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $this->config->skin);
|
||||
$skin_vars = unserialize($this->config->skin_vars);
|
||||
|
||||
// skin_info에 extra_vars 값을 지정
|
||||
if(count($skin_info->extra_vars)) {
|
||||
foreach($skin_info->extra_vars as $key => $val) {
|
||||
$name = $val->name;
|
||||
$type = $val->type;
|
||||
$value = $skin_vars->{$name};
|
||||
if($type=="checkbox"&&!$value) $value = array();
|
||||
$skin_info->extra_vars[$key]->value= $value;
|
||||
}
|
||||
}
|
||||
Context::set('skin_info', $skin_info);
|
||||
Context::set('skin_vars', $skin_vars);
|
||||
|
||||
$this->setTemplateFile("skin_info");
|
||||
}
|
||||
}
|
||||
?>
|
||||
47
modules/integration_search/integration_search.class.php
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
<?php
|
||||
/**
|
||||
* @class integration_search
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief integration_search module의 view class
|
||||
**/
|
||||
|
||||
class integration_search extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('integration_search', 'view', 'IS');
|
||||
$oModuleController->insertActionForward('integration_search', 'view', 'dispIntegration_searchAdminContent');
|
||||
$oModuleController->insertActionForward('integration_search', 'view', 'dispIntegration_searchAdminSkinInfo');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
**/
|
||||
function checkUpdate() {
|
||||
// IS act의 여부 체크 (2007. 7. 24 추가)
|
||||
$oModuleModel = &getModel('module');
|
||||
$act = $oModuleModel->getActionForward('dispIntegration_searchAdminSkinInfo');
|
||||
if(!$act) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('integration_search', 'view', 'IS');
|
||||
$oModuleController->insertActionForward('integration_search', 'view', 'dispIntegration_searchAdminContent');
|
||||
$oModuleController->insertActionForward('integration_search', 'view', 'dispIntegration_searchAdminSkinInfo');
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
107
modules/integration_search/integration_search.view.php
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
<?php
|
||||
/**
|
||||
* @class integration_searchView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief integration_search module의 view class
|
||||
*
|
||||
* 통합검색 출력
|
||||
*
|
||||
**/
|
||||
|
||||
class integration_searchView extends integration_search {
|
||||
|
||||
var $target_mid = array();
|
||||
var $skin = 'default';
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
// 설정 정보를 받아옴 (module model 객체를 이용)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$this->target_mid = $config->target_mid;
|
||||
if(!$this->target_mid) $this->target_mid = array();
|
||||
|
||||
$this->skin = $config->skin;
|
||||
$this->module_info = unserialize($config->skin_vars);
|
||||
Context::set('module_info', $this->module_info);
|
||||
|
||||
$this->setTemplatePath($this->module_path."/skins/".$this->skin."/");
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 통합 검색 출력
|
||||
**/
|
||||
function IS() {
|
||||
// 검색이 가능한 목록을 구하기 위해 전체 목록을 구해옴
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_list = $oModuleModel->getMidList($args);
|
||||
|
||||
// 대상 모듈을 정리함
|
||||
$module_srl_list = array();
|
||||
foreach($module_list as $mid => $val) {
|
||||
$mid_list[$val->module_srl] = $val;
|
||||
if(in_array($mid, $this->target_mid)) {
|
||||
$module_srl_list[] = $val->module_srl;
|
||||
}
|
||||
}
|
||||
|
||||
// 검색대상 변수 설정
|
||||
$search_target = Context::get('search_target');
|
||||
if(!in_array($search_target, array('title','content','title_content','comment'))) $search_target = 'title';
|
||||
|
||||
// 검색어 변수 설정
|
||||
$is_keyword = Context::get('is_keyword');
|
||||
|
||||
// 페이지 변수 설정
|
||||
$page = (int)Context::get('page');
|
||||
if(!$page) $page = 1;
|
||||
|
||||
|
||||
$list_count = (int)Context::get('list_count');
|
||||
if(!$list_count|| $list_count>20) $list_count = 20;
|
||||
|
||||
// 출력할 컨텐츠 추출을 위한 인자 정리
|
||||
$args->module_srl = implode(',',$module_srl_list);
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = $search_target;
|
||||
$args->search_keyword = Context::get('is_keyword');
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
|
||||
// 검색글이 있을 경우 검색 시도
|
||||
if($args->search_keyword) {
|
||||
|
||||
// 대상이 comment이면 댓글 검색 시도
|
||||
if($search_target == 'comment') {
|
||||
|
||||
// 그외는 문서 검색 시도
|
||||
} else {
|
||||
// 대상 문서들을 가져옴
|
||||
$oDocumentModel = &getModel('document');
|
||||
$output = $oDocumentModel->getDocumentList($args);
|
||||
Context::set('total_count', $output->total_count);
|
||||
Context::set('total_page', $output->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('document_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
}
|
||||
}
|
||||
|
||||
// 텍스트 생성
|
||||
if(Context::getLangType()=='en')
|
||||
$result_text = sprintf(Context::getLang("is_result_text"), $output->total_count, $is_keyword);
|
||||
else
|
||||
$result_text = sprintf(Context::getLang("is_result_text"), $is_keyword, $output->total_count);
|
||||
Context::set('result_text', $result_text);
|
||||
Context::set('mid_list', $mid_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
$this->setTemplateFile('index');
|
||||
}
|
||||
}
|
||||
?>
|
||||
30
modules/integration_search/lang/en.lang.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/integration_search/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief English Language Pack (For only basic things)
|
||||
**/
|
||||
|
||||
$lang->integration_search = "Integration Search";
|
||||
|
||||
$lang->sample_code = "Sample Code";
|
||||
$lang->about_target_module = "Only chosen modules are the target. Please be careful on setting authority";
|
||||
$lang->about_sample_code = "You can add integration search on layout by adding code above";
|
||||
$lang->msg_no_keyword = "Input keyword to search";
|
||||
|
||||
$lang->is_result_text = "There are <strong>%d</strong> result(s) for <strong>'%s'</strong>";
|
||||
|
||||
$lang->is_search_option = array(
|
||||
'title' => 'Subject',
|
||||
'content' => 'Content',
|
||||
'title_content' => 'Subject+Content',
|
||||
//'comment' => '댓글',
|
||||
);
|
||||
|
||||
$lang->is_sort_option = array(
|
||||
'regdate' => 'Registered Date',
|
||||
'comment_count' => 'Number of Comments',
|
||||
'readed_count' => 'Number of Hits',
|
||||
'voted_count' => 'Number of Votes',
|
||||
);
|
||||
?>
|
||||
30
modules/integration_search/lang/jp.lang.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/integration_search/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com> 翻訳:RisaPapa
|
||||
* @brief 日本語言語パッケージ(基本的な内容のみう)
|
||||
**/
|
||||
|
||||
$lang->integration_search = "統合検索";
|
||||
|
||||
$lang->sample_code = "サンプルコード";
|
||||
$lang->about_target_module = "選択されたモジュールのみを検索対象とします。権限設定に注意してください。";
|
||||
$lang->about_sample_code = "上のコードをレイアウトなどに追加すると統合検索が可能になります。";
|
||||
$lang->msg_no_keyword = "検索語を入力してください。";
|
||||
|
||||
$lang->is_result_text = "<strong>'%s'</strong>に対する検索結果<strong>%d</strong>件";
|
||||
|
||||
$lang->is_search_option = array(
|
||||
'title' => 'タイトル',
|
||||
'content' => '内容',
|
||||
'title_content' => 'タイトル+内容',
|
||||
//'comment' => 'コメント',
|
||||
);
|
||||
|
||||
$lang->is_sort_option = array(
|
||||
'regdate' => '登録日',
|
||||
'comment_count' => 'コメント数',
|
||||
'readed_count' => '照合数',
|
||||
'voted_count' => '推薦数',
|
||||
);
|
||||
?>
|
||||
30
modules/integration_search/lang/ko.lang.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/integration_search/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 한국어 언어팩 (기본적인 내용만 수록)
|
||||
**/
|
||||
|
||||
$lang->integration_search = "통합검색";
|
||||
|
||||
$lang->sample_code = "샘플코드";
|
||||
$lang->about_target_module = "선택된 모듈만 검색 대상으로 정합니다. 권한설정에 대한 주의를 바랍니다";
|
||||
$lang->about_sample_code = "위 코드를 레이아웃등에 추가하시면 통합검색이 가능합니다";
|
||||
$lang->msg_no_keyword = "검색어를 입력해주세요";
|
||||
|
||||
$lang->is_result_text = "<strong>'%s'</strong> 에 대한 검색결과 <strong>%d</strong>건";
|
||||
|
||||
$lang->is_search_option = array(
|
||||
'title' => '제목',
|
||||
'content' => '내용',
|
||||
'title_content' => '제목+내용',
|
||||
//'comment' => '댓글',
|
||||
);
|
||||
|
||||
$lang->is_sort_option = array(
|
||||
'regdate' => '등록일',
|
||||
'comment_count' => '댓글수',
|
||||
'readed_count' => '조회수',
|
||||
'voted_count' => '추천수',
|
||||
);
|
||||
?>
|
||||
29
modules/integration_search/lang/zh-CN.lang.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/integration_search/lang/ko.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 简体中文语言包
|
||||
**/
|
||||
|
||||
$lang->integration_search = "搜索";
|
||||
|
||||
$lang->sample_code = "代码";
|
||||
$lang->about_target_module = "只把被选模块作为搜索对象。请注意权限设置。";
|
||||
$lang->about_sample_code = "可把上述代码插入到相应布局当中即可实现搜索功能。";
|
||||
|
||||
$lang->is_result_text = "符合<strong>'%s'</strong>的搜索结果约有<strong>%d</strong>项";
|
||||
|
||||
$lang->is_search_option = array(
|
||||
'title' => '标题',
|
||||
'content' => '内容',
|
||||
'title_content' => '标题+内容',
|
||||
//'comment' => '评论',
|
||||
);
|
||||
|
||||
$lang->is_sort_option = array(
|
||||
'regdate' => '日期',
|
||||
'comment_count' => '评论',
|
||||
'readed_count' => '查看',
|
||||
'voted_count' => '推荐',
|
||||
);
|
||||
?>
|
||||
49
modules/integration_search/skins/default/css/white.css
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
@charset "utf-8";
|
||||
#spot { border:8px solid #cecece; width:754px; height:64px; position:relative; margin:0 -15px 30px 0;}
|
||||
#spot h2 { position:absolute; top:24px; left:-8px;}
|
||||
#spot .search { text-align:center; position:relative; top:22px;}
|
||||
#spot .search * { vertical-align:middle;}
|
||||
#spot .search select { margin-top:1px;}
|
||||
#spot .search .inputText { border:1px solid #b6b6b6; padding:2px 3px; width:252px; height:14px;}
|
||||
#spot .search .submit {}
|
||||
|
||||
#content { width:100%; overflow:hidden; position:relative;}
|
||||
#content h3.result { width:100%; height:23px; border-bottom:1px solid #cecece; _margin-top:-2px; margin-bottom:23px; margin-left:15px;}
|
||||
*:first-child+html #content h3.result { margin-top:-2px;}
|
||||
#content h3.result strong { color:#ff1a00;}
|
||||
#content .sortBy { position:absolute; top:0; right:0; overflow:hidden;}
|
||||
#content .sortBy li { list-style:none; float:left; padding:0 6px; position:relative; right:-6px; background:url(../images/white/vrType2.gif) no-repeat right 1px;}
|
||||
#content .sortBy li a { display:block; float:left; padding-left:9px; color:#3e3e3e; white-space:nowrap; background:url(../images/white/bulletSortBy.gif) no-repeat left 4px; text-decoration:none; }
|
||||
#content .sortBy li.on a { color:#ff1a00; background:url(../images/white/bulletSortByOn.gif) no-repeat left 4px;}
|
||||
|
||||
.searchResult { margin-left:15px;}
|
||||
.searchResult li { width:100%; margin-bottom:29px; clear:both; overflow:hidden;list-style:none; }
|
||||
.searchResult li .thumb { display:block; float:left; margin-right:14px;}
|
||||
.searchResult li dl {}
|
||||
.searchResult li dl dt { color:#d8d8d8; margin-bottom:1px;}
|
||||
.searchResult li dl dt a { color:#1a3588; text-decoration:underline;}
|
||||
.searchResult li dl dt .reply { color:#fe6700; font:.9em Tahoma;}
|
||||
.searchResult li dl dt .reply em { color:#fe6700; font:bold 1em Tahoma;}
|
||||
.searchResult li dl dt .category { color:#818181;}
|
||||
.searchResult li dl dt .category a { color:#818181; border:none; text-decoration:none;}
|
||||
.searchResult li dl dd { line-height:18px; color:#555555; margin-bottom:4px;}
|
||||
.searchResult li address { color:#d8d8d8; font-size:11px;}
|
||||
.searchResult li address strong { color:#3e3e3e; font-size:1em; font-weight:normal;}
|
||||
.searchResult li address img { vertical-align:middle; margin-right:2px;}
|
||||
.searchResult li address .time { color:#818181; font:.8em Tahoma;}
|
||||
.searchResult li address .read { font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#818181;}
|
||||
.searchResult li address .readNum { color:#818181; font:.8em Tahoma;}
|
||||
.searchResult li address .recom { font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#818181;}
|
||||
.searchResult li address .recomNum { color:#fe6700; font:bold .8em Tahoma;}
|
||||
|
||||
/* pageNavigation */
|
||||
.pageNavigation { position:relative; display:block; text-align:center; font:bold .8em Tahoma; }
|
||||
.pageNavigation a { position:relative; margin-left:-4px; font:bold 1em Tahoma; color:#666666; display:inline-block; padding:1px 7px 2px 6px; border-left:1px solid #dedfde; border-right:1px solid #CCCCCC; text-decoration:none; line-height:1em; }
|
||||
.pageNavigation a:hover { background:#F7F7F7; text-decoration:none; }
|
||||
.pageNavigation a:visited { color:#999999;}
|
||||
.pageNavigation a.goToFirst,
|
||||
.pageNavigation a.goToLast { border:none; border-right:1px solid #ffffff; border-left:1px solid #ffffff; z-index:99; vertical-align:top; padding:0px 7px 4px 6px;}
|
||||
.pageNavigation a.goToFirst img,
|
||||
.pageNavigation a.goToLast img { display:inline-block; padding:2px 0; position:relative; top:2px; _top:1px;}
|
||||
.pageNavigation .current { position:relative; margin-left:-4px; font:bold 1em Tahoma; color:#ff6600; display:inline-block; padding:1px 7px 1px 6px; border-left:1px solid #dedfde; border-right:1px solid #CCCCCC; text-decoration:none; line-height:1em; }
|
||||
|
||||
|
After Width: | Height: | Size: 51 B |
|
After Width: | Height: | Size: 51 B |
|
After Width: | Height: | Size: 46 B |
|
After Width: | Height: | Size: 46 B |
|
After Width: | Height: | Size: 928 B |
|
After Width: | Height: | Size: 756 B |
|
After Width: | Height: | Size: 44 B |
74
modules/integration_search/skins/default/index.html
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<!-- 컬러셋 체크 -->
|
||||
<!--@if($module_info->colorset != "white")-->
|
||||
{@$module_info->colorset = "white"}
|
||||
<!--@end-->
|
||||
|
||||
<!-- CSS 파일 로드 (컬러셋에 따라서) -->
|
||||
<!--@if($module_info->colorset == "white")-->
|
||||
<!--%import("css/white.css")-->
|
||||
<!--@end-->
|
||||
|
||||
<div id="spot">
|
||||
<h2><img src="./images/white/h2Search.gif" alt="검색하기" width="82" height="17" /></h2>
|
||||
<form action="{getUrl()}" method="post" class="search">
|
||||
<input type="hidden" name="mid" value="{$mid}" />
|
||||
<input type="hidden" name="act" value="IS" />
|
||||
<select name="search_target">
|
||||
<!--@foreach($lang->is_search_option as $key => $val)-->
|
||||
<option value="{$key}" <!--@if($search_target == $key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<input name="is_keyword" type="text" class="inputText" value="{htmlspecialchars($is_keyword)}"/>
|
||||
<input type="image" src="./images/white/buttonSearch2.gif" alt="검색" class="submit" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!--@if(!$document_list)-->
|
||||
<div id="content">
|
||||
<!--@if(!$is_keyword)-->
|
||||
<h3 class="result">{$lang->msg_no_keyword}</h3>
|
||||
<!--@else-->
|
||||
<h3 class="result">{$lang->msg_no_result}</h3>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@else-->
|
||||
<div id="content">
|
||||
<h3 class="result">{$result_text}</h3>
|
||||
<!--
|
||||
<ul class="sortBy">
|
||||
<!--@foreach($lang->is_sort_option as $key => $val)-->
|
||||
<li class="on"><a href="#">{$val}</a></li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
-->
|
||||
<ul class="searchResult">
|
||||
<!--@foreach($document_list as $no => $document)-->
|
||||
<li>
|
||||
<!--@if($document->thumbnailExists(100))-->
|
||||
<a href="{getUrl('','document_srl',$document->document_srl)}" onclick="window.open(this.href);return false;"><img src="{$document->getThumbnail(100)}" alt="" width="100" height="100" class="thumb" /></a>
|
||||
<!--@end-->
|
||||
<dl>
|
||||
<dt><a href="{getUrl('','document_srl',$document->document_srl)}" onclick="window.open(this.href);return false;">{$document->getTitleText()}</a> <!--@if($document->getCommentCount())--><span class="reply">[<em>{$document->getCommentCount()}</em>]</span> <!--@end--> | <span class="category"><a href="{getUrl('','mid',$mid_list[$document->get('module_srl')]->mid)}" onclick="window.open(this.href);return false;">{$mid_list[$document->get('module_srl')]->browser_title}</a></span></dt>
|
||||
|
||||
<dd>{$document->getSummary(140)}</dd>
|
||||
</dl>
|
||||
<address><strong>{$document->getNickName()}</strong> | <span class="time">{$document->getRegdate("Y-m-d H:i")}</span> | <span class="read">{$lang->readed_count}</span> <span class="readNum">{$document->get('readed_count')}</span><!--@if($document->get('voted_count'))--> | <span class="recom">{$lang->voted_count}</span> <span class="recomNum">{$document->get('voted_count')}</span><!--@end--></address>
|
||||
|
||||
</li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
<div class="pageNavigation">
|
||||
<a href="{getUrl('page','','document_srl','','search_target',$search_target,'is_keyword',urlencode($is_keyword))}" class="goToFirst"><img src="./images/{$module_info->colorset}/bottomGotoFirst.gif" alt="{$lang->first_page}" width="7" height="5" /></a>
|
||||
<!--@while($page_no = $page_navigation->getNextPage())-->
|
||||
<!--@if($page == $page_no)-->
|
||||
<span class="current">{$page_no}</span>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('page',$page_no,'document_srl','','search_target',$search_target,'is_keyword',urlencode($is_keyword))}">{$page_no}</a>
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
<a href="{getUrl('page',$page_navigation->last_page,'document_srl','','search_target',$search_target,'is_keyword',urlencode($is_keyword))}" class="goToLast"><img src="./images/{$module_info->colorset}/bottomGotoLast.gif" alt="{$lang->last_page}" width="7" height="5" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!--@end-->
|
||||
37
modules/integration_search/skins/default/skin.xml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<skin>
|
||||
<title xml:lang="ko">통합 검색 기본 스킨</title>
|
||||
<title xml:lang="zh-CN">搜索默认皮肤</title>
|
||||
<title xml:lang="jp">統合検索のデフォルトスキン</title>
|
||||
<title xml:lang="en">Default Skin of Integration Search</title>
|
||||
<maker email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 7. 24">
|
||||
<name xml:lang="ko">제로</name>
|
||||
<name xml:lang="zh-CN">zero</name>
|
||||
<name xml:lang="jp">Zero</name>
|
||||
<name xml:lang="en">zero</name>
|
||||
<description xml:lang="ko">통합검색 모듈의 기본 스킨</description>
|
||||
<description xml:lang="zh-CN">搜索模块的默认皮肤。</description>
|
||||
<description xml:lang="jp">統合検索モジュールのデフォルトスキンです。</description>
|
||||
<description xml:lang="en">Default skin of integration search module</description>
|
||||
</maker>
|
||||
<colorset>
|
||||
<color name="normal" src="screenshot/normal.gif">
|
||||
<title xml:lang="ko">기본</title>
|
||||
<title xml:lang="zh-CN">默认</title>
|
||||
<title xml:lang="jp">デフォルト</title>
|
||||
<title xml:lang="en">Default</title>
|
||||
</color>
|
||||
</colorset>
|
||||
<extra_vars>
|
||||
<var name="memo" type="textarea">
|
||||
<title xml:lang="ko">설명</title>
|
||||
<title xml:lang="zh-CN">说明</title>
|
||||
<title xml:lang="jp">説明</title>
|
||||
<title xml:lang="en">Description</title>
|
||||
<description lang="ko">검색결과 상단에 결과가 출력됩니다.</description>
|
||||
<description lang="zh-CN">显示在搜索结果上端。</description>
|
||||
<description lang="jp">検索結果が上段に表示されます。</description>
|
||||
<description lang="en">Result will be displayed on top of search result.</description>
|
||||
</var>
|
||||
</extra_vars>
|
||||
</skin>
|
||||
5
modules/integration_search/tpl/filter/insert_config.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<filter name="insert_config" module="integration_search" act="procIntegration_searchAdminInsertConfig" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<parameter />
|
||||
<response />
|
||||
</filter>
|
||||
14
modules/integration_search/tpl/header.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<!--%import("js/integration_search_admin.js")-->
|
||||
|
||||
<h3>{$lang->integration_search} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<div class="header4">
|
||||
<ul class="localNavigation">
|
||||
<li <!--@if($act=='dispIntegration_searchAdminContent')-->class="on"<!--@end-->><a href="{getUrl('act','dispIntegration_searchAdminContent')}">{$lang->cmd_setup}</a></li>
|
||||
<li <!--@if($act=='dispIntegration_searchAdminSkinInfo')-->class="on"<!--@end-->><a href="{getUrl('act','dispIntegration_searchAdminSkinInfo')}">{$lang->cmd_manage_skin}</a></li>
|
||||
<!--@if($module!='admin')-->
|
||||
<li><a href="{getUrl('act','IS')}">{$lang->cmd_back}</a></li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
40
modules/integration_search/tpl/index.html
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
<!--#include("header.html")-->
|
||||
<!--%import("filter/insert_config.xml")-->
|
||||
|
||||
<form action="./" method="get" onsubmit="return procFilter(this, insert_config)">
|
||||
<table cellspacing="0" class="tableType2">
|
||||
<col width="150" />
|
||||
<col />
|
||||
<tr>
|
||||
<th scope="row">{$lang->sample_code}</th>
|
||||
<td>
|
||||
<textarea class="inputTypeTextArea w400" readonly="readonly">{$sample_code}</textarea>
|
||||
<p>{$lang->about_sample_code}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin}</th>
|
||||
<td>
|
||||
<select name="skin">
|
||||
<!--@foreach($skin_list as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if($config->skin==$key)-->selected="selected"<!--@end-->>{$val->title}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<p>{$lang->about_skin}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->module}</th>
|
||||
<td>
|
||||
<p>{$lang->about_target_module}</p>
|
||||
<!--@foreach($mid_list as $key => $val)-->
|
||||
<p><input type="checkbox" name="target_mid" value="{$key}" id="target_mid_{$key}" <!--@if(in_array($key,$config->target_mid))-->checked="checked"<!--@end--> /> <label for="target_mid_{$key}">{$val->browser_title} ({$val->mid})</label></p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="tRight gap1">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
/**
|
||||
* @file modules/board/js/board_admin.js
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief integration_search 모듈의 관리자용 javascript
|
||||
**/
|
||||
|
||||
/* 권한 관련 */
|
||||
function doSelectAll(obj, key) {
|
||||
var fo_obj = obj.parentNode;
|
||||
while(fo_obj.nodeName != 'FORM') {
|
||||
fo_obj = fo_obj.parentNode;
|
||||
}
|
||||
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
var tobj = fo_obj[i];
|
||||
if(tobj.name == key) tobj.checked=true;
|
||||
}
|
||||
}
|
||||
|
||||
function doUnSelectAll(obj, key) {
|
||||
var fo_obj = obj.parentNode;
|
||||
while(fo_obj.nodeName != 'FORM') {
|
||||
fo_obj = fo_obj.parentNode;
|
||||
}
|
||||
|
||||
for(var i=0;i<fo_obj.length;i++) {
|
||||
var tobj = fo_obj[i];
|
||||
if(tobj.name == key) tobj.checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
116
modules/integration_search/tpl/skin_info.html
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
<!--#include("./header.html")-->
|
||||
|
||||
<form action="./" method="post" enctype="multipart/form-data" target="hidden_iframe">
|
||||
<input type="hidden" name="module" value="integration_search" />
|
||||
<input type="hidden" name="act" value="procIntegration_searchAdminInsertSkin" />
|
||||
|
||||
<table cellspacing="0" class="tableType3">
|
||||
<col width="150" />
|
||||
<col />
|
||||
<tr>
|
||||
<th scope="row" colspan="2">{$lang->skin_default_info}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin}</th>
|
||||
<td class="left" >{$skin_info->title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin_maker}</th>
|
||||
<td class="left" >{$skin_info->maker->name} <!--@if($skin_info->maker->email_address)-->(<a href="mailto:{$skin_info->maker->email_address}">{$skin_info->maker->email_address}</a>)<!--@end--></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin_maker_homepage}</th>
|
||||
<td class="left" ><a href="{$skin_info->maker->homepage}" target="_blank">{$skin_info->maker->homepage}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->date}</th>
|
||||
<td class="left" >{$skin_info->maker->date}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->description}</th>
|
||||
<td class="left" >{nl2br($skin_info->maker->description)}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table cellspacing="0" class="tableType3">
|
||||
<col width="150" />
|
||||
<col />
|
||||
<tr>
|
||||
<th scope="row" colspan="2">{$lang->extra_vars}</th>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row">{$lang->colorset}</th>
|
||||
<td class="left" >
|
||||
<!--@foreach($skin_info->colorset as $key => $val)-->
|
||||
<div>
|
||||
<!--@if($val->screenshot)-->
|
||||
<img src="{$val->screenshot}" align="left" alt="{$val->title}" />
|
||||
<!--@end-->
|
||||
|
||||
<input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" <!--@if($skin_vars->colorset==$val->name)-->checked="checked"<!--@end-->/>
|
||||
<label for="colorset_{$key}">{$val->title}</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!--@foreach($skin_info->extra_vars as $key => $val)-->
|
||||
<tr>
|
||||
<th scope="row">{$val->title}</th>
|
||||
<td class="left">
|
||||
<!--@if($val->type=="text")-->
|
||||
<input type="text" name="{$val->name}" value="{htmlspecialchars($val->value)}" class="inputTypeText w100" />
|
||||
|
||||
<!--@elseif($val->type=="textarea")-->
|
||||
<textarea name="{$val->name}" class="inputTypeTextArea w100">{htmlspecialchars($val->value)}</textarea>
|
||||
|
||||
<!--@elseif($val->type=="select")-->
|
||||
<select name="{$val->name}">
|
||||
<!--@foreach($val->default as $k=>$v)-->
|
||||
<option value="{$v}" <!--@if($v==$val->value)-->selected="selected"<!--@end-->>{$v}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
|
||||
<!--@elseif($val->type=="checkbox")-->
|
||||
<!--@foreach($val->default as $k=>$v)-->
|
||||
<span>
|
||||
<input type="checkbox" name="{$val->name}[]" value="{$v}" id="ch_{$key}_{$k}" <!--@if(in_array($v, $val->value))-->checked="checked"<!--@end--> class="checkbox" />
|
||||
<label for="ch_{$key}_{$k}">{$v}</label>
|
||||
</span>
|
||||
<!--@end-->
|
||||
|
||||
<!--@elseif($val->type=="radio")-->
|
||||
<!--@foreach($val->default as $k=>$v)-->
|
||||
<span>
|
||||
<input type="radio" name="{$val->name}" value="{$v}" id="ch_{$key}_{$k}" <!--@if($v==$val->value)-->checked="checked"<!--@end-->/>
|
||||
<label for="ch_{$key}_{$k}">{$v}</label>
|
||||
</span>
|
||||
<!--@end-->
|
||||
|
||||
<!--@elseif($val->type=="image")-->
|
||||
|
||||
<!--@if($val->value)-->
|
||||
<div>
|
||||
<img src="{$val->value}" /><br />
|
||||
<input type="checkbox" name="del_{$val->name}" value="Y" id="del_{$val->name}" class="checkbox" />
|
||||
<label for="del_{$val->name}">{$lang->cmd_delete}</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<input type="file" name="{$val->name}" value="" />
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($val->description)-->
|
||||
<p>{nl2br($val->description)}</p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</table>
|
||||
|
||||
<div class="tRight gap1">
|
||||
<span class="button"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<iframe name="hidden_iframe" frameborder="0" style="display:none"></iframe>
|
||||