mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 03:52:15 +09:00
commit
938d81b685
32 changed files with 375 additions and 293 deletions
|
|
@ -653,6 +653,7 @@ function doDocumentPreview(obj) {
|
|||
'<form id="previewDocument" target="previewDocument" method="post" action="'+request_uri+'">'+
|
||||
'<input type="hidden" name="module" value="document" />'+
|
||||
'<input type="hidden" name="act" value="dispDocumentPreview" />'+
|
||||
'<input type="hidden" name="mid" value="' + current_mid +'" />'+
|
||||
'<input type="hidden" name="content" />'+
|
||||
'</form>'
|
||||
).appendTo(document.body);
|
||||
|
|
|
|||
|
|
@ -358,7 +358,9 @@ class commentController extends comment
|
|||
{
|
||||
return new Object(-1, 'msg_invalid_document');
|
||||
}
|
||||
|
||||
|
||||
// creat the comment model object
|
||||
$oCommentModel = getModel('comment');
|
||||
// get a object of document model
|
||||
$oDocumentModel = getModel('document');
|
||||
|
||||
|
|
@ -436,30 +438,9 @@ class commentController extends comment
|
|||
// if use editor of nohtml, Remove HTML tags from the contents.
|
||||
if(!$manual_inserted)
|
||||
{
|
||||
$editor_config = getModel('editor')->getEditorConfig($obj->module_srl);
|
||||
if (strpos($editor_config->sel_comment_editor_colorset, 'nohtml') !== false)
|
||||
{
|
||||
$is_html_content = false;
|
||||
}
|
||||
elseif ($obj->use_editor === 'Y' || $obj->use_html === 'Y')
|
||||
{
|
||||
$is_html_content = true;
|
||||
}
|
||||
elseif ($obj->use_editor === 'N' || $obj->use_html === 'N')
|
||||
{
|
||||
$is_html_content = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_html_content = is_html_content($obj->content);
|
||||
}
|
||||
|
||||
if (!$is_html_content)
|
||||
{
|
||||
$obj->content = nl2br($obj->use_html === 'Y' ? $obj->content : escape($obj->content, false));
|
||||
}
|
||||
$obj->content = getModel('editor')->converter($obj, 'comment');
|
||||
}
|
||||
|
||||
|
||||
if(!$obj->regdate)
|
||||
{
|
||||
$obj->regdate = date("YmdHis");
|
||||
|
|
@ -558,10 +539,7 @@ class commentController extends comment
|
|||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
|
||||
// creat the comment model object
|
||||
$oCommentModel = getModel('comment');
|
||||
|
||||
|
||||
// get the number of all comments in the posting
|
||||
$comment_count = $oCommentModel->getCommentCount($document_srl);
|
||||
|
||||
|
|
@ -806,34 +784,13 @@ class commentController extends comment
|
|||
{
|
||||
return new Object(-1, 'msg_empty_content');
|
||||
}
|
||||
|
||||
|
||||
// if use editor of nohtml, Remove HTML tags from the contents.
|
||||
if(!$manual_updated)
|
||||
{
|
||||
$editor_config = getModel('editor')->getEditorConfig($obj->module_srl);
|
||||
if (strpos($editor_config->sel_comment_editor_colorset, 'nohtml') !== false)
|
||||
{
|
||||
$is_html_content = false;
|
||||
}
|
||||
elseif ($obj->use_editor === 'Y' || $obj->use_html === 'Y')
|
||||
{
|
||||
$is_html_content = true;
|
||||
}
|
||||
elseif ($obj->use_editor === 'N' || $obj->use_html === 'N')
|
||||
{
|
||||
$is_html_content = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_html_content = is_html_content($obj->content);
|
||||
}
|
||||
|
||||
if (!$is_html_content)
|
||||
{
|
||||
$obj->content = nl2br($obj->use_html === 'Y' ? $obj->content : escape($obj->content, false));
|
||||
}
|
||||
$obj->content = getModel('editor')->converter($obj, 'comment');
|
||||
}
|
||||
|
||||
|
||||
// remove iframe and script if not a top administrator on the session
|
||||
if($logged_info->is_admin != 'Y')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -951,7 +951,7 @@ class commentModel extends comment
|
|||
|
||||
return $comment_config;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a list of voting member
|
||||
* @return void
|
||||
|
|
|
|||
|
|
@ -457,30 +457,9 @@ class documentController extends document
|
|||
// if use editor of nohtml, Remove HTML tags from the contents.
|
||||
if(!$manual_inserted)
|
||||
{
|
||||
$editor_config = getModel('editor')->getEditorConfig($obj->module_srl);
|
||||
if (strpos($editor_config->sel_editor_colorset, 'nohtml') !== false)
|
||||
{
|
||||
$is_html_content = false;
|
||||
}
|
||||
elseif ($obj->use_editor === 'Y' || $obj->use_html === 'Y')
|
||||
{
|
||||
$is_html_content = true;
|
||||
}
|
||||
elseif ($obj->use_editor === 'N' || $obj->use_html === 'N')
|
||||
{
|
||||
$is_html_content = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_html_content = is_html_content($obj->content);
|
||||
}
|
||||
|
||||
if (!$is_html_content)
|
||||
{
|
||||
$obj->content = nl2br($obj->use_html === 'Y' ? $obj->content : escape($obj->content, false));
|
||||
}
|
||||
$obj->content = getModel('editor')->converter($obj, 'document');
|
||||
}
|
||||
|
||||
|
||||
// Remove iframe and script if not a top adminisrator in the session.
|
||||
if($logged_info->is_admin != 'Y') $obj->content = removeHackTag($obj->content);
|
||||
// An error appears if both log-in info and user name don't exist.
|
||||
|
|
@ -716,30 +695,9 @@ class documentController extends document
|
|||
// if use editor of nohtml, Remove HTML tags from the contents.
|
||||
if(!$manual_updated)
|
||||
{
|
||||
$editor_config = getModel('editor')->getEditorConfig($obj->module_srl);
|
||||
if (strpos($editor_config->sel_editor_colorset, 'nohtml') !== false)
|
||||
{
|
||||
$is_html_content = false;
|
||||
}
|
||||
elseif ($obj->use_editor === 'Y' || $obj->use_html === 'Y')
|
||||
{
|
||||
$is_html_content = true;
|
||||
}
|
||||
elseif ($obj->use_editor === 'N' || $obj->use_html === 'N')
|
||||
{
|
||||
$is_html_content = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_html_content = is_html_content($obj->content);
|
||||
}
|
||||
|
||||
if (!$is_html_content)
|
||||
{
|
||||
$obj->content = nl2br($obj->use_html === 'Y' ? $obj->content : escape($obj->content, false));
|
||||
}
|
||||
$obj->content = getModel('editor')->converter($obj, 'document');
|
||||
}
|
||||
|
||||
|
||||
// Change not extra vars but language code of the original document if document's lang_code is different from author's setting.
|
||||
if($source_obj->get('lang_code') != Context::getLangType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1246,7 +1246,7 @@ class documentModel extends document
|
|||
return array_flip($this->getStatusList());
|
||||
else return $lang->status_name_list;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Setting sort index
|
||||
* @param object $obj
|
||||
|
|
|
|||
|
|
@ -61,11 +61,21 @@ class documentView extends document
|
|||
return new Object(-1, 'msg_invalid_request');
|
||||
}
|
||||
|
||||
$content = Context::get('content');
|
||||
|
||||
if(Context::get('logged_info')->is_admin != 'Y')
|
||||
{
|
||||
Context::set('content', removeHackTag(Context::get('content')));
|
||||
$content = removeHackTag($content);
|
||||
}
|
||||
|
||||
// Editor converter
|
||||
$obj = new stdClass;
|
||||
$obj->content = $content;
|
||||
$obj->module_srl = getModel('module')->getModuleInfoByMid(Context::get('mid'))->module_srl;
|
||||
$content = getModel('editor')->converter($obj, 'document');
|
||||
|
||||
Context::set('content', $content);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('preview_page');
|
||||
Context::set('layout', 'none');
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<action name="dispEditorComponentInfo" type="view" />
|
||||
<action name="dispEditorPopup" type="view" />
|
||||
<action name="dispEditorPreview" type="view" />
|
||||
<action name="dispEditorSkinColorset" type="view" permission="root" />
|
||||
<action name="dispEditorSkinColorset" type="view" permission="all-managers" />
|
||||
<action name="dispEditorConfigPreview" type="view" permission="root" />
|
||||
|
||||
<action name="procEditorCall" type="controller" />
|
||||
|
|
|
|||
|
|
@ -161,8 +161,8 @@ class editorAdminController extends editor
|
|||
$config->mobile_comment_editor_toolbar = $configVars->mobile_comment_editor_toolbar;
|
||||
$config->mobile_comment_editor_toolbar_hide = $configVars->mobile_comment_editor_toolbar_hide === 'Y' ? 'Y' : 'N';
|
||||
$config->content_style = $configVars->content_style;
|
||||
$config->sel_editor_colorset= $configVars->sel_editor_colorset;
|
||||
$config->sel_comment_editor_colorset= $configVars->sel_comment_editor_colorset;
|
||||
$config->sel_editor_colorset = $configVars->sel_editor_colorset;
|
||||
$config->sel_comment_editor_colorset = $configVars->sel_comment_editor_colorset;
|
||||
|
||||
if ($configVars->font_defined === 'Y')
|
||||
{
|
||||
|
|
@ -227,6 +227,8 @@ class editorAdminController extends editor
|
|||
$config->content_paragraph_spacing = ctype_digit($config->content_paragraph_spacing) ? ($config->content_paragraph_spacing . 'px') : $config->content_paragraph_spacing;
|
||||
$config->content_word_break = $configVars->content_word_break;
|
||||
$config->content_word_break = in_array($config->content_word_break, array('normal', 'keep-all', 'break-all', 'none')) ? $config->content_word_break : 'normal';
|
||||
$config->enable_autosave = $configVars->enable_autosave ?: 'Y';
|
||||
$config->allow_html = $configVars->allow_html ?: 'Y';
|
||||
$config->autoinsert_image = $configVars->autoinsert_image;
|
||||
$config->autoinsert_image = in_array($config->autoinsert_image, array('paragraph', 'inline', 'none')) ? $config->autoinsert_image : 'paragraph';
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ class editor extends ModuleObject
|
|||
'content_line_height' => '160%',
|
||||
'content_paragraph_spacing' => '0px',
|
||||
'content_word_break' => 'normal',
|
||||
'enable_autosave' => 'Y',
|
||||
'allow_html' => 'Y',
|
||||
'autoinsert_image' => 'paragraph',
|
||||
'additional_css' => array(),
|
||||
'additional_mobile_css' => array(),
|
||||
|
|
|
|||
|
|
@ -147,21 +147,21 @@ class editorController extends editor
|
|||
$editor_config->{$key} = explode('|@|', $grant);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$editor_config->editor_height = (int)Context::get('editor_height');
|
||||
$editor_config->comment_editor_height = (int)Context::get('comment_editor_height');
|
||||
$editor_config->enable_autosave = Context::get('enable_autosave');
|
||||
if($editor_config->enable_autosave != 'Y') $editor_config->enable_autosave = 'N';
|
||||
|
||||
$editor_config->enable_autosave = Context::get('enable_autosave') ?: 'Y';
|
||||
$editor_config->allow_html = Context::get('allow_html') ?: 'Y';
|
||||
|
||||
$oModuleController = getController('module');
|
||||
foreach ($module_srl as $srl)
|
||||
{
|
||||
$oModuleController->insertModulePartConfig('editor',$srl,$editor_config);
|
||||
$oModuleController->insertModulePartConfig('editor', $srl, $editor_config);
|
||||
}
|
||||
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated', 'info');
|
||||
|
||||
|
||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminContent');
|
||||
$this->setRedirectUrl($returnUrl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ class editorModel extends editor
|
|||
}
|
||||
|
||||
// Fill in some other values.
|
||||
if($editor_config->enable_autosave != 'N') $editor_config->enable_autosave = 'Y';
|
||||
if(!is_array($editor_config->enable_html_grant)) $editor_config->enable_html_grant = array();
|
||||
if(!is_array($editor_config->enable_comment_html_grant)) $editor_config->enable_comment_html_grant = array();
|
||||
if(!is_array($editor_config->upload_file_grant)) $editor_config->upload_file_grant = array();
|
||||
|
|
@ -74,10 +73,25 @@ class editorModel extends editor
|
|||
$editor_config->$key = $editor_default_config->$key ?: $val;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $editor_config;
|
||||
}
|
||||
|
||||
function getSkinConfig($skin_name)
|
||||
{
|
||||
$skin_config = new stdClass;
|
||||
|
||||
if($skin_info = getModel('module')->loadSkinInfo($this->module_path, $skin_name))
|
||||
{
|
||||
foreach ($skin_info->extra_vars as $val)
|
||||
{
|
||||
$skin_config->{$val->name} = $val->value;
|
||||
}
|
||||
}
|
||||
|
||||
return $skin_config;
|
||||
}
|
||||
|
||||
function loadDrComponents()
|
||||
{
|
||||
$drComponentPath = _XE_PATH_ . 'modules/editor/skins/dreditor/drcomponents/';
|
||||
|
|
@ -252,6 +266,9 @@ class editorModel extends editor
|
|||
}
|
||||
Context::set('enable_autosave', $option->enable_autosave);
|
||||
|
||||
// Set allow html
|
||||
Context::set('allow_html', ($option->allow_html === false || $option->allow_html === 'N') ? false : true);
|
||||
|
||||
// Load editor components.
|
||||
$site_srl = Context::get('site_module_info')->site_srl ?: 0;
|
||||
if($option->editor_skin === 'dreditor')
|
||||
|
|
@ -406,19 +423,22 @@ class editorModel extends editor
|
|||
}
|
||||
|
||||
// Permission check for file upload
|
||||
if ($logged_info->is_admin === 'Y' || !count($option->upload_file_grant))
|
||||
if($module_srl)
|
||||
{
|
||||
$option->allow_fileupload = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$option->allow_fileupload = false;
|
||||
foreach($group_list as $group_srl => $group_info)
|
||||
if ($logged_info->is_admin === 'Y' || !count($option->upload_file_grant))
|
||||
{
|
||||
if(in_array($group_srl, $option->upload_file_grant))
|
||||
$option->allow_fileupload = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$option->allow_fileupload = false;
|
||||
foreach($group_list as $group_srl => $group_info)
|
||||
{
|
||||
$option->allow_fileupload = true;
|
||||
break;
|
||||
if(in_array($group_srl, $option->upload_file_grant))
|
||||
{
|
||||
$option->allow_fileupload = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -865,6 +885,89 @@ class editorModel extends editor
|
|||
|
||||
return $component_info;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return converted content
|
||||
* @param object $obj
|
||||
* @return string
|
||||
*/
|
||||
function converter($obj, $type = null)
|
||||
{
|
||||
$converter = null;
|
||||
$config = $this->getEditorConfig($obj->module_srl);
|
||||
|
||||
// Get editor skin
|
||||
if (in_array($type, array('document', 'comment')))
|
||||
{
|
||||
$skin = ($type == 'comment') ? $config->comment_editor_skin : $config->editor_skin;
|
||||
}
|
||||
else
|
||||
{
|
||||
$converter = $obj->converter;
|
||||
$skin = $obj->editor_skin ?: $config->editor_skin;
|
||||
}
|
||||
|
||||
// if not inserted converter, Get converter from skin
|
||||
if (!$converter)
|
||||
{
|
||||
$converter = $this->getSkinConfig($skin)->converter;
|
||||
}
|
||||
|
||||
// if not inserted converter, Check
|
||||
if (!$converter)
|
||||
{
|
||||
if ($config->allow_html === 'N' || $obj->use_html === 'N')
|
||||
{
|
||||
$converter = 'text';
|
||||
}
|
||||
elseif (strpos($type == 'comment' ? $config->sel_comment_editor_colorset : $config->sel_editor_colorset, 'nohtml') !== false)
|
||||
{
|
||||
$converter = 'text';
|
||||
}
|
||||
|
||||
if (!is_html_content($obj->content) || $obj->use_editor === 'N')
|
||||
{
|
||||
$converter = 'default';
|
||||
}
|
||||
}
|
||||
|
||||
// Convert
|
||||
if ($converter)
|
||||
{
|
||||
if ($converter == 'text')
|
||||
{
|
||||
// Remove Tag
|
||||
$obj->content = strip_tags($obj->content);
|
||||
|
||||
// Trim space
|
||||
$obj->content = utf8_trim($obj->content);
|
||||
|
||||
// Escape
|
||||
$obj->content = escape($obj->content, false);
|
||||
|
||||
// Insert HTML line
|
||||
$obj->content = nl2br($obj->content);
|
||||
}
|
||||
elseif ($converter == 'text2html')
|
||||
{
|
||||
$obj->content = Rhymix\Framework\Formatter::text2html($obj->content);
|
||||
}
|
||||
elseif ($converter == 'markdown2html')
|
||||
{
|
||||
$obj->content = Rhymix\Framework\Formatter::markdown2html($obj->content);
|
||||
}
|
||||
elseif ($converter == 'bbcode')
|
||||
{
|
||||
$obj->content = Rhymix\Framework\Formatter::bbcode($obj->content);
|
||||
}
|
||||
else
|
||||
{
|
||||
$obj->content = nl2br($obj->content);
|
||||
}
|
||||
}
|
||||
|
||||
return $obj->content;
|
||||
}
|
||||
}
|
||||
/* End of file editor.model.php */
|
||||
/* Location: ./modules/editor/editor.model.php */
|
||||
|
|
|
|||
|
|
@ -149,57 +149,8 @@ class editorView extends editor
|
|||
|
||||
function dispEditorConfigPreview()
|
||||
{
|
||||
$oEditorModel = getModel('editor');
|
||||
$config = $oEditorModel->getEditorConfig();
|
||||
|
||||
$mode = Context::get('mode');
|
||||
|
||||
if($mode != 'main')
|
||||
{
|
||||
$option_com = new stdClass();
|
||||
$option_com->allow_fileupload = false;
|
||||
$option_com->content_style = $config->content_style;
|
||||
$option_com->content_font = $config->content_font;
|
||||
$option_com->content_font_size = $config->content_font_size;
|
||||
$option_com->content_line_height = $config->content_line_height;
|
||||
$option_com->content_paragraph_spacing = $config->content_paragraph_spacing;
|
||||
$option_com->content_word_break = $config->content_word_break;
|
||||
$option_com->enable_autosave = false;
|
||||
$option_com->enable_default_component = true;
|
||||
$option_com->enable_component = true;
|
||||
$option_com->disable_html = false;
|
||||
$option_com->height = $config->comment_editor_height;
|
||||
$option_com->skin = $config->comment_editor_skin;
|
||||
$option_com->content_key_name = 'dummy_content';
|
||||
$option_com->primary_key_name = 'dummy_key';
|
||||
$option_com->content_style = $config->comment_content_style;
|
||||
$option_com->colorset = $config->sel_comment_editor_colorset;
|
||||
$editor = $oEditorModel->getEditor(0, $option_com);
|
||||
}
|
||||
else
|
||||
{
|
||||
$option = new stdClass();
|
||||
$option->allow_fileupload = false;
|
||||
$option->content_style = $config->content_style;
|
||||
$option->content_font = $config->content_font;
|
||||
$option->content_font_size = $config->content_font_size;
|
||||
$option->content_line_height = $config->content_line_height;
|
||||
$option->content_paragraph_spacing = $config->content_paragraph_spacing;
|
||||
$option->content_word_break = $config->content_word_break;
|
||||
$option->enable_autosave = false;
|
||||
$option->enable_default_component = true;
|
||||
$option->enable_component = true;
|
||||
$option->disable_html = false;
|
||||
$option->height = $config->editor_height;
|
||||
$option->skin = $config->editor_skin;
|
||||
$option->content_key_name = 'dummy_content';
|
||||
$option->primary_key_name = 'dummy_key';
|
||||
$option->colorset = $config->sel_editor_colorset;
|
||||
$editor = $oEditorModel->getEditor(0, $option);
|
||||
}
|
||||
|
||||
Context::set('editor', $editor);
|
||||
|
||||
Context::set('editor', getModel('editor')->getModuleEditor(Context::get('type'), 0, 0, 'dummy_key', 'dummy_content'));
|
||||
|
||||
$this->setLayoutFile('popup_layout');
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('config_preview');
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ $lang->enable_default_component_grant = 'Permission to use default components';
|
|||
$lang->enable_extra_component_grant = 'Permission to use extra components';
|
||||
$lang->enable_html_grant = 'Permission to edit HTML';
|
||||
$lang->enable_autosave = 'Enable Auto-Save';
|
||||
$lang->allow_html = 'allow HTML';
|
||||
$lang->height_resizable = 'Height Resizable';
|
||||
$lang->editor_height = 'Height of Editor';
|
||||
$lang->about_default_editor_settings = 'Follow editor settings of Rhymix Admin page through whole site.';
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ $lang->enable_default_component_grant = '기본 컴포넌트 사용 권한';
|
|||
$lang->enable_extra_component_grant = '확장 컴포넌트 사용 권한';
|
||||
$lang->enable_html_grant = 'HTML 편집 권한';
|
||||
$lang->enable_autosave = '자동저장 사용';
|
||||
$lang->allow_html = 'HTML 허용';
|
||||
$lang->height_resizable = '높이 조절 가능';
|
||||
$lang->editor_height = '에디터 높이';
|
||||
$lang->about_default_editor_settings = '사이트 전체 에디터 설정을 통일하여서 모듈별 에디터 설정을 단순하게 합니다.';
|
||||
|
|
|
|||
|
|
@ -1,23 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<skin version="0.1">
|
||||
<title xml:lang="ko">CKEditor 스킨</title>
|
||||
<description xml:lang="ko">CKEditor</description>
|
||||
<version>1.0.0</version>
|
||||
<date>2015-02-24</date>
|
||||
|
||||
<author email_address="developers@xpressengine.com" link="https://www.xpressengine.com">
|
||||
<name xml:lang="ko">NAVER</name>
|
||||
</author>
|
||||
|
||||
<colorset>
|
||||
<color name="moono">
|
||||
<title xml:lang="ko">Moono</title>
|
||||
</color>
|
||||
<color name="moono-dark">
|
||||
<title xml:lang="ko">Moono Dark</title>
|
||||
</color>
|
||||
<color name="moono-lisa">
|
||||
<title xml:lang="ko">Moono Lisa</title>
|
||||
</color>
|
||||
</colorset>
|
||||
<skin version="0.2">
|
||||
<title xml:lang="ko">CKEditor 스킨</title>
|
||||
<description xml:lang="ko">CKEditor</description>
|
||||
<version>1.0.0</version>
|
||||
<date>2015-02-24</date>
|
||||
<author email_address="developers@xpressengine.com" link="https://www.xpressengine.com">
|
||||
<name xml:lang="ko">NAVER</name>
|
||||
</author>
|
||||
<colorset>
|
||||
<color name="moono">
|
||||
<title xml:lang="ko">Moono</title>
|
||||
</color>
|
||||
<color name="moono-dark">
|
||||
<title xml:lang="ko">Moono Dark</title>
|
||||
</color>
|
||||
<color name="moono-lisa">
|
||||
<title xml:lang="ko">Moono Lisa</title>
|
||||
</color>
|
||||
</colorset>
|
||||
</skin>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,3 @@
|
|||
|
||||
.rx_editor_wrapper {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.rx_editor_wrapper .rx_editor_textarea {
|
||||
width: 100%;
|
||||
min-height: 64px;
|
||||
|
|
@ -16,4 +11,5 @@
|
|||
.rx_editor_wrapper .rx_editor_textarea.dark {
|
||||
border-color: #111;
|
||||
background: #333;
|
||||
color: #fff;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
<load target="../../tpl/js/editor_common.js" />
|
||||
<load target="css/textarea.css" />
|
||||
<load target="js/textarea.js" />
|
||||
<load target="js/interface.js" />
|
||||
|
||||
<div id="textarea_wrapper_{$editor_sequence}" class="rx_editor_wrapper">
|
||||
<textarea id="textarea_instance_{$editor_sequence}" class="rx_editor_textarea {$colorset}" data-editor-sequence="{$editor_sequence}" data-editor-primary-key-name="{$editor_primary_key_name}" data-editor-content-key-name="{$editor_content_key_name}"></textarea>
|
||||
|
|
@ -19,33 +22,8 @@
|
|||
textarea.css("word-wrap", "break-word");
|
||||
}
|
||||
|
||||
// Load existing content
|
||||
var content_key = textarea.data("editor-content-key-name");
|
||||
var content_input = textarea.parents("form").find("input[name='" + content_key + "']");
|
||||
if (content_input.size()) {
|
||||
textarea.val(String(content_input.val()).stripTags().unescape());
|
||||
}
|
||||
|
||||
// Save edited content
|
||||
textarea.on("change", function() {
|
||||
content_input.val("<p>" + String($(this).val()).escape().replace(/\r?\n/g, "</p>\n<p>") + "</p>");
|
||||
});
|
||||
|
||||
// Add use_editor and use_html fields to parent form.
|
||||
var parentform = $('#textarea_instance_{$editor_sequence}').parents('form');
|
||||
var use_editor = parentform.find("input[name='use_editor']");
|
||||
var use_html = parentform.find("input[name='use_html']");
|
||||
if (use_editor.size()) {
|
||||
use_editor.val("Y");
|
||||
} else {
|
||||
parentform.append('<input type="hidden" name="use_editor" value="Y" />');
|
||||
}
|
||||
if (use_html.size()) {
|
||||
use_html.val("Y");
|
||||
} else {
|
||||
parentform.append('<input type="hidden" name="use_html" value="Y" />');
|
||||
}
|
||||
|
||||
// Load
|
||||
editorTextarea({$editor_sequence});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
|
|
|||
16
modules/editor/skins/textarea/js/interface.js
Normal file
16
modules/editor/skins/textarea/js/interface.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
function _getTextareaInstance(editor_sequence) {
|
||||
return jQuery('#textarea_instance_' + editor_sequence);
|
||||
}
|
||||
|
||||
function editorGetContent(editor_sequence) {
|
||||
return _getTextareaInstance(editor_sequence).val().escape();
|
||||
}
|
||||
|
||||
function editorReplaceHTML(iframe_obj, content) {
|
||||
var editor_sequence = parseInt(iframe_obj.id.replace(/^.*_/, ''), 10);
|
||||
_getTextareaInstance(editor_sequence).val(String(content).stripTags());
|
||||
}
|
||||
|
||||
function editorGetIFrame(editor_sequence) {
|
||||
return _getTextareaInstance(editor_sequence).get(0);
|
||||
}
|
||||
28
modules/editor/skins/textarea/js/textarea.js
Normal file
28
modules/editor/skins/textarea/js/textarea.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
function editorTextarea(editor_sequence) {
|
||||
var textarea = jQuery("#textarea_instance_" + editor_sequence);
|
||||
var content_key = textarea.data("editor-content-key-name");
|
||||
var primary_key = textarea.data("editor-primary-key-name");
|
||||
var insert_form = textarea.closest("form");
|
||||
var content_input = insert_form.find("input[name='" + content_key + "']");
|
||||
|
||||
// Set editor keys
|
||||
editorRelKeys[editor_sequence] = {};
|
||||
editorRelKeys[editor_sequence].primary = insert_form.find("input[name='" + primary_key + "']");
|
||||
editorRelKeys[editor_sequence].content = content_input;
|
||||
editorRelKeys[editor_sequence].func = editorGetContent;
|
||||
|
||||
// Set editor_sequence
|
||||
insert_form[0].setAttribute('editor_sequence', editor_sequence);
|
||||
|
||||
// Load existing content
|
||||
if (content_input.size()) {
|
||||
var content = String(content_input.val()).stripTags();
|
||||
content_input.val(content);
|
||||
textarea.val(content.unescape());
|
||||
}
|
||||
|
||||
// Save edited content
|
||||
textarea.on("change", function() {
|
||||
content_input.val(String(jQuery(this).val()).escape());
|
||||
});
|
||||
}
|
||||
|
|
@ -1,15 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<skin version="0.1">
|
||||
<title xml:lang="ko">Textarea</title>
|
||||
<description xml:lang="ko">Textarea</description>
|
||||
<version>1.0.0</version>
|
||||
<date>2017-06-27</date>
|
||||
<colorset>
|
||||
<color name="light">
|
||||
<title xml:lang="ko">Light</title>
|
||||
</color>
|
||||
<color name="dark">
|
||||
<title xml:lang="ko">Dark</title>
|
||||
</color>
|
||||
</colorset>
|
||||
<skin version="0.2">
|
||||
<title xml:lang="ko">Textarea</title>
|
||||
<description xml:lang="ko">Textarea</description>
|
||||
<version>1.0.0</version>
|
||||
<date>2017-06-27</date>
|
||||
<colorset>
|
||||
<color name="light">
|
||||
<title xml:lang="ko">Light</title>
|
||||
</color>
|
||||
<color name="dark">
|
||||
<title xml:lang="ko">Dark</title>
|
||||
</color>
|
||||
</colorset>
|
||||
<extra_vars>
|
||||
<var name="converter" value="text"></var>
|
||||
</extra_vars>
|
||||
</skin>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<!-- Editor Preview -->
|
||||
<section class="section">
|
||||
<section class="section collapsed">
|
||||
<h1>{$lang->editor_now}</h1>
|
||||
<div class="x_tabbable _preview">
|
||||
<ul class="x_nav x_nav-tabs" style="margin-bottom:0;border-bottom:0">
|
||||
|
|
@ -16,10 +16,10 @@
|
|||
</ul>
|
||||
<div class="x_tab-content x_thumbnail">
|
||||
<div class="x_tab-pane x_active" id="pre_document">
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview','mode','main')}" id="pre_document_frame" frameborder="0" style="border:0"></iframe>
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview', 'type', 'document')}" id="pre_document_frame" frameborder="0" style="border:0"></iframe>
|
||||
</div>
|
||||
<div class="x_tab-pane" id="pre_comment">
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview','mode','comment')}" id="pre_comment_frame" frameborder="0" style="border:0"></iframe>
|
||||
<iframe src="{getUrl('','act', 'dispEditorConfigPreview', 'type', 'comment')}" id="pre_comment_frame" frameborder="0" style="border:0"></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -212,6 +212,21 @@
|
|||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->enable_autosave}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline"><input type="radio" name="enable_autosave" value="Y" checked="checked"|cond="$editor_config->enable_autosave != 'N'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline"><input type="radio" name="enable_autosave" value="N" checked="checked"|cond="$editor_config->enable_autosave == 'N'" /> {$lang->cmd_no}</label>
|
||||
<p class="x_help-inline">{$lang->about_enable_autosave}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->allow_html}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline"><input type="radio" name="allow_html" value="Y" checked="checked"|cond="$editor_config->allow_html != 'N'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline"><input type="radio" name="allow_html" value="N" checked="checked"|cond="$editor_config->allow_html == 'N'" /> {$lang->cmd_no}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->guide_choose_autoinsert_image}</label>
|
||||
<div class="x_controls">
|
||||
|
|
@ -293,7 +308,7 @@ jQuery(function($){
|
|||
function preview(){
|
||||
$('._preview iframe').css({
|
||||
width : "100%",
|
||||
height : "450px"
|
||||
height : "500px"
|
||||
});
|
||||
}
|
||||
preview();
|
||||
|
|
|
|||
|
|
@ -80,13 +80,19 @@
|
|||
<th scope="row" style="text-align:right"><label for="content_font_size">{$lang->content_font_size}</label></th>
|
||||
<td colspan="2"><input type="text" name="content_font_size" id="content_font_size" value="{$editor_config->content_font_size}" style="width:50px" /> {$lang->about_content_font_size}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr class="editor_skin">
|
||||
<th scope="row" style="text-align:right">{$lang->enable_autosave}</th>
|
||||
<td colspan="2">
|
||||
<label for="enable_autosave" class="x_inline">
|
||||
<input type="checkbox" value="Y" id="enable_autosave" name="enable_autosave" checked="checked"|cond="$editor_config->enable_autosave=='Y'" />
|
||||
{$lang->about_enable_autosave}
|
||||
</label>
|
||||
<label class="x_inline"><input type="radio" name="enable_autosave" value="Y" checked="checked"|cond="$editor_config->enable_autosave != 'N'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline"><input type="radio" name="enable_autosave" value="N" checked="checked"|cond="$editor_config->enable_autosave == 'N'" /> {$lang->cmd_no}</label>
|
||||
<p class="x_help-inline">{$lang->about_enable_autosave}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="editor_skin">
|
||||
<th scope="row" style="text-align:right">{$lang->allow_html}</th>
|
||||
<td colspan="2">
|
||||
<label class="x_inline"><input type="radio" name="allow_html" value="Y" checked="checked"|cond="$editor_config->allow_html != 'N'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline"><input type="radio" name="allow_html" value="N" checked="checked"|cond="$editor_config->allow_html == 'N'" /> {$lang->cmd_no}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -74,6 +74,8 @@ $lang->options = 'Options';
|
|||
$lang->about_keep_signed = 'You will be still signed in even when the browser is closed.\\n\\nIt is not recommended to use this if you are using a public computer, for your personal information could be violated.';
|
||||
$lang->about_keep_warning = 'You will be still signed in even when the browser is closed. It is not recommended to use this if you are using a public computer, for your personal information could be violated';
|
||||
$lang->about_webmaster_email = 'This setting can be changed in the <a href="index.php?module=admin&act=dispAdminConfigNotification" target="_blank">Notification Settings</a> screen.';
|
||||
$lang->retroactive_application = 'retroact';
|
||||
$lang->signature_html_retroact = 'also remove HTML in past inseted HTML signature. Can not be reversed.';
|
||||
$lang->search_target_list['email_address'] = 'Email Address';
|
||||
$lang->search_target_list['regdate'] = 'Sign up Date';
|
||||
$lang->search_target_list['regdate_more'] = 'Sign up Date (more)';
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ $lang->options = '선택 옵션';
|
|||
$lang->about_keep_signed = '브라우저를 닫더라도 로그인이 계속 유지될 수 있습니다.\\n\\n로그인 유지 기능을 사용할 경우 다음 접속부터는 로그인할 필요가 없습니다.\\n\\n단, PC방, 학교, 도서관 등 공공장소에서 이용 시 개인정보가 유출될 수 있으니 꼭 로그아웃을 해주세요.';
|
||||
$lang->about_keep_warning = '브라우저를 닫더라도 로그인이 계속 유지될 수 있습니다. 로그인 유지 기능을 사용할 경우 다음 접속부터는 로그인할 필요가 없습니다. 단, PC방, 학교, 도서관 등 공공장소에서 이용 시 개인정보가 유출될 수 있으니 꼭 로그아웃을 해주세요.';
|
||||
$lang->about_webmaster_email = '이 설정은 <a href="index.php?module=admin&act=dispAdminConfigNotification" target="_blank">알림 설정</a> 화면에서 변경할 수 있습니다.';
|
||||
$lang->retroactive_application = '소급적용';
|
||||
$lang->signature_html_retroact = '이전에 입력된 HTML 서명에서도 HTML을 제거 합니다. 되돌릴 수 없습니다.';
|
||||
$lang->search_target_list['email_address'] = '이메일';
|
||||
$lang->search_target_list['regdate'] = '가입일시';
|
||||
$lang->search_target_list['regdate_more'] = '가입일시(이상)';
|
||||
|
|
@ -120,7 +122,6 @@ $lang->cmd_view_scrapped_document = '스크랩 보기';
|
|||
$lang->cmd_view_saved_document = '저장함 보기';
|
||||
$lang->cmd_send_email = '메일 보내기';
|
||||
$lang->cmd_modify_nickname_log = '닉네임 변경 기록';
|
||||
$lang->cmd_member_file_upload = '서명에 파일 첨부 사용';
|
||||
$lang->cmd_member_profile_view = '회원 프로필사진 보이기';
|
||||
$lang->msg_email_not_exists = '이메일 주소가 존재하지 않습니다.';
|
||||
$lang->msg_alreay_scrapped = '이미 스크랩된 게시물입니다.';
|
||||
|
|
@ -170,7 +171,6 @@ $lang->msg_admin_ip_not_allowed = '접속하신 IP 주소에서는 관리자 로
|
|||
$lang->about_rechecked_password = '회원의 정보를 안전하게 보호하기 위해 비밀번호를 다시 한번 확인 합니다.';
|
||||
$lang->about_user_id = '회원 ID는 3~20자 사이의 영문+숫자로 이루어져야 하며 영문으로 시작해야 합니다.';
|
||||
$lang->about_password = '비밀번호는 6~20자로 되어야 합니다.';
|
||||
$lang->about_member_file_upload = '회원정보의 서명에 파일을 첨부할 수 있도록 합니다.';
|
||||
$lang->cmd_config_password_strength = '비밀번호 보안수준';
|
||||
$lang->cmd_password_hashing_algorithm = '비밀번호 암호화 알고리듬';
|
||||
$lang->cmd_password_hashing_work_factor = '비밀번호 암호화 소요시간';
|
||||
|
|
|
|||
|
|
@ -186,7 +186,6 @@ class memberAdminController extends member
|
|||
'password_hashing_auto_upgrade',
|
||||
'password_change_invalidate_other_sessions',
|
||||
'update_nickname_log',
|
||||
'member_allow_fileupload',
|
||||
'member_profile_view'
|
||||
);
|
||||
|
||||
|
|
@ -261,7 +260,7 @@ class memberAdminController extends member
|
|||
'profile_image', 'profile_image_max_width', 'profile_image_max_height',
|
||||
'image_name', 'image_name_max_width', 'image_name_max_height',
|
||||
'image_mark', 'image_mark_max_width', 'image_mark_max_height',
|
||||
'signature_editor_skin', 'sel_editor_colorset'
|
||||
'signature_editor_skin', 'sel_editor_colorset', 'signature_html', 'signature_html_retroact', 'member_allow_fileupload'
|
||||
);
|
||||
|
||||
$list_order = Context::get('list_order');
|
||||
|
|
|
|||
|
|
@ -387,6 +387,7 @@ class memberAdminView extends member
|
|||
$option = new stdClass;
|
||||
$option->primary_key_name = 'member_srl';
|
||||
$option->content_key_name = 'signature';
|
||||
$option->allow_html = $member_config->signature_html !== 'N';
|
||||
$option->allow_fileupload = $member_config->member_allow_fileupload === 'Y';
|
||||
$option->enable_autosave = false;
|
||||
$option->enable_default_component = true;
|
||||
|
|
|
|||
|
|
@ -1618,18 +1618,28 @@ class memberController extends member
|
|||
*/
|
||||
function putSignature($member_srl, $signature)
|
||||
{
|
||||
$signature = trim(removeHackTag($signature));
|
||||
$signature = preg_replace('/<(\/?)(embed|object|param)/is', '<$1$2', $signature);
|
||||
|
||||
$check_signature = trim(str_replace(array(' ',"\n","\r"),'',strip_tags($signature,'<img><object>')));
|
||||
$path = sprintf('files/member_extra_info/signature/%s/', getNumberingPath($member_srl));
|
||||
$filename = sprintf('%s%d.signature.php', $path, $member_srl);
|
||||
|
||||
if(!$check_signature) return FileHandler::removeFile($filename);
|
||||
|
||||
if((!$signature = utf8_trim(removeHackTag($signature))) || is_empty_html_content($signature))
|
||||
{
|
||||
getController('member')->delSignature($member_srl);
|
||||
return;
|
||||
}
|
||||
|
||||
// Editor converter
|
||||
$obj = new stdClass;
|
||||
$config = getModel('member')->getMemberConfig();
|
||||
if($config->signature_html == 'N')
|
||||
{
|
||||
$obj->converter = 'text';
|
||||
}
|
||||
$obj->content = $signature;
|
||||
$obj->editor_skin = $config->signature_editor_skin;
|
||||
$signature = getModel('editor')->converter($obj);
|
||||
|
||||
$filename = sprintf('files/member_extra_info/signature/%s%d.signature.php', getNumberingPath($member_srl), $member_srl);
|
||||
$buff = sprintf('<?php if(!defined("__XE__")) exit();?>%s', $signature);
|
||||
FileHandler::makeDir($path);
|
||||
FileHandler::writeFile($filename, $buff);
|
||||
Rhymix\Framework\Storage::write($filename, $buff);
|
||||
|
||||
return $signature;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1030,12 +1030,24 @@ class memberModel extends member
|
|||
$filename = sprintf('files/member_extra_info/signature/%s%d.signature.php', getNumberingPath($member_srl), $member_srl);
|
||||
if(file_exists($filename))
|
||||
{
|
||||
$buff = FileHandler::readFile($filename);
|
||||
$signature = preg_replace('/<\?.*\?>/', '', $buff);
|
||||
$signature = preg_replace('/<\?.*\?>/', '', FileHandler::readFile($filename));
|
||||
|
||||
// retroact
|
||||
$config = getModel('member')->getMemberConfig();
|
||||
if($config->signature_html_retroact == 'Y' && $config->signature_html == 'N' && preg_match('/<[^br]+>/i', $signature))
|
||||
{
|
||||
$signature = preg_replace('/(\r?\n)+/', "\n", $signature);
|
||||
return getController('member')->putSignature($member_srl, $signature);
|
||||
}
|
||||
|
||||
$GLOBALS['__member_info__']['signature'][$member_srl] = $signature;
|
||||
}
|
||||
else $GLOBALS['__member_info__']['signature'][$member_srl] = null;
|
||||
else
|
||||
{
|
||||
$GLOBALS['__member_info__']['signature'][$member_srl] = '';
|
||||
}
|
||||
}
|
||||
|
||||
return $GLOBALS['__member_info__']['signature'][$member_srl];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -217,6 +217,7 @@ class memberView extends member
|
|||
$option = new stdClass;
|
||||
$option->primary_key_name = 'member_srl';
|
||||
$option->content_key_name = 'signature';
|
||||
$option->allow_html = $member_config->signature_html !== 'N';
|
||||
$option->allow_fileupload = false;
|
||||
$option->enable_autosave = false;
|
||||
$option->enable_default_component = true;
|
||||
|
|
@ -314,6 +315,7 @@ class memberView extends member
|
|||
$option = new stdClass;
|
||||
$option->primary_key_name = 'member_srl';
|
||||
$option->content_key_name = 'signature';
|
||||
$option->allow_html = $member_config->signature_html !== 'N';
|
||||
$option->allow_fileupload = $member_config->member_allow_fileupload === 'Y';
|
||||
$option->enable_autosave = false;
|
||||
$option->enable_default_component = true;
|
||||
|
|
|
|||
|
|
@ -108,14 +108,6 @@
|
|||
<p class="x_help-inline">{$lang->about_member_sync}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->cmd_member_file_upload}</label>
|
||||
<div class="x_controls">
|
||||
<label for="member_allow_fileupload_y" class="x_inline"><input type="radio" name="member_allow_fileupload" id="member_allow_fileupload_y" value="Y" checked="checked"|cond="$config->member_allow_fileupload == 'Y'" /> {$lang->cmd_yes}</label>
|
||||
<label for="member_allow_fileupload_n" class="x_inline"><input type="radio" name="member_allow_fileupload" id="member_allow_fileupload_n" value="N" checked="checked"|cond="$config->member_allow_fileupload != 'Y'" /> {$lang->cmd_no}</label>
|
||||
<p class="x_help-block">{$lang->about_member_file_upload}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnArea x_clearfix">
|
||||
<span class="x_pull-right"><input class="x_btn x_btn-primary" type="submit" value="{$lang->cmd_save}" /></span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -152,15 +152,40 @@
|
|||
</div>
|
||||
<div cond="$item->name == 'signature'" class="_subItem" style="display:none;padding-top:5px"|cond="!$item->isUse">
|
||||
<select id="signature_editor" name="signature_editor_skin" onchange="getEditorSkinColorList(this.value)">
|
||||
<!--@foreach($editor_skin_list as $editor_skin)-->
|
||||
<option value="{$editor_skin}" selected="selected"|cond="$editor_skin==$config->signature_editor_skin">{$editor_skin}</option>
|
||||
<!--@end-->
|
||||
<!--@foreach($editor_skin_list as $editor_skin)-->
|
||||
<option value="{$editor_skin}" selected="selected"|cond="$editor_skin == $config->signature_editor_skin">{$editor_skin}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<select name="sel_editor_colorset" id="sel_editor_colorset" style="display:none">
|
||||
</select>
|
||||
<script>//<![CDATA[
|
||||
<select name="sel_editor_colorset" id="sel_editor_colorset" style="display:none"></select>
|
||||
<p class="x_help-block">{$lang->allow_html}
|
||||
<label class="x_inline"><input type="radio" name="signature_html" id="signature_html_yes" value="Y" checked="checked"|cond="$config->signature_html != 'N'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline"><input type="radio" name="signature_html" id="signature_html_no" value="N" checked="checked"|cond="$config->signature_html == 'N'" /> {$lang->cmd_no}</label>
|
||||
<label class="x_inline" id="signature_html_retroact" title="{$lang->signature_html_retroact}" style="">
|
||||
<input type="checkbox" name="signature_html_retroact" value="Y" checked="checked"|cond="$config->signature_html_retroact == 'Y'" /> {$lang->retroactive_application}
|
||||
</label>
|
||||
</p>
|
||||
<p class="x_help-block">{$lang->file_upload}
|
||||
<label class="x_inline"><input type="radio" name="member_allow_fileupload" value="Y" checked="checked"|cond="$config->member_allow_fileupload == 'Y'" /> {$lang->cmd_yes}</label>
|
||||
<label class="x_inline"><input type="radio" name="member_allow_fileupload" value="N" checked="checked"|cond="$config->member_allow_fileupload != 'Y'" /> {$lang->cmd_no}</label>
|
||||
</p>
|
||||
<script>
|
||||
getEditorSkinColorList('{$config->signature_editor_skin}','{$config->sel_editor_colorset}');
|
||||
//]]></script>
|
||||
|
||||
if(!$('#signature_html_no').is(':checked'))
|
||||
{
|
||||
$('#signature_html_retroact').hide();
|
||||
}
|
||||
$('#signature_html_yes').change(function(){
|
||||
if($(this).is(':checked')){
|
||||
$('#signature_html_retroact').hide();
|
||||
}
|
||||
});
|
||||
$('#signature_html_no').change(function(){
|
||||
if($(this).is(':checked')){
|
||||
$('#signature_html_retroact').show();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</td>
|
||||
<td class="desc"> </td>
|
||||
|
|
|
|||
|
|
@ -1160,6 +1160,9 @@ class moduleModel extends module
|
|||
// Skin Name
|
||||
$skin_info = new stdClass();
|
||||
$skin_info->title = $xml_obj->title->body;
|
||||
$skin_info->author = array();
|
||||
$skin_info->extra_vars = array();
|
||||
$skin_info->colorset = array();
|
||||
// Author information
|
||||
if($xml_obj->version && $xml_obj->attrs->version == '0.2')
|
||||
{
|
||||
|
|
@ -1173,7 +1176,7 @@ class moduleModel extends module
|
|||
$skin_info->license_link = $xml_obj->license->attrs->link;
|
||||
$skin_info->description = $xml_obj->description->body;
|
||||
|
||||
if(!is_array($xml_obj->author)) $author_list[] = $xml_obj->author;
|
||||
if(!is_array($xml_obj->author)) $author_list = array($xml_obj->author);
|
||||
else $author_list = $xml_obj->author;
|
||||
|
||||
foreach($author_list as $author)
|
||||
|
|
@ -1198,22 +1201,32 @@ class moduleModel extends module
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if(!is_array($group->var)) $extra_vars = array($group->var);
|
||||
|
||||
|
||||
if(!is_array($group->var))
|
||||
{
|
||||
$extra_vars = array($group->var);
|
||||
}
|
||||
|
||||
foreach($extra_vars as $key => $val)
|
||||
{
|
||||
$obj = new stdClass();
|
||||
if(!$val->attrs->type) { $val->attrs->type = 'text'; }
|
||||
|
||||
$obj = new stdClass;
|
||||
$obj->group = $group->title->body;
|
||||
$obj->name = $val->attrs->name;
|
||||
$obj->title = $val->title->body;
|
||||
$obj->type = $val->attrs->type;
|
||||
$obj->type = $val->attrs->type ?: 'text';
|
||||
$obj->description = $val->description->body;
|
||||
$obj->value = array();
|
||||
$obj->value = $val->attrs->value;
|
||||
$obj->default = $val->attrs->default;
|
||||
//if(strpos($obj->value, '|@|') !== false) { $obj->value = explode('|@|', $obj->value); }
|
||||
//if($obj->type == 'mid_list' && !is_array($obj->value)) { $obj->value = array($obj->value); }
|
||||
|
||||
if(preg_match('/,|\|@\|/', $obj->value, $delimiter) && $delimiter[0])
|
||||
{
|
||||
$obj->value = explode($delimiter[0], $obj->value);
|
||||
}
|
||||
if($obj->type == 'mid_list' && !is_array($obj->value))
|
||||
{
|
||||
$obj->value = array($obj->value);
|
||||
}
|
||||
|
||||
// Get an option list from 'select'type
|
||||
if(is_array($val->options))
|
||||
{
|
||||
|
|
@ -1232,7 +1245,7 @@ class moduleModel extends module
|
|||
$obj->options[0]->title = $val->options->title->body;
|
||||
$obj->options[0]->value = $val->options->attrs->value;
|
||||
}
|
||||
|
||||
|
||||
$skin_info->extra_vars[] = $obj;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue