mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-21 20:29:57 +09:00
merge from 1.7.3.5(r13153:r13167)
git-svn-id: http://xe-core.googlecode.com/svn/trunk@13168 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc47d2b247
commit
2d3f149b5a
2042 changed files with 129266 additions and 126243 deletions
|
|
@ -10,8 +10,8 @@
|
|||
<title xml:lang="zh-TW">綜合搜尋</title>
|
||||
<title xml:lang="tr">Birleşik Arama</title>
|
||||
<description xml:lang="ko">
|
||||
선택한 모듈들을 대상으로 통합검색을 지원합니다.
|
||||
선택된 모듈의 글중 비밀글만 검색을 하지 않고 나머지는 모두 검색을 하기에 공개되지 않은 모듈은 대상에 포함하지 않도록 하셔야 합니다.
|
||||
선택한 페이지를 대상으로 통합검색을 지원합니다.
|
||||
선택한 페이지의 글중 비밀글만 검색을 하지 않고 나머지는 모두 검색을 하기에 공개되지 않은 페이지는 대상에 포함하지 않도록 해야 합니다.
|
||||
</description>
|
||||
<description xml:lang="zh-CN">
|
||||
把所选模块作为搜索对象。
|
||||
|
|
|
|||
|
|
@ -1,116 +1,126 @@
|
|||
<?php
|
||||
/**
|
||||
* The admin view class of the integration_search module
|
||||
/**
|
||||
* The admin view class of the integration_search module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class integration_searchAdminController extends integration_search
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
class integration_searchAdminController extends integration_search {
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function init()
|
||||
/**
|
||||
* Save Settings
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function procIntegration_searchAdminInsertConfig()
|
||||
{
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args->skin = Context::get('skin');
|
||||
$args->target = Context::get('target');
|
||||
$args->target_module_srl = Context::get('target_module_srl');
|
||||
if(!$args->target_module_srl) $args->target_module_srl = '';
|
||||
$args->skin_vars = $config->skin_vars;
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('integration_search',$args);
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispIntegration_searchAdminContent');
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the skin information
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function procIntegration_searchAdminInsertSkin()
|
||||
{
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args->skin = $config->skin;
|
||||
$args->target_module_srl = $config->target_module_srl;
|
||||
// Get skin information (to check extra_vars)
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $config->skin);
|
||||
// Check received variables (delete the basic variables such as mo, act, module_srl, page)
|
||||
$obj = Context::getRequestVars();
|
||||
unset($obj->act);
|
||||
unset($obj->module_srl);
|
||||
unset($obj->page);
|
||||
// Separately handle if the extra_vars is an image type in the original skin_info
|
||||
if($skin_info->extra_vars)
|
||||
{
|
||||
foreach($skin_info->extra_vars as $vars)
|
||||
{
|
||||
if($vars->type!='image') continue;
|
||||
|
||||
$image_obj = $obj->{$vars->name};
|
||||
// Get a variable on a request to delete
|
||||
$del_var = $obj->{"del_".$vars->name};
|
||||
unset($obj->{"del_".$vars->name});
|
||||
if($del_var == 'Y')
|
||||
{
|
||||
FileHandler::removeFile($module_info->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
// Use the previous data if not uploaded
|
||||
if(!$image_obj['tmp_name'])
|
||||
{
|
||||
$obj->{$vars->name} = $module_info->{$vars->name};
|
||||
continue;
|
||||
}
|
||||
// Ignore if the file is not successfully uploaded
|
||||
if(!is_uploaded_file($image_obj['tmp_name']))
|
||||
{
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
// Ignore if the file is not an image
|
||||
if(!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name']))
|
||||
{
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
// Upload the file to a path
|
||||
$path = sprintf("./files/attach/images/%s/", $module_srl);
|
||||
// Create a directory
|
||||
if(!FileHandler::makeDir($path)) return false;
|
||||
|
||||
$filename = $path.$image_obj['name'];
|
||||
// Move the file
|
||||
if(!move_uploaded_file($image_obj['tmp_name'], $filename))
|
||||
{
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
// Change a variable
|
||||
unset($obj->{$vars->name});
|
||||
$obj->{$vars->name} = $filename;
|
||||
}
|
||||
}
|
||||
// Serialize and save
|
||||
$args->skin_vars = serialize($obj);
|
||||
|
||||
/**
|
||||
* Save Settings
|
||||
*
|
||||
* @return mixed
|
||||
**/
|
||||
function procIntegration_searchAdminInsertConfig() {
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('integration_search',$args);
|
||||
|
||||
$args->skin = Context::get('skin');
|
||||
$args->target = Context::get('target');
|
||||
$args->target_module_srl = Context::get('target_module_srl');
|
||||
if(!$args->target_module_srl) $args->target_module_srl = '';
|
||||
$args->skin_vars = $config->skin_vars;
|
||||
$this->setMessage('success_updated', 'info');
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('integration_search',$args);
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispIntegration_searchAdminContent');
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the skin information
|
||||
*
|
||||
* @return mixed
|
||||
**/
|
||||
function procIntegration_searchAdminInsertSkin() {
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
$args->skin = $config->skin;
|
||||
$args->target_module_srl = $config->target_module_srl;
|
||||
// Get skin information (to check extra_vars)
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $config->skin);
|
||||
// Check received variables (delete the basic variables such as mo, act, module_srl, page)
|
||||
$obj = Context::getRequestVars();
|
||||
unset($obj->act);
|
||||
unset($obj->module_srl);
|
||||
unset($obj->page);
|
||||
// Separately handle if the extra_vars is an image type in the original skin_info
|
||||
if($skin_info->extra_vars) {
|
||||
foreach($skin_info->extra_vars as $vars) {
|
||||
if($vars->type!='image') continue;
|
||||
|
||||
$image_obj = $obj->{$vars->name};
|
||||
// Get a variable on a request to delete
|
||||
$del_var = $obj->{"del_".$vars->name};
|
||||
unset($obj->{"del_".$vars->name});
|
||||
if($del_var == 'Y') {
|
||||
FileHandler::removeFile($module_info->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
// Use the previous data if not uploaded
|
||||
if(!$image_obj['tmp_name']) {
|
||||
$obj->{$vars->name} = $module_info->{$vars->name};
|
||||
continue;
|
||||
}
|
||||
// Ignore if the file is not successfully uploaded
|
||||
if(!is_uploaded_file($image_obj['tmp_name'])) {
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
// Ignore if the file is not an image
|
||||
if(!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name'])) {
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
// Upload the file to a path
|
||||
$path = sprintf("./files/attach/images/%s/", $module_srl);
|
||||
// Create a directory
|
||||
if(!FileHandler::makeDir($path)) return false;
|
||||
|
||||
$filename = $path.$image_obj['name'];
|
||||
// Move the file
|
||||
if(!move_uploaded_file($image_obj['tmp_name'], $filename)) {
|
||||
unset($obj->{$vars->name});
|
||||
continue;
|
||||
}
|
||||
// Change a variable
|
||||
unset($obj->{$vars->name});
|
||||
$obj->{$vars->name} = $filename;
|
||||
}
|
||||
}
|
||||
// Serialize and save
|
||||
$args->skin_vars = serialize($obj);
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('integration_search',$args);
|
||||
|
||||
$this->setMessage('success_updated', 'info');
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispIntegration_searchAdminSkinInfo');
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
}
|
||||
?>
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispIntegration_searchAdminSkinInfo');
|
||||
return $this->setRedirectUrl($returnUrl, $output);
|
||||
}
|
||||
}
|
||||
/* End of file integration_search.admin.controller.php */
|
||||
/* Location: ./modules/integration_search/integration_search.admin.controller.php */
|
||||
|
|
|
|||
|
|
@ -1,99 +1,105 @@
|
|||
<?php
|
||||
/**
|
||||
* The admin view class of the integration_search module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
|
||||
class integration_searchAdminView extends integration_search {
|
||||
|
||||
/**
|
||||
* The admin view class of the integration_search module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class integration_searchAdminView extends integration_search
|
||||
{
|
||||
/**
|
||||
* Cofiguration of integration serach module
|
||||
*
|
||||
* @var object module config
|
||||
*/
|
||||
var $config = null;
|
||||
var $config = null;
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = &getModel('module');
|
||||
$this->config = $oModuleModel->getModuleConfig('integration_search');
|
||||
Context::set('config',$this->config);
|
||||
|
||||
$this->setTemplatePath($this->module_path."/tpl/");
|
||||
}
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
// Get configurations (using module model object)
|
||||
$oModuleModel = &getModel('module');
|
||||
$this->config = $oModuleModel->getModuleConfig('integration_search');
|
||||
Context::set('config',$this->config);
|
||||
|
||||
/**
|
||||
* Module selection and skin set
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function dispIntegration_searchAdminContent() {
|
||||
// Get a list of skins(themes)
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins($this->module_path);
|
||||
Context::set('skin_list',$skin_list);
|
||||
// Get a list of module categories
|
||||
$module_categories = $oModuleModel->getModuleCategories();
|
||||
// Generated mid Wanted list
|
||||
$obj->site_srl = 0;
|
||||
$this->setTemplatePath($this->module_path."/tpl/");
|
||||
}
|
||||
|
||||
// Shown below as obsolete comments - modify by cherryfilter
|
||||
/*$mid_list = $oModuleModel->getMidList($obj);
|
||||
// module_category and module combination
|
||||
if($module_categories) {
|
||||
foreach($mid_list as $module_srl => $module) {
|
||||
$module_categories[$module->module_category_srl]->list[$module_srl] = $module;
|
||||
}
|
||||
} else {
|
||||
$module_categories[0]->list = $mid_list;
|
||||
}
|
||||
/**
|
||||
* Module selection and skin set
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function dispIntegration_searchAdminContent()
|
||||
{
|
||||
// Get a list of skins(themes)
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins($this->module_path);
|
||||
Context::set('skin_list',$skin_list);
|
||||
// Get a list of module categories
|
||||
$module_categories = $oModuleModel->getModuleCategories();
|
||||
// Generated mid Wanted list
|
||||
$obj = new stdClass();
|
||||
$obj->site_srl = 0;
|
||||
|
||||
Context::set('mid_list',$module_categories);*/
|
||||
// Shown below as obsolete comments - modify by cherryfilter
|
||||
/*$mid_list = $oModuleModel->getMidList($obj);
|
||||
// module_category and module combination
|
||||
if($module_categories) {
|
||||
foreach($mid_list as $module_srl => $module) {
|
||||
$module_categories[$module->module_category_srl]->list[$module_srl] = $module;
|
||||
}
|
||||
} else {
|
||||
$module_categories[0]->list = $mid_list;
|
||||
}
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('skin_list..title');
|
||||
Context::set('mid_list',$module_categories);*/
|
||||
|
||||
// Sample Code
|
||||
Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword" value="{$is_keyword}" /><span class="btn"><input type="submit" value="{$lang->cmd_search}" /></span></form>') );
|
||||
$security = new Security();
|
||||
$security->encodeHTML('skin_list..title');
|
||||
|
||||
$this->setTemplateFile("index");
|
||||
}
|
||||
// Sample Code
|
||||
Context::set('sample_code', htmlspecialchars('<form action="{getUrl()}" method="get"><input type="hidden" name="vid" value="{$vid}" /><input type="hidden" name="mid" value="{$mid}" /><input type="hidden" name="act" value="IS" /><input type="text" name="is_keyword" value="{$is_keyword}" /><input class="btn" type="submit" value="{$lang->cmd_search}" /></form>') );
|
||||
|
||||
/**
|
||||
* Skin Settings
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function dispIntegration_searchAdminSkinInfo() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $this->config->skin);
|
||||
$skin_vars = unserialize($this->config->skin_vars);
|
||||
// value for 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); //maybe not used
|
||||
$this->setTemplateFile("index");
|
||||
}
|
||||
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
Context::set('module_info', unserialize($config->skin_vars));
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('skin_info...');
|
||||
|
||||
$this->setTemplateFile("skin_info");
|
||||
}
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* Skin Settings
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function dispIntegration_searchAdminSkinInfo()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_info = $oModuleModel->loadSkinInfo($this->module_path, $this->config->skin);
|
||||
$skin_vars = unserialize($this->config->skin_vars);
|
||||
// value for 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);
|
||||
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
Context::set('module_info', unserialize($config->skin_vars));
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('skin_info...');
|
||||
|
||||
$this->setTemplateFile("skin_info");
|
||||
}
|
||||
}
|
||||
/* End of file integration_search.admin.view.php */
|
||||
/* Location: ./modules/integration_search/integration_search.admin.view.php */
|
||||
|
|
|
|||
|
|
@ -1,81 +1,83 @@
|
|||
<?php
|
||||
/**
|
||||
* The view class of the integration_search module
|
||||
/**
|
||||
* The view class of the integration_search module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class integration_search extends ModuleObject
|
||||
{
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
* @return Object
|
||||
*/
|
||||
function moduleInstall()
|
||||
{
|
||||
// Registered in action forward
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('integration_search', 'view', 'IS');
|
||||
|
||||
class integration_search extends ModuleObject {
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Implement if additional tasks are necessary when installing
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// Registered in action forward
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('integration_search', 'view', 'IS');
|
||||
/**
|
||||
* Check methoda whether successfully installed
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function checkUpdate()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check methoda whether successfully installed
|
||||
*
|
||||
* @return bool
|
||||
**/
|
||||
function checkUpdate()
|
||||
if($config->skin)
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
|
||||
if($config->skin)
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if(count($config_parse) > 1)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
$template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
|
||||
if(is_dir($template_path)) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute update
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function moduleUpdate()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
|
||||
if($config->skin)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if(count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
|
||||
if(is_dir($template_path))
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
|
||||
if(is_dir($template_path)) return true;
|
||||
$config->skin = implode('|@|', $config_parse);
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->updateModuleConfig('integration_search', $config);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute update
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function moduleUpdate()
|
||||
{
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('message');
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
if($config->skin)
|
||||
{
|
||||
$config_parse = explode('.', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
|
||||
if(is_dir($template_path))
|
||||
{
|
||||
$config->skin = implode('|@|', $config_parse);
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->updateModuleConfig('integration_search', $config);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-generate the cache file
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function recompileCache() {
|
||||
}
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* Re-generate the cache file
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function recompileCache()
|
||||
{
|
||||
}
|
||||
}
|
||||
/* End of file integration_search.class.php */
|
||||
/* Location: ./modules/integration_search/integration_search.class.php */
|
||||
|
|
|
|||
|
|
@ -1,246 +1,279 @@
|
|||
<?php
|
||||
/**
|
||||
* The model class of integration module
|
||||
/**
|
||||
* The model class of integration module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class integration_searchModel extends module
|
||||
{
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
class integration_searchModel extends module {
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
/**
|
||||
* Search documents
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_target Target
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object output document list
|
||||
*/
|
||||
function getDocuments($target, $module_srls_list, $search_target, $search_keyword, $page=1, $list_count = 20)
|
||||
{
|
||||
if(is_array($module_srls_list)) $module_srls_list = implode(',',$module_srls_list);
|
||||
|
||||
/**
|
||||
* Search documents
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_target Target
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object output document list
|
||||
**/
|
||||
function getDocuments($target, $module_srls_list, $search_target, $search_keyword, $page=1, $list_count = 20) {
|
||||
if(is_array($module_srls_list)) $module_srls_list = implode(',',$module_srls_list);
|
||||
$args = new stdClass();
|
||||
if($target == 'exclude')
|
||||
{
|
||||
$module_srls_list .= ',0'; // exclude 'trash'
|
||||
if ($module_srls_list{0} == ',') $module_srls_list = substr($module_srls_list, 1);
|
||||
$args->exclude_module_srl = $module_srls_list;
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->module_srl = $module_srls_list;
|
||||
$args->exclude_module_srl = '0'; // exclude 'trash'
|
||||
}
|
||||
|
||||
if($target == 'exclude') {
|
||||
$module_srls_list .= ',0'; // exclude 'trash'
|
||||
if ($module_srls_list{0} == ',') $module_srls_list = substr($module_srls_list, 1);
|
||||
$args->exclude_module_srl = $module_srls_list;
|
||||
} else {
|
||||
$args->module_srl = $module_srls_list;
|
||||
$args->exclude_module_srl = '0'; // exclude 'trash'
|
||||
}
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = $search_target;
|
||||
$args->search_keyword = $search_keyword;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
$args->statusList = array('PUBLIC');
|
||||
if(!$args->module_srl) unset($args->module_srl);
|
||||
// Get a list of documents
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = $search_target;
|
||||
$args->search_keyword = $search_keyword;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
$args->statusList = array('PUBLIC');
|
||||
if(!$args->module_srl) unset($args->module_srl);
|
||||
// Get a list of documents
|
||||
$oDocumentModel = &getModel('document');
|
||||
return $oDocumentModel->getDocumentList($args);
|
||||
}
|
||||
|
||||
return $oDocumentModel->getDocumentList($args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search comment
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object output comment list
|
||||
**/
|
||||
function getComments($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20) {
|
||||
if(is_array($module_srls_list)){
|
||||
if (count($module_srls_list) > 0) $module_srls = implode(',',$module_srls_list);
|
||||
else $module_srls = 0;
|
||||
/**
|
||||
* Search comment
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object output comment list
|
||||
*/
|
||||
function getComments($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20)
|
||||
{
|
||||
$args = new stdClass();
|
||||
|
||||
if(is_array($module_srls_list))
|
||||
{
|
||||
if (count($module_srls_list) > 0) $module_srls = implode(',',$module_srls_list);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($module_srls_list)
|
||||
{
|
||||
$module_srls = $module_srls_list;
|
||||
}
|
||||
else {
|
||||
$module_srls = ($module_srls_list)?$module_srls_list:0;
|
||||
}
|
||||
if($target == 'exclude') $args->exclude_module_srl = $module_srls;
|
||||
else $args->module_srl = $module_srls;
|
||||
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = 'content';
|
||||
$args->search_keyword = $search_keyword;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
// Get a list of documents
|
||||
$oCommentModel = &getModel('comment');
|
||||
$output = $oCommentModel->getTotalCommentList($args);
|
||||
if(!$output->toBool()|| !$output->data) return $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search trackbacks
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_target Target
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object output trackback list
|
||||
*/
|
||||
function getTrackbacks($target, $module_srls_list, $search_target = "title", $search_keyword, $page=1, $list_count = 20)
|
||||
{
|
||||
$args = new stdClass();
|
||||
|
||||
if(is_array($module_srls_list)) $module_srls = implode(',',$module_srls_list);
|
||||
else $module_srls = $module_srls_list;
|
||||
if($target == 'exclude') $args->exclude_module_srl = $module_srls;
|
||||
else $args->module_srl = $module_srls;
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = $search_target;
|
||||
$args->search_keyword = $search_keyword;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
// Get a list of documents
|
||||
$oTrackbackModel = &getAdminModel('trackback');
|
||||
$output = $oTrackbackModel->getTotalTrackbackList($args);
|
||||
if(!$output->toBool()|| !$output->data) return $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search file
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
* @param string $direct_download Y or N
|
||||
*
|
||||
* @return Object output file list
|
||||
*/
|
||||
function _getFiles($target, $module_srls_list, $search_keyword, $page, $list_count, $direct_download = 'Y')
|
||||
{
|
||||
$args = new stdClass();
|
||||
|
||||
if(is_array($module_srls_list)) $module_srls = implode(',',$module_srls_list);
|
||||
else $module_srls = $module_srls_list;
|
||||
if($target == 'exclude') $args->exclude_module_srl = $module_srls;
|
||||
else $args->module_srl = $module_srls;
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = 'filename';
|
||||
$args->search_keyword = $search_keyword;
|
||||
$args->sort_index = 'files.file_srl';
|
||||
$args->order_type = 'desc';
|
||||
$args->isvalid = 'Y';
|
||||
$args->direct_download = $direct_download=='Y'?'Y':'N';
|
||||
// Get a list of documents
|
||||
$oFileAdminModel = &getAdminModel('file');
|
||||
$output = $oFileAdminModel->getFileList($args);
|
||||
if(!$output->toBool() || !$output->data) return $output;
|
||||
|
||||
$list = array();
|
||||
foreach($output->data as $key => $val)
|
||||
{
|
||||
$obj = null;
|
||||
$obj->filename = $val->source_filename;
|
||||
$obj->download_count = $val->download_count;
|
||||
if(substr($val->download_url,0,2)=='./') $val->download_url = substr($val->download_url,2);
|
||||
$obj->download_url = Context::getRequestUri().$val->download_url;
|
||||
$obj->target_srl = $val->upload_target_srl;
|
||||
$obj->file_size = $val->file_size;
|
||||
// Images
|
||||
if(preg_match('/\.(jpg|jpeg|gif|png)$/i', $val->source_filename))
|
||||
{
|
||||
$obj->type = 'image';
|
||||
|
||||
$thumbnail_path = sprintf('files/cache/thumbnails/%s',getNumberingPath($val->file_srl, 3));
|
||||
if(!is_dir($thumbnail_path)) FileHandler::makeDir($thumbnail_path);
|
||||
$thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, 120, 120, 'crop');
|
||||
$thumbnail_url = Context::getRequestUri().$thumbnail_file;
|
||||
if(!file_exists($thumbnail_file)) FileHandler::createImageFile($val->uploaded_filename, $thumbnail_file, 120, 120, 'jpg', 'crop');
|
||||
$obj->src = sprintf('<img src="%s" alt="%s" width="%d" height="%d" />', $thumbnail_url, htmlspecialchars($obj->filename), 120, 120);
|
||||
// Videos
|
||||
}
|
||||
else if(preg_match('/\.(swf|flv|wmv|avi|mpg|mpeg|asx|asf|mp3)$/i', $val->source_filename))
|
||||
{
|
||||
$obj->type = 'multimedia';
|
||||
$obj->src = sprintf('<script>displayMultimedia("%s",120,120);</script>', $obj->download_url);
|
||||
// Others
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->type = 'binary';
|
||||
$obj->src = '';
|
||||
}
|
||||
if($target == 'exclude') $args->exclude_module_srl = $module_srls;
|
||||
else $args->module_srl = $module_srls;
|
||||
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = 'content';
|
||||
$args->search_keyword = $search_keyword;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
// Get a list of documents
|
||||
$oCommentModel = &getModel('comment');
|
||||
$output = $oCommentModel->getTotalCommentList($args);
|
||||
if(!$output->toBool()|| !$output->data) return $output;
|
||||
return $output;
|
||||
}
|
||||
$list[] = $obj;
|
||||
$target_list[] = $val->upload_target_srl;
|
||||
}
|
||||
$output->data = $list;
|
||||
|
||||
/**
|
||||
* Search trackbacks
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_target Target
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object output trackback list
|
||||
**/
|
||||
function getTrackbacks($target, $module_srls_list, $search_target = "title", $search_keyword, $page=1, $list_count = 20) {
|
||||
if(is_array($module_srls_list)) $module_srls = implode(',',$module_srls_list);
|
||||
else $module_srls = $module_srls_list;
|
||||
if($target == 'exclude') $args->exclude_module_srl = $module_srls;
|
||||
else $args->module_srl = $module_srls;
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = $search_target;
|
||||
$args->search_keyword = $search_keyword;
|
||||
$args->sort_index = 'list_order';
|
||||
$args->order_type = 'asc';
|
||||
// Get a list of documents
|
||||
$oTrackbackModel = &getAdminModel('trackback');
|
||||
$output = $oTrackbackModel->getTotalTrackbackList($args);
|
||||
if(!$output->toBool()|| !$output->data) return $output;
|
||||
return $output;
|
||||
}
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_list = $oDocumentModel->getDocuments($target_list);
|
||||
if($document_list) foreach($document_list as $key => $val)
|
||||
{
|
||||
foreach($output->data as $k => $v)
|
||||
{
|
||||
if($v->target_srl== $val->document_srl)
|
||||
{
|
||||
$output->data[$k]->url = $val->getPermanentUrl();
|
||||
$output->data[$k]->regdate = $val->getRegdate("Y-m-d H:i");
|
||||
$output->data[$k]->nick_name = $val->getNickName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Search file
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
* @param string $direct_download Y or N
|
||||
*
|
||||
* @return Object output file list
|
||||
**/
|
||||
function _getFiles($target, $module_srls_list, $search_keyword, $page, $list_count, $direct_download = 'Y') {
|
||||
if(is_array($module_srls_list)) $module_srls = implode(',',$module_srls_list);
|
||||
else $module_srls = $module_srls_list;
|
||||
if($target == 'exclude') $args->exclude_module_srl = $module_srls;
|
||||
else $args->module_srl = $module_srls;
|
||||
$args->page = $page;
|
||||
$args->list_count = $list_count;
|
||||
$args->page_count = 10;
|
||||
$args->search_target = 'filename';
|
||||
$args->search_keyword = $search_keyword;
|
||||
$args->sort_index = 'files.file_srl';
|
||||
$args->order_type = 'desc';
|
||||
$args->isvalid = 'Y';
|
||||
$args->direct_download = $direct_download=='Y'?'Y':'N';
|
||||
// Get a list of documents
|
||||
$oFileAdminModel = &getAdminModel('file');
|
||||
$output = $oFileAdminModel->getFileList($args);
|
||||
if(!$output->toBool() || !$output->data) return $output;
|
||||
$oCommentModel = &getModel('comment');
|
||||
$comment_list = $oCommentModel->getComments($target_list);
|
||||
if($comment_list) foreach($comment_list as $key => $val)
|
||||
{
|
||||
foreach($output->data as $k => $v)
|
||||
{
|
||||
if($v->target_srl== $val->comment_srl)
|
||||
{
|
||||
$output->data[$k]->url = $val->getPermanentUrl();
|
||||
$output->data[$k]->regdate = $val->getRegdate("Y-m-d H:i");
|
||||
$output->data[$k]->nick_name = $val->getNickName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$list = array();
|
||||
foreach($output->data as $key => $val) {
|
||||
$obj = null;
|
||||
$obj->filename = $val->source_filename;
|
||||
$obj->download_count = $val->download_count;
|
||||
if(substr($val->download_url,0,2)=='./') $val->download_url = substr($val->download_url,2);
|
||||
$obj->download_url = Context::getRequestUri().$val->download_url;
|
||||
$obj->target_srl = $val->upload_target_srl;
|
||||
$obj->file_size = $val->file_size;
|
||||
// Images
|
||||
if(preg_match('/\.(jpg|jpeg|gif|png)$/i', $val->source_filename)) {
|
||||
$obj->type = 'image';
|
||||
return $output;
|
||||
}
|
||||
|
||||
$thumbnail_path = sprintf('files/cache/thumbnails/%s',getNumberingPath($val->file_srl, 3));
|
||||
if(!is_dir($thumbnail_path)) FileHandler::makeDir($thumbnail_path);
|
||||
$thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, 120, 120, 'crop');
|
||||
$thumbnail_url = Context::getRequestUri().$thumbnail_file;
|
||||
if(!file_exists($thumbnail_file)) FileHandler::createImageFile($val->uploaded_filename, $thumbnail_file, 120, 120, 'jpg', 'crop');
|
||||
$obj->src = sprintf('<img src="%s" alt="%s" width="%d" height="%d" />', $thumbnail_url, htmlspecialchars($obj->filename), 120, 120);
|
||||
// Videos
|
||||
} elseif(preg_match('/\.(swf|flv|wmv|avi|mpg|mpeg|asx|asf|mp3)$/i', $val->source_filename)) {
|
||||
$obj->type = 'multimedia';
|
||||
$obj->src = sprintf('<script type="text/javascript">displayMultimedia("%s",120,120);</script>', $obj->download_url);
|
||||
// Others
|
||||
} else {
|
||||
$obj->type = 'binary';
|
||||
$obj->src = '';
|
||||
}
|
||||
/**
|
||||
* Search Multimedia. call function _getFiles().
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function getImages($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20)
|
||||
{
|
||||
return $this->_getFiles($target, $module_srls_list, $search_keyword, $page, $list_count);
|
||||
}
|
||||
|
||||
$list[] = $obj;
|
||||
$target_list[] = $val->upload_target_srl;
|
||||
}
|
||||
$output->data = $list;
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document_list = $oDocumentModel->getDocuments($target_list);
|
||||
if($document_list) foreach($document_list as $key => $val) {
|
||||
foreach($output->data as $k => $v) {
|
||||
if($v->target_srl== $val->document_srl) {
|
||||
$output->data[$k]->url = $val->getPermanentUrl();
|
||||
$output->data[$k]->regdate = $val->getRegdate("Y-m-d H:i");
|
||||
$output->data[$k]->nick_name = $val->getNickName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$oCommentModel = &getModel('comment');
|
||||
$comment_list = $oCommentModel->getComments($target_list);
|
||||
if($comment_list) foreach($comment_list as $key => $val) {
|
||||
foreach($output->data as $k => $v) {
|
||||
if($v->target_srl== $val->comment_srl) {
|
||||
$output->data[$k]->url = $val->getPermanentUrl();
|
||||
$output->data[$k]->regdate = $val->getRegdate("Y-m-d H:i");
|
||||
$output->data[$k]->nick_name = $val->getNickName();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Multimedia. call function _getFiles().
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function getImages($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20) {
|
||||
return $this->_getFiles($target, $module_srls_list, $search_keyword, $page, $list_count);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search for attachments. call function _getFiles().
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function getFiles($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20) {
|
||||
return $this->_getFiles($target, $module_srls_list, $search_keyword, $page, $list_count, 'N');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
/**
|
||||
* Search for attachments. call function _getFiles().
|
||||
*
|
||||
* @param string $target choose target. exclude or include for $module_srls_list
|
||||
* @param string $module_srls_list module_srl list to string type. ef - 102842,59392,102038
|
||||
* @param string $search_keyword Keyword
|
||||
* @param integer $page page of page navigation
|
||||
* @param integer $list_count list count of page navigation
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function getFiles($target, $module_srls_list, $search_keyword, $page=1, $list_count = 20)
|
||||
{
|
||||
return $this->_getFiles($target, $module_srls_list, $search_keyword, $page, $list_count, 'N');
|
||||
}
|
||||
}
|
||||
/* End of file integration_search.model.php */
|
||||
/* Location: ./modules/integration_search/integration_search.model.php */
|
||||
|
|
|
|||
|
|
@ -1,134 +1,140 @@
|
|||
<?php
|
||||
/**
|
||||
* The view class of the integration_search module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
**/
|
||||
|
||||
class integration_searchView extends integration_search {
|
||||
|
||||
/**
|
||||
* The view class of the integration_search module
|
||||
*
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
*/
|
||||
class integration_searchView extends integration_search
|
||||
{
|
||||
/**
|
||||
* Target mid
|
||||
* @var array target mid
|
||||
*/
|
||||
var $target_mid = array();
|
||||
var $target_mid = array();
|
||||
/**
|
||||
* Skin
|
||||
* @var string skin name
|
||||
*/
|
||||
var $skin = 'default';
|
||||
var $skin = 'default';
|
||||
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
/**
|
||||
* Initialization
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function init()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Result
|
||||
*
|
||||
* @return Object
|
||||
**/
|
||||
function IS() {
|
||||
$oFile = &getClass('file');
|
||||
$oModuleModel = &getModel('module');
|
||||
// Check permissions
|
||||
if(!$this->grant->access) return new Object(-1,'msg_not_permitted');
|
||||
/**
|
||||
* Search Result
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function IS()
|
||||
{
|
||||
$oFile = &getClass('file');
|
||||
$oModuleModel = &getModel('module');
|
||||
// Check permissions
|
||||
if(!$this->grant->access) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
if(!$config->skin)
|
||||
$config = $oModuleModel->getModuleConfig('integration_search');
|
||||
if(!$config->skin)
|
||||
{
|
||||
$config->skin = 'default';
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
|
||||
}
|
||||
else
|
||||
{
|
||||
//check theme
|
||||
$config_parse = explode('|@|', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$config->skin = 'default';
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
|
||||
}
|
||||
else
|
||||
}
|
||||
// Template path
|
||||
$this->setTemplatePath($template_path);
|
||||
Context::set('module_info', unserialize($config->skin_vars));
|
||||
|
||||
$target = $config->target;
|
||||
if(!$target) $target = 'include';
|
||||
|
||||
if(empty($config->target_module_srl))
|
||||
$module_srl_list = array();
|
||||
else
|
||||
$module_srl_list = explode(',',$config->target_module_srl);
|
||||
|
||||
// Set a variable for search keyword
|
||||
$is_keyword = Context::get('is_keyword');
|
||||
// Set page variables
|
||||
$page = (int)Context::get('page');
|
||||
if(!$page) $page = 1;
|
||||
// Search by search tab
|
||||
$where = Context::get('where');
|
||||
// Create integration search model object
|
||||
if($is_keyword)
|
||||
{
|
||||
$oIS = &getModel('integration_search');
|
||||
switch($where)
|
||||
{
|
||||
//check theme
|
||||
$config_parse = explode('|@|', $config->skin);
|
||||
if (count($config_parse) > 1)
|
||||
{
|
||||
$template_path = sprintf('./themes/%s/modules/integration_search/', $config_parse[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$template_path = sprintf('%sskins/%s', $this->module_path, $config->skin);
|
||||
}
|
||||
case 'document' :
|
||||
$search_target = Context::get('search_target');
|
||||
if(!in_array($search_target, array('title','content','title_content','tag'))) $search_target = 'title';
|
||||
Context::set('search_target', $search_target);
|
||||
|
||||
$output = $oIS->getDocuments($target, $module_srl_list, $search_target, $is_keyword, $page, 10);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("document", $page);
|
||||
break;
|
||||
case 'comment' :
|
||||
$output = $oIS->getComments($target, $module_srl_list, $is_keyword, $page, 10);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("comment", $page);
|
||||
break;
|
||||
case 'trackback' :
|
||||
$search_target = Context::get('search_target');
|
||||
if(!in_array($search_target, array('title','url','blog_name','excerpt'))) $search_target = 'title';
|
||||
Context::set('search_target', $search_target);
|
||||
|
||||
$output = $oIS->getTrackbacks($target, $module_srl_list, $search_target, $is_keyword, $page, 10);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("trackback", $page);
|
||||
break;
|
||||
case 'multimedia' :
|
||||
$output = $oIS->getImages($target, $module_srl_list, $is_keyword, $page,20);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("multimedia", $page);
|
||||
break;
|
||||
case 'file' :
|
||||
$output = $oIS->getFiles($target, $module_srl_list, $is_keyword, $page, 20);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("file", $page);
|
||||
break;
|
||||
default :
|
||||
$output['document'] = $oIS->getDocuments($target, $module_srl_list, 'title', $is_keyword, $page, 5);
|
||||
$output['comment'] = $oIS->getComments($target, $module_srl_list, $is_keyword, $page, 5);
|
||||
$output['trackback'] = $oIS->getTrackbacks($target, $module_srl_list, 'title', $is_keyword, $page, 5);
|
||||
$output['multimedia'] = $oIS->getImages($target, $module_srl_list, $is_keyword, $page, 5);
|
||||
$output['file'] = $oIS->getFiles($target, $module_srl_list, $is_keyword, $page, 5);
|
||||
Context::set('search_result', $output);
|
||||
Context::set('search_target', 'title');
|
||||
$this->setTemplateFile("index", $page);
|
||||
break;
|
||||
}
|
||||
// Template path
|
||||
$this->setTemplatePath($template_path);
|
||||
Context::set('module_info', unserialize($config->skin_vars));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setTemplateFile("no_keywords");
|
||||
}
|
||||
|
||||
$target = $config->target;
|
||||
if(!$target) $target = 'include';
|
||||
|
||||
if (empty($config->target_module_srl))
|
||||
$module_srl_list = array();
|
||||
else
|
||||
$module_srl_list = explode(',',$config->target_module_srl);
|
||||
|
||||
// Set a variable for search keyword
|
||||
$is_keyword = Context::get('is_keyword');
|
||||
// Set page variables
|
||||
$page = (int)Context::get('page');
|
||||
if(!$page) $page = 1;
|
||||
// Search by search tab
|
||||
$where = Context::get('where');
|
||||
// Create integration search model object
|
||||
if($is_keyword) {
|
||||
$oIS = &getModel('integration_search');
|
||||
switch($where) {
|
||||
case 'document' :
|
||||
$search_target = Context::get('search_target');
|
||||
if(!in_array($search_target, array('title','content','title_content','tag'))) $search_target = 'title';
|
||||
Context::set('search_target', $search_target);
|
||||
|
||||
$output = $oIS->getDocuments($target, $module_srl_list, $search_target, $is_keyword, $page, 10);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("document", $page);
|
||||
break;
|
||||
case 'comment' :
|
||||
$output = $oIS->getComments($target, $module_srl_list, $is_keyword, $page, 10);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("comment", $page);
|
||||
break;
|
||||
case 'trackback' :
|
||||
$search_target = Context::get('search_target');
|
||||
if(!in_array($search_target, array('title','url','blog_name','excerpt'))) $search_target = 'title';
|
||||
Context::set('search_target', $search_target);
|
||||
|
||||
$output = $oIS->getTrackbacks($target, $module_srl_list, $search_target, $is_keyword, $page, 10);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("trackback", $page);
|
||||
break;
|
||||
case 'multimedia' :
|
||||
$output = $oIS->getImages($target, $module_srl_list, $is_keyword, $page,20);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("multimedia", $page);
|
||||
break;
|
||||
case 'file' :
|
||||
$output = $oIS->getFiles($target, $module_srl_list, $is_keyword, $page, 20);
|
||||
Context::set('output', $output);
|
||||
$this->setTemplateFile("file", $page);
|
||||
break;
|
||||
default :
|
||||
$output['document'] = $oIS->getDocuments($target, $module_srl_list, 'title', $is_keyword, $page, 5);
|
||||
$output['comment'] = $oIS->getComments($target, $module_srl_list, $is_keyword, $page, 5);
|
||||
$output['trackback'] = $oIS->getTrackbacks($target, $module_srl_list, 'title', $is_keyword, $page, 5);
|
||||
$output['multimedia'] = $oIS->getImages($target, $module_srl_list, $is_keyword, $page, 5);
|
||||
$output['file'] = $oIS->getFiles($target, $module_srl_list, $is_keyword, $page, 5);
|
||||
Context::set('search_result', $output);
|
||||
Context::set('search_target', 'title');
|
||||
$this->setTemplateFile("index", $page);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
$this->setTemplateFile("no_keywords");
|
||||
}
|
||||
|
||||
$security = new Security();
|
||||
$security->encodeHTML('is_keyword', 'search_target', 'where', 'page');
|
||||
}
|
||||
}
|
||||
?>
|
||||
$security = new Security();
|
||||
$security->encodeHTML('is_keyword', 'search_target', 'where', 'page');
|
||||
}
|
||||
}
|
||||
/* End of file integration_search.view.php */
|
||||
/* Location: ./modules/integration_search/integration_search.view.php */
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
<value xml:lang="vi"><![CDATA[Code mẫu]]></value>
|
||||
</item>
|
||||
<item name="about_target_module">
|
||||
<value xml:lang="ko"><![CDATA[선택된 모듈만 검색 대상으로 정합니다. 권한설정에 대한 주의를 바랍니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Only chosen modules are the target. Please be careful on setting the permissions.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[선택한 페이지를 검색 대상으로 정합니다. 권한설정에 대한 주의를 바랍니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Only chosen pages are the target. Please be careful on setting the permissions.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[選択されたモジュールだけを検索対象とします。各モジュールの権限設定にも注意してください。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[所选模块作为搜索对象。请注意权限设置。]]></value>
|
||||
<value xml:lang="zh-TW"><![CDATA[只將所選擇的模組當作搜尋對象。請注意權限設置。]]></value>
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
<value xml:lang="vi"><![CDATA[Chỉ tìm kiếm trên những Module đã chọn. Hãy cẩn thận vì có thể có Module bạn không được phép truy cập.]]></value>
|
||||
</item>
|
||||
<item name="about_sample_code">
|
||||
<value xml:lang="ko"><![CDATA[위 코드를 레이아웃, 스킨 등에 추가하시면 통합검색이 가능합니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA[위 코드를 레이아웃, 스킨 등에 추가하면 통합검색이 가능합니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[You can use integrated search by adding the above code in the layout or other things.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[上のコードをレイアウトなどに挿入すると統合検索が可能になります。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[可把上述代码插入到相应布局当中即可实现搜索功能。]]></value>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<value xml:lang="vi"><![CDATA[Hãy nhập từ khóa để tìm kiếm!]]></value>
|
||||
</item>
|
||||
<item name="msg_document_more_search">
|
||||
<value xml:lang="ko"><![CDATA['계속 검색' 버튼을 선택하시면 아직 검색하지 않은 부분까지 계속 검색 하실 수 있습니다.]]></value>
|
||||
<value xml:lang="ko"><![CDATA['계속 검색' 버튼을 선택하면 아직 검색하지 않은 부분까지 계속 검색할 수 있습니다.]]></value>
|
||||
<value xml:lang="en"><![CDATA[Click 'Search Next' button to keep searching.]]></value>
|
||||
<value xml:lang="jp"><![CDATA[継続サーチボタンを選択すると、まだ検索結果として引っかからなかった箇所を引き続き検索を行います。]]></value>
|
||||
<value xml:lang="zh-CN"><![CDATA[利用'继续搜索'按钮可以进一步搜索。]]></value>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@
|
|||
<span class="noResult">
|
||||
{$lang->msg_no_result}
|
||||
<!--@if($last_division)-->
|
||||
<br />{$lang->msg_document_more_search}
|
||||
<br /><span class="btn"><a href="{getUrl('where','document','page',1,'document_srl','','search_target',$search_target,'is_keyword',$is_keyword,'division',$last_division,'last_division','')}">{$lang->cmd_search_next}</a></span>
|
||||
<br>{$lang->msg_document_more_search}
|
||||
<br><a class="btn" href="{getUrl('where','document','page',1,'document_srl','','search_target',$search_target,'is_keyword',$is_keyword,'division',$last_division,'last_division','')}">{$lang->cmd_search_next}</a>
|
||||
<!--@end-->
|
||||
</span>
|
||||
<!--@else-->
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@
|
|||
<input type="hidden" name="act" value="IS" />
|
||||
<input type="hidden" name="where" value="{$where}" />
|
||||
<input type="hidden" name="search_target" value="title_content" />
|
||||
<input name="is_keyword" type="text" class="iText" value="{$is_keyword}"/>
|
||||
<span class="button large strong black"><input type="submit" value="{$lang->cmd_search}" /></span>
|
||||
<input name="is_keyword" type="text" required value="{$is_keyword}"/>
|
||||
<input type="submit" value="{$lang->cmd_search}" />
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@
|
|||
<ul class="searchImageResult">
|
||||
<!--@foreach($output->data as $no => $image)-->
|
||||
<li>
|
||||
<a href="{$image->url}" onclick="window.open(this.href); return false;">{$image->src}</a>
|
||||
<a href="{$image->url}">{$image->src}</a>
|
||||
<dl>
|
||||
<dt><a href="{$image->url}" onclick="window.open(this.href); return false;">{$image->filename}</a></dt>
|
||||
<dt><a href="{$image->url}">{$image->filename}</a></dt>
|
||||
</dl>
|
||||
<address><strong>{$image->nick_name}</strong><br /><span class="time">{$image->regdate}</span></address>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
<strong class="noKeyword">{$lang->msg_no_keyword}</strong>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery(function($){ $('#fo_is [name=is_keyword]').focus(); });
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<skin version="0.2">
|
||||
<title xml:lang="ko">통합 검색 기본 스킨</title>
|
||||
<title xml:lang="ko">통합검색 기본 스킨</title>
|
||||
<title xml:lang="vi">Skin trang tìm kiếm</title>
|
||||
<title xml:lang="zh-CN">搜索默认皮肤</title>
|
||||
<title xml:lang="jp">統合検索のデフォルトスキン</title>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<title xml:lang="zh-TW">預設綜合搜尋面板</title>
|
||||
<title xml:lang="tr">Birleşik Arama Varsayılan Dış Görünümü</title>
|
||||
<description xml:lang="vi">Skin mặc định của trang tìm kiếm.</description>
|
||||
<description xml:lang="ko">통합검색 모듈의 기본 스킨</description>
|
||||
<description xml:lang="ko">통합검색 기본 스킨</description>
|
||||
<description xml:lang="zh-CN">搜索模块的默认皮肤。</description>
|
||||
<description xml:lang="jp">統合検索モジュールのデフォルトスキンです。</description>
|
||||
<description xml:lang="en">The Default Skin of the Integrated Search Module</description>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<dt><a href="{getUrl('','document_srl',$trackback->document_srl)}" onclick="window.open(this.href);return false;">{htmlspecialchars($trackback->title)}</a> </span></dt>
|
||||
<dd>{cut_str(htmlspecialchars($trackback->excerpt))}</dd>
|
||||
</dl>
|
||||
<address><strong><a href="{$trackback->url}" onclick="window.open(this.href); return false;">{htmlspecialchars($trackback->blog_name)}</a></strong> | <span class="time">{zdate($trackback->regdate, "Y-m-d H:i")}</span> </address>
|
||||
<address><strong><a href="{$trackback->url}">{htmlspecialchars($trackback->blog_name)}</a></strong> | <span class="time">{zdate($trackback->regdate, "Y-m-d H:i")}</span> </address>
|
||||
|
||||
</li>
|
||||
<!--@end-->
|
||||
|
|
|
|||
|
|
@ -1,92 +1,81 @@
|
|||
@charset "utf-8";
|
||||
|
||||
#spot { padding-left:10px; margin-bottom:20px; }
|
||||
#spot .search * { vertical-align:middle;}
|
||||
#spot .search .iText { border:4px solid #b6b6b6; padding:2px; width:252px; font-size:16px; font-weight:bold; }
|
||||
|
||||
.localNavigation { border-bottom:1px solid #ccc; *zoom:1; margin:0 0 20px 0px; padding:0; overflow:hidden; padding-left:10px; }
|
||||
.localNavigation:after {content:""; display:block; clear:both;}
|
||||
.localNavigation li{ position:relative; list-style:none; float:left; margin:0 -1px 0 0; padding:0;background:#fff;}
|
||||
.localNavigation li a { color:#666; text-decoration:none; text-decoration:none; float:left; padding:7px 15px 0 15px; height:18px; border:1px solid #ddd; border-bottom:none; background:url(images/white/bgTab.gif) repeat-x;}
|
||||
.localNavigation li.on { margin-bottom:-1px;}
|
||||
.localNavigation li.on a{ height:19px; background:none;}
|
||||
|
||||
.subNavigation { *zoom:1; margin:0 0 20px 10px; padding:0 0 10px 0; overflow:hidden; border-bottom:1px solid #EFEFEF; }
|
||||
.subNavigation:after {content:""; display:block; clear:both;}
|
||||
.subNavigation li{ position:relative; list-style:none; float:left; margin:0 -1px 0 0; padding:0 }
|
||||
.subNavigation li a { color:#666; text-decoration:none; text-decoration:none; float:left; padding:0 10px 0 0; margin-right:10px; border-right:1px solid #ddd; }
|
||||
.subNavigation li.last a { border-right:0; }
|
||||
.subNavigation li.on { margin-bottom:-1px;}
|
||||
.subNavigation li.on a { font-weight:bold; }
|
||||
|
||||
strong.noKeyword { font-size:16px; display:block; margin:50px 0 0 10px; }
|
||||
|
||||
h3.subTitle { padding:0 0 0 20px; margin:10px 0 20px 10px; background:url(images/white/iconH2.gif) no-repeat left center; font-size:12px; color:#666; }
|
||||
h3.subTitle span { font-weight:normal; font-family:verdana; font-size:11px; }
|
||||
|
||||
.noResult { display:block; margin:0 0 30px 10px; color:#666; padding:0 0 10px 20px; border-bottom:1px solid #EFEFEF; line-height:160%;}
|
||||
|
||||
.searchResult { margin:10px 0 0 10px; padding:0;}
|
||||
.searchResult li { width:100%; margin-bottom:15px; clear:both; overflow:hidden;list-style:none; }
|
||||
.searchResult li .thumb { display:block; float:left; margin-right:14px; padding:1px; border:1px solid #DDD;}
|
||||
.searchResult li dl { margin:5px 0 0 0; padding:0; }
|
||||
.searchResult li dl dt { padding:0; margin:0; color:#d8d8d8; margin-bottom:1px;}
|
||||
.searchResult li dl dt a { color:#1a3588; text-decoration:underline;}
|
||||
.searchResult.comment li dl dt a { color:#444444; text-decoration:none;}
|
||||
.searchResult.comment li dl dt a:hover { text-decoration:underline;}
|
||||
.searchResult li dl dt .reply { color:#fe6700; font:.9em Tahoma;}
|
||||
.searchResult li dl dt .reply em { color:#fe6700; font:normal 10px 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 { padding:0; margin:0; line-height:18px; color:#555555; margin-bottom:4px;}
|
||||
.searchResult li address { color:#d8d8d8; font-size:12px; margin-top:5px; }
|
||||
.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;}
|
||||
|
||||
.searchImageResult { margin:10px 0 0 10px; padding:0; overflow:hidden; *zoom:1;}
|
||||
.searchImageResult li { width:124px; height:190px; padding:0; margin:0 20px 15px 0; list-style:none; float:left; overflow:hidden; vertical-align:top;}
|
||||
.searchImageResult li img { display:block; margin-bottom:10px; padding:1px; border:1px solid #DDD;}
|
||||
.searchImageResult li dl { margin:0; padding:0; }
|
||||
.searchImageResult li dl dt { padding:0; margin:0; color:#d8d8d8; margin-bottom:1px;}
|
||||
.searchImageResult li dl dt a { color:#1a3588; text-decoration:underline;}
|
||||
.searchImageResult li address { color:#d8d8d8; font-size:12px; margin-top:5px; }
|
||||
.searchImageResult li address strong { color:#3e3e3e; font-size:1em; font-weight:normal;}
|
||||
.searchImageResult li address img { vertical-align:middle; margin-right:2px;}
|
||||
.searchImageResult li address .time { color:#818181; font:.8em Tahoma;}
|
||||
.searchImageResult li address .read { font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#818181;}
|
||||
.searchImageResult li address .readNum { color:#818181; font:.8em Tahoma;}
|
||||
.searchImageResult li address .recom { font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif; color:#818181;}
|
||||
.searchImageResult li address .recomNum { color:#fe6700; font:bold .8em Tahoma;}
|
||||
.searchImageResult li address .time { color:#818181; font:.8em Tahoma;}
|
||||
|
||||
div.isMore { color:#666; text-align:right; margin-bottom:20px; padding-bottom:10px; border-bottom:1px solid #EFEFEF; }
|
||||
div.isMore a { color:#666; text-decoration:underline; }
|
||||
|
||||
#spot{margin:0 0 20px 0}
|
||||
#spot .search{margin:0;padding:0}
|
||||
#spot .search input[type="text"]{vertical-align:top;border:4px solid #b6b6b6;padding:4px;width:252px;font-size:16px;height:16px;line-height:16px;font-weight:bold;margin:0}
|
||||
#spot .search input[type="submit"]{vertical-align:top;background:#484d51;border:1px solid #272b30;color:#fff;height:32px;line-height:32px;padding:0 15px;margin:0;cursor:pointer;box-shadow:0 1px 0 #6d7174 inset;font-size:14px;font-weight:bold}
|
||||
.localNavigation{border-bottom:1px solid #ccc;*zoom:1;margin:0 0 20px 0px;padding:0}
|
||||
.localNavigation:after {content:"";display:block;clear:both}
|
||||
.localNavigation li{ position:relative;list-style:none;float:left;margin:0 -1px 0 0;padding:0;background:#fff}
|
||||
.localNavigation li a{color:#666;text-decoration:none;text-decoration:none;float:left;padding:7px 15px 0 15px;height:18px;border:1px solid #ddd;border-bottom:none;background:url(images/white/bgTab.gif) repeat-x}
|
||||
.localNavigation li.on{margin-bottom:-1px}
|
||||
.localNavigation li.on a{ height:19px;background:none}
|
||||
.subNavigation{*zoom:1;margin:0 0 20px 0;padding:0 0 10px 0;overflow:hidden;border-bottom:1px solid #EFEFEF}
|
||||
.subNavigation:after {content:"";display:block;clear:both}
|
||||
.subNavigation li{ position:relative;list-style:none;float:left;margin:0 -1px 0 0;padding:0 }
|
||||
.subNavigation li a{color:#666;text-decoration:none;text-decoration:none;float:left;padding:0 10px 0 0;margin-right:10px;border-right:1px solid #ddd}
|
||||
.subNavigation li.last a{border-right:0}
|
||||
.subNavigation li.on{margin-bottom:-1px}
|
||||
.subNavigation li.on a{font-weight:bold}
|
||||
strong.noKeyword{font-size:16px;display:block;margin:50px 0 0 10px}
|
||||
h3.subTitle{padding:0 0 0 20px;margin:10px 0 20px 0;background:url(images/white/iconH2.gif) no-repeat left center;font-size:12px;color:#666}
|
||||
h3.subTitle span{font-weight:normal;font-family:verdana;font-size:11px}
|
||||
.noResult{display:block;margin:0 0 30px 0;color:#666;padding:0 0 10px 0;border-bottom:1px solid #EFEFEF;line-height:160%}
|
||||
.searchResult{margin:10px 0 0 0;padding:0}
|
||||
.searchResult li{width:100%;margin-bottom:15px;clear:both;overflow:hidden;list-style:none}
|
||||
.searchResult li .thumb{display:block;float:left;margin-right:14px;padding:1px;border:1px solid #DDD}
|
||||
.searchResult li dl{margin:5px 0 0 0;padding:0}
|
||||
.searchResult li dl dt{padding:0;margin:0;color:#d8d8d8;margin-bottom:1px}
|
||||
.searchResult li dl dt a{color:#1a3588;text-decoration:underline;font-weight:bold}
|
||||
.searchResult.comment li dl dt a{color:#444444;text-decoration:none}
|
||||
.searchResult.comment li dl dt a:hover{text-decoration:underline}
|
||||
.searchResult li dl dt .reply{color:#fe6700;font:.9em Tahoma}
|
||||
.searchResult li dl dt .reply em{color:#fe6700;font:normal 10px 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{padding:0;margin:0;line-height:18px;color:#555555;margin-bottom:4px}
|
||||
.searchResult li address{color:#d8d8d8;font-size:12px;margin-top:5px;font-style:normal}
|
||||
.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}
|
||||
.searchImageResult{margin:10px 0 0 10px;padding:0;overflow:hidden;*zoom:1}
|
||||
.searchImageResult li{width:124px;height:190px;padding:0;margin:0 20px 15px 0;list-style:none;float:left;overflow:hidden;vertical-align:top}
|
||||
.searchImageResult li img{display:block;margin-bottom:10px;padding:1px;border:1px solid #DDD}
|
||||
.searchImageResult li dl{margin:0;padding:0}
|
||||
.searchImageResult li dl dt{padding:0;margin:0;color:#d8d8d8;margin-bottom:1px}
|
||||
.searchImageResult li dl dt a{color:#1a3588;text-decoration:underline}
|
||||
.searchImageResult li address{color:#d8d8d8;font-size:12px;margin-top:5px}
|
||||
.searchImageResult li address strong{color:#3e3e3e;font-size:1em;font-weight:normal}
|
||||
.searchImageResult li address img{vertical-align:middle;margin-right:2px}
|
||||
.searchImageResult li address .time{color:#818181;font:.8em Tahoma}
|
||||
.searchImageResult li address .read{font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif;color:#818181}
|
||||
.searchImageResult li address .readNum{color:#818181;font:.8em Tahoma}
|
||||
.searchImageResult li address .recom{font:11px "돋움", Dotum, "굴림", Gulim, AppleGothic, Sans-serif;color:#818181}
|
||||
.searchImageResult li address .recomNum{color:#fe6700;font:bold .8em Tahoma}
|
||||
.searchImageResult li address .time{color:#818181;font:.8em Tahoma}
|
||||
div.isMore{color:#666;text-align:right;margin-bottom:20px;padding-bottom:10px;border-bottom:1px solid #EFEFEF}
|
||||
div.isMore a{color:#666;text-decoration:underline}
|
||||
/* Pagination Reset */
|
||||
.pagination{ padding:15px 0; margin:0; text-align:center;}
|
||||
.pagination *{ margin:0; padding:0;}
|
||||
.pagination img{ border:0;}
|
||||
.pagination{ padding:15px 0;margin:0;text-align:center}
|
||||
.pagination *{ margin:0;padding:0}
|
||||
.pagination img{ border:0}
|
||||
.pagination a,
|
||||
.pagination strong{ position:relative; display:inline-block; text-decoration:none; line-height:normal; color:#333; font-family:Tahoma, Sans-serif; vertical-align:middle;}
|
||||
.pagination strong{ position:relative;display:inline-block;text-decoration:none;line-height:normal;color:#333;font-family:Tahoma, Sans-serif;vertical-align:middle}
|
||||
.pagination a:hover,
|
||||
.pagination a:active,
|
||||
.pagination a:focus{ background-color:#f4f4f4 !important; }
|
||||
.pagination strong{ color:#ff6600 !important;}
|
||||
.pagination a:focus{ background-color:#f4f4f4 !important}
|
||||
.pagination strong{ color:#ff6600 !important}
|
||||
.pagination a.prev,
|
||||
.pagination a.prevEnd,
|
||||
.pagination a.next,
|
||||
.pagination a.nextEnd{ font-weight:normal !important; border:none !important; margin:0 !important; white-space:nowrap; }
|
||||
|
||||
.pagination a.nextEnd{ font-weight:normal !important;border:none !important;margin:0 !important;white-space:nowrap}
|
||||
/* Pagination A1 */
|
||||
.pagination.a1 a,
|
||||
.pagination.a1 strong{ margin:0 -4px; padding:1px 10px 1px 8px; border:none; border-left:1px solid #ccc; border-right:1px solid #ddd; font-weight:bold; font-size:12px; background:#fff;}
|
||||
.pagination.a1 a.prev{ padding-left:10px; background:#fff url(images/white/arrowPrevA1.gif) no-repeat left center; }
|
||||
.pagination.a1 a.prevEnd{ padding-left:15px; background:#fff url(images/white/arrowPrevEndA1.gif) no-repeat left center; }
|
||||
.pagination.a1 a.next{ padding-right:10px; background:#fff url(images/white/arrowNextA1.gif) no-repeat right center; }
|
||||
.pagination.a1 a.nextEnd{ padding-right:15px; background:#fff url(images/white/arrowNextEndA1.gif) no-repeat right center; }
|
||||
|
||||
.pagination.a1 strong{ margin:0 -4px;padding:1px 10px 1px 8px;border:none;border-left:1px solid #ccc;border-right:1px solid #ddd;font-weight:bold;font-size:12px;background:#fff}
|
||||
.pagination.a1 a.prev{ padding-left:10px;background:#fff url(images/white/arrowPrevA1.gif) no-repeat left center}
|
||||
.pagination.a1 a.prevEnd{ padding-left:15px;background:#fff url(images/white/arrowPrevEndA1.gif) no-repeat left center}
|
||||
.pagination.a1 a.next{ padding-right:10px;background:#fff url(images/white/arrowNextA1.gif) no-repeat right center}
|
||||
.pagination.a1 a.nextEnd{ padding-right:15px;background:#fff url(images/white/arrowNextEndA1.gif) no-repeat right center}
|
||||
|
|
@ -1,14 +1,11 @@
|
|||
<load target="js/integration_search_admin.js" usecdn="true" />
|
||||
|
||||
<h3 class="xeAdmin">{$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 class="x_page-header">
|
||||
<h1>{$lang->integration_search}</h1>
|
||||
</div>
|
||||
|
||||
<ul class="x_nav x_nav-tabs">
|
||||
<li class="x_active"|cond="$act=='dispIntegration_searchAdminContent'"><a href="{getUrl('act','dispIntegration_searchAdminContent')}">{$lang->cmd_setup}</a></li>
|
||||
<li class="x_active"|cond="$act=='dispIntegration_searchAdminSkinInfo'"><a href="{getUrl('act','dispIntegration_searchAdminSkinInfo')}">{$lang->cmd_manage_skin}</a></li>
|
||||
<li cond="$module != 'admin'"><a href="{getUrl('act','IS')}">{$lang->cmd_back}</a></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,54 +1,50 @@
|
|||
<!--#include("header.html")-->
|
||||
<load target="../../widget/tpl/js/widget_admin.js" usecdn="true" />
|
||||
<include target="header.html" />
|
||||
<load target="../../module/tpl/js/module_list.js" usecdn="true" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/integration_search/tpl/index/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form ruleset="insertConfig" action="./" method="post" class="form">
|
||||
|
||||
<form ruleset="insertConfig" action="./" method="post" class="x_form-horizontal">
|
||||
<input type="hidden" name="act" value="procIntegration_searchAdminInsertConfig" />
|
||||
<input type="hidden" name="module" value="admin" />
|
||||
<input type="hidden" name="target_module_srl" id="target_module_srl" value="{$config->target_module_srl}" />
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row">{$lang->sample_code}</th>
|
||||
<td >
|
||||
<textarea readonly="readonly" rows="8" cols="42">{$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->target}</th>
|
||||
<td>
|
||||
<select name="target">
|
||||
<option value="include">{$lang->include_search_target}</option>
|
||||
<option value="exclude" <!--@if($config->target=='exclude')-->selected="selected"<!--@end-->>{$lang->exclude_search_target}</option>
|
||||
</select>
|
||||
|
||||
<select name="_target_module_srl" id="_target_module_srl" size="8" style="display:block;margin:10px 0;"></select>
|
||||
|
||||
<a href="{getUrl('','module','module','act','dispModuleSelectList','id','target_module_srl')}" onclick="popopen(this.href, 'ModuleSelect');return false;" class="button blue"><span>{$lang->cmd_insert}</span></a>
|
||||
<a href="#" onclick="midRemove('target_module_srl');return false;" class="button red"><span>{$lang->cmd_delete}</span></a>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery( function() { getModuleSrlList('target_module_srl'); } );
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="xe_validator_id" value="modules/integration_search/tpl/index/1" />
|
||||
|
||||
<div class="x_control-group">
|
||||
<label for="sample_code" class="x_control-label">{$lang->sample_code}</label>
|
||||
<div class="x_controls" style="margin-right:14px">
|
||||
<textarea id="sample_code" readonly style="width:100%;height:100px;cursor:text;font-family:'Courier New', Courier, monospace">{$sample_code}</textarea>
|
||||
<p class="x_help-block">{$lang->about_sample_code}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label for="skin" class="x_control-label">{$lang->skin}</label>
|
||||
<div class="x_controls">
|
||||
<select name="skin" id="skin">
|
||||
<option loop="$skin_list => $key, $val" value="{$key}" selected="selected"|cond="$config->skin == $key">{$val->title}</option>
|
||||
</select>
|
||||
<p class="x_help-inline">{$lang->about_skin}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->target}</label>
|
||||
<div class="x_controls">
|
||||
<select name="target">
|
||||
<option value="include">{$lang->include_search_target}</option>
|
||||
<option value="exclude" selected="selected"|cond="$config->target=='exclude'">{$lang->exclude_search_target}</option>
|
||||
</select>
|
||||
|
||||
<input type="hidden" name="target_module_srl" id="target_module_srl" value="{$config->target_module_srl}" />
|
||||
<select class="modulelist_selected" size="8" multiple="multiple" style="display:block;vertical-align:top;margin:5px 0"></select>
|
||||
<a href="#" id="__module_srl_list_target_module_srl" class="x_btn moduleTrigger" data-multiple="true" style="margin:0 -5px 0 0;border-radius:2px 0 0 0px">{$lang->cmd_add}</a>
|
||||
<button type="button" class="x_btn modulelist_del" style="border-radius:0 2px 2px 0">{$lang->cmd_delete}</button>
|
||||
<script>
|
||||
xe.registerApp(new xe.ModuleListManager('target_module_srl'));
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||
<button class="x_btn x_btn-primary" type="submit">{$lang->cmd_registration}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -1,143 +1,136 @@
|
|||
<!--#include("./header.html")-->
|
||||
<include target="header.html" />
|
||||
|
||||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'moduels/integration_search/tpl/skin_info/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
|
||||
<form action="{Context::getRequestUri()}" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="integration_search" />
|
||||
<input type="hidden" name="act" value="procIntegration_searchAdminInsertSkin" />
|
||||
<input type="hidden" name="xe_validator_id" value="moduels/integration_search/tpl/skin_info/1" />
|
||||
<section class="section">
|
||||
<h1>{$lang->skin_default_info}</h1>
|
||||
|
||||
<h3 class="h3">{$lang->skin_default_info}</h3>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin}</th>
|
||||
<td >{$skin_info->title}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin_author}</th>
|
||||
<td>
|
||||
<!--@foreach($skin_info->author as $author)-->
|
||||
{$author->name} (<a href="{$author->homepage}" onclick="window.open(this.href);return false;">{$author->homepage}</a>, <a href="mailto:{$author->email_address}">{$author->email_address}</a>)<br />
|
||||
<!--@endforeach-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->homepage}</th>
|
||||
<td><a href="{$skin_info->homepage}" onclick="window.open(this.href);return false;">{$skin_info->homepage}</a> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->date}</th>
|
||||
<td>{zdate($skin_info->date, 'Y-m-d')}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->skin_license}</th>
|
||||
<td>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">
|
||||
{$lang->skin}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
{$skin_info->title}
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">
|
||||
{$lang->skin_author}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
<block loop="$skin_info->author=>$author">
|
||||
{$author->name}
|
||||
<block cond="$author->homepage || $author->email_address">
|
||||
(<a href="{$author->homepage}" target="_blank" cond="$author->homepage">{$author->homepage}</a>
|
||||
<block cond="$author->homepage && $author->email_address">, </block>
|
||||
<a href="mailto:{$author->email_address}" cond="$author->email_address">{$author->email_address}</a>)
|
||||
</block><br />
|
||||
</block>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$skin_info->homepage">
|
||||
<label class="x_control-label">{$lang->homepage}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
<a href="{$skin_info->homepage}" target="_blank">{$skin_info->homepage}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->date}
|
||||
</label>
|
||||
<div class="x_controls">{zdate($skin_info->date, 'Y-m-d')}
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$skin_info->license || $skin_info->license_link">
|
||||
<label class="x_control-label">{$lang->skin_license}
|
||||
</label>
|
||||
<div class="x_controls">
|
||||
{nl2br(trim($skin_info->license))}
|
||||
<!--@if($skin_info->license_link)-->
|
||||
<p><a href="{$skin_info->license_link}" onclick="window.close(); return false;">{$skin_info->license_link}</a></p>
|
||||
<!--@end-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">{$lang->description}</th>
|
||||
<td>{nl2br($skin_info->description)}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<h3 class="h3">{$lang->extra_vars}</h3>
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<tr valign="top">
|
||||
<th scope="row">{$lang->colorset}</th>
|
||||
<td>
|
||||
<!--@foreach($skin_info->colorset as $key => $val)-->
|
||||
<p cond="$skin_info->license_link"><a href="{$skin_info->license_link}" target="_blank">{$skin_info->license_link}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group" cond="$skin_info->description">
|
||||
<label class="x_control-label">{$lang->description}
|
||||
</label>
|
||||
<div class="x_controls">{nl2br(trim($skin_info->description))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section" cond="$skin_info->extra_vars || $skin_info->colorset">
|
||||
<h1>{$lang->extra_vars}</h1>
|
||||
<div class="x_control-group" cond="$skin_info->colorset">
|
||||
<label class="x_control-label">{$lang->colorset}</label>
|
||||
<div class="x_controls">
|
||||
<block loop="$skin_info->colorset => $key, $val">
|
||||
<!--@if($val->screenshot)-->
|
||||
{@ $_img_info = getImageSize($val->screenshot); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; }
|
||||
{@ $_img_info = getImageSize($val->screenshot); $_height = $_img_info[1]+40; $_width = $_img_info[0]+20; $_talign = "center"; }
|
||||
<!--@else-->
|
||||
{@ $_width = 200; $_height = 20; $_talign = "left"; }
|
||||
{@ $_width = 200; $_height = 20; $_talign = "left"; }
|
||||
<!--@end-->
|
||||
<div style="float:left;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
|
||||
<input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" <!--@if($module_info->colorset==$val->name)-->checked="checked"<!--@end-->/>
|
||||
<label for="colorset_{$key}">{$val->title}</label>
|
||||
<!--@if($val->screenshot)-->
|
||||
<br />
|
||||
<img src="{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
|
||||
<!--@end-->
|
||||
</div>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!--@foreach($skin_info->extra_vars as $key => $val)-->
|
||||
|
||||
<!--@if($val->group && ((!$group) || $group != $val->group))-->
|
||||
{@$group = $val->group}
|
||||
<div class="table">
|
||||
<table width="100%" border="1" cellspacing="0">
|
||||
<caption>{$group}</caption>
|
||||
<!--@end-->
|
||||
|
||||
<tr>
|
||||
<th scope="row">{$val->title}</th>
|
||||
<td >
|
||||
<!--@if($val->type=="text")-->
|
||||
<!--@if(!$val->value)-->{@ $val->value = $val->default}<!--@endif-->
|
||||
<input type="text" name="{$val->name}" value="{$val->value}" />
|
||||
|
||||
<!--@elseif($val->type=="textarea")-->
|
||||
<textarea name="{$val->name}" rows="8" cols="42">{$val->value}</textarea>
|
||||
|
||||
<!--@elseif($val->type=="select")-->
|
||||
<select name="{$val->name}">
|
||||
<!--@foreach($val->options as $k=>$v)-->
|
||||
<option value="{$v->value}" <!--@if($v->value == $val->value)-->selected="selected"<!--@end-->>{$v->title}</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 style="display:inline-block;text-align:{$_talign};margin-bottom:1em;width:{$_width}px;height:{$_height}px;margin-right:10px;">
|
||||
<label for="colorset_{$key}"><input type="radio" name="colorset" value="{$val->name}" id="colorset_{$key}" checked="checked"|cond="$skin_vars->colorset==$val->name" />
|
||||
{$val->title}</label>
|
||||
<block cond="$val->screenshot">
|
||||
<br />
|
||||
<img src="../../../{$val->screenshot}" alt="{$val->title}" style="border:1px solid #888888;padding:2px;margin:2px;"/>
|
||||
</block>
|
||||
</div>
|
||||
<!--@end-->
|
||||
|
||||
<input type="file" name="{$val->name}" value="" />
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($val->description)-->
|
||||
<p>{nl2br(trim($val->description))}</p>
|
||||
<!--@end-->
|
||||
</td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
|
||||
<!--@if($group)-->
|
||||
</table>
|
||||
</div>
|
||||
<!--@end-->
|
||||
<div class="btnArea">
|
||||
<span class="btn"><input type="submit" value="{$lang->cmd_registration}" /></span>
|
||||
</block>
|
||||
</div>
|
||||
</div>
|
||||
<block loop="$skin_info->extra_vars => $key, $val">
|
||||
<block cond="$val->group && ((!$group) || $group != $val->group)">
|
||||
{@$group = $val->group}
|
||||
</section>
|
||||
<section class="section">
|
||||
<h2>{$group}</h2>
|
||||
</block>
|
||||
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label" for="{$val->name}"|cond="$val->type!='text'&&$val->type!='textarea'" for="lang_{$val->name}"|cond="$val->type=='text'||$val->type=='textarea'">{$val->title}</label>
|
||||
<div class="x_controls">
|
||||
<!--// text -->
|
||||
<input cond="$val->type == 'text'" type="text" name="{$val->name}" id="{$val->name}" value="{htmlspecialchars($val->value)}" class="lang_code" />
|
||||
|
||||
<!--// textarea -->
|
||||
<textarea cond="$val->type == 'textarea'" rows="8" cols="42" name="{$val->name}" id="{$val->name}" class="lang_code">{htmlspecialchars($val->value)}</textarea>
|
||||
|
||||
<!--// select -->
|
||||
<select cond="$val->type == 'select'" name="{$val->name}" id="{$val->name}">
|
||||
<option loop="$val->options => $k, $v" value="{$v->value}" selected="selected"|cond="$v->value == $val->value">{$v->title}</option>
|
||||
</select>
|
||||
|
||||
<!--// checkbox -->
|
||||
<label cond="$val->type == 'checkbox'" loop="$val->options => $k, $v" for="ch_{$key}_{$k}" class="x_inline"><input type="checkbox" name="{$val->name}[]" value="{$v->value}" id="ch_{$key}_{$k}" checked="checked"|cond="@in_array($v->value, $val->value)" class="checkbox" /> {$v->title}</label>
|
||||
|
||||
<!--// radio -->
|
||||
<label cond="$val->type == 'radio'" for="ch_{$key}_{$k}" loop="$val->options => $k, $v" class="x_inline"><input type="radio" name="{$val->name}" value="{$v->value}" id="ch_{$key}_{$k}" checked="checked"|cond="$v->value==$val->value" /> {$v->title}</label>
|
||||
|
||||
<!--// image -->
|
||||
<block cond="$val->type == 'image'">
|
||||
<div cond="$val->value">
|
||||
<img src="{$val->value}" /><br />
|
||||
<label for="del_{$val->name}"><input type="checkbox" name="del_{$val->name}" value="Y" id="del_{$val->name}" class="checkbox" /> {$lang->cmd_delete}</label>
|
||||
</div>
|
||||
<input type="file" name="{$val->name}" value="" />
|
||||
</block>
|
||||
<span class="x_help-block" cond="$val->description">{nl2br(trim($val->description))}</span>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</section>
|
||||
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
<button class="x_btn x_btn-primary" type="submit">{$lang->cmd_registration}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue