mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 17:22:20 +09:00
english comments added
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0_english@8278 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
693e215bc1
commit
4d272994dd
219 changed files with 6407 additions and 8705 deletions
|
|
@ -2,18 +2,17 @@
|
|||
/**
|
||||
* @class emoticon
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 이모티콘 이미지 연결 컴포넌트
|
||||
* @brief Emoticons image connected components
|
||||
**/
|
||||
|
||||
class emoticon extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
// editor_sequence from the editor must attend mandatory wearing ....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
var $emoticon_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
* @brief editor_sequence and components out of the path
|
||||
**/
|
||||
function emoticon($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
|
|
@ -22,7 +21,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 이모티콘 파일 목록을 리턴
|
||||
* @brief Returns a list of emoticons file
|
||||
**/
|
||||
function getEmoticonList() {
|
||||
$emoticon = Context::get('emoticon');
|
||||
|
|
@ -34,7 +33,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 재귀적으로 이모티콘이 될 법한 파일들을 하위 디렉토리까지 전부 검색한다. 8,000개까지는 테스트 해봤는데 스택오버프로우를 일으킬지 어떨지는 잘 모르겠음.(2007.9.6, 베니)
|
||||
* @brief Likely to be recursively emoticons will search all the files to a subdirectory. 8000 gaekkajineun ran tests whether the stack and raise beef pro-overs and Unsure. (06/09/2007, Benny)
|
||||
**/
|
||||
function getEmoticons($path) {
|
||||
$emoticon_path = sprintf("%s/%s", $this->emoticon_path, $path);
|
||||
|
|
@ -51,10 +50,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window to display in popup window request is to add content
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 이모티콘 디렉토리 목록을 가져옴
|
||||
// Bringing a list of emoticons directory
|
||||
$emoticon_dirs = FileHandler::readDir($this->emoticon_path);
|
||||
$emoticon_list = array();
|
||||
if($emoticon_dirs) {
|
||||
|
|
@ -63,12 +62,10 @@
|
|||
}
|
||||
}
|
||||
Context::set('emoticon_list', $emoticon_list);
|
||||
|
||||
// 첫번째 이모티콘 디렉토리의 이미지 파일을 구함
|
||||
// The first emoticon image files in the directory Wanted
|
||||
$emoticons = $this->getEmoticons($emoticon_list[0]);
|
||||
Context::set('emoticons', $emoticons);
|
||||
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
// Pre-compiled source code to compile template return to
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
|
|
@ -77,7 +74,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 이모티콘의 경로 문제 해결을 하기 위해 추가하였다. (2007.9.6 베니)
|
||||
* @brief Emoticon of the path were added to solve the problem. (06/09/2007 Benny)
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->src;
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@
|
|||
/**
|
||||
* @class image_gallery
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 업로드된 이미지로 이미지갤러리를 만듬
|
||||
* @brief Making images uploaded to the image gallery
|
||||
**/
|
||||
|
||||
class image_gallery extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
// editor_sequence from the editor must attend mandatory wearing ....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
* @brief editor_sequence and components out of the path
|
||||
**/
|
||||
function image_gallery($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
|
|
@ -20,10 +19,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window to display in popup window request is to add content
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
// Pre-compiled source code to compile template return to
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
|
|
@ -34,10 +33,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
|
||||
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$gallery_info->srl = rand(111111,999999);
|
||||
|
|
@ -50,8 +49,7 @@
|
|||
$images_list = $xml_obj->attrs->images_list;
|
||||
$images_list = preg_replace('/\.(gif|jpg|jpeg|png) /i',".\\1\n",$images_list);
|
||||
$gallery_info->images_list = explode("\n",trim($images_list));
|
||||
|
||||
// 만약 출력설정이 XML일 경우 이미지 목록만 출력하도록 코드 생성
|
||||
// If you set the output to output the XML code generated a list of the image
|
||||
if(Context::getResponseMethod() == 'XMLRPC') {
|
||||
$output = '';
|
||||
for($i=0;$i<count($gallery_info->images_list);$i++) {
|
||||
|
|
@ -59,8 +57,7 @@
|
|||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
// HTML 출력일 경우 템플릿 변환을 거쳐서 갤러리 출력 설정에 맞는 html코드를 생성하도록 함
|
||||
// HTML gallery output, the output settings via the template for the conversion to generate the html code should
|
||||
preg_match_all('/(width|height)([^[:digit:]]+)([0-9]+)/i',$xml_obj->attrs->style,$matches);
|
||||
$gallery_info->width = trim($matches[3][0]);
|
||||
if(!$gallery_info->width) $gallery_info->width = 400;
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@
|
|||
/**
|
||||
* @class image_link
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 이미지를 추가하거나 속성을 수정하는 컴포넌트
|
||||
* @brief Add an image, or to modify the properties of components
|
||||
**/
|
||||
|
||||
class image_link extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
// editor_sequence from the editor must attend mandatory wearing ....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
* @brief editor_sequence and components out of the path
|
||||
**/
|
||||
function image_link($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
|
|
@ -20,10 +19,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window to display in popup window request is to add content
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
// Pre-compiled source code to compile template return to
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
|
|
@ -34,10 +33,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
|
||||
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->src;
|
||||
|
|
@ -60,7 +59,7 @@
|
|||
$src = str_replace('&amp;', '&', $src);
|
||||
|
||||
if(!$alt) $alt = $src;
|
||||
// 이미지 주소를 request uri가 포함된 주소로 변환 (rss출력, 등등을 위함)
|
||||
// Image containing the address to the address conversion request uri (rss output, etc. purposes)
|
||||
$temp_src = explode('/', $src);
|
||||
if(substr($src, 0,2)=='./') $src = Context::getRequestUri().substr($src, 2);
|
||||
elseif(substr($src , 0, 1)=='/') {
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@
|
|||
/**
|
||||
* @class multimedia_link
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 본문에 멀티미디어 자료를 연결하는 컴포넌트
|
||||
* @brief The components connected to the body of multimedia data
|
||||
**/
|
||||
|
||||
class multimedia_link extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
// editor_sequence from the editor must attend mandatory wearing ....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
* @brief editor_sequence and components out of the path
|
||||
**/
|
||||
function multimedia_link($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
|
|
@ -20,10 +19,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window to display in popup window request is to add content
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
// Pre-compiled source code to compile template return to
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
|
|
@ -34,10 +33,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
|
||||
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$src = $xml_obj->attrs->multimedia_src;
|
||||
|
|
|
|||
|
|
@ -2,17 +2,16 @@
|
|||
/**
|
||||
* @class poll_maker
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief 에디터에서 url링크하는 기능 제공.
|
||||
* @brief Editor provides the ability to link to the url.
|
||||
**/
|
||||
|
||||
class poll_maker extends EditorHandler {
|
||||
|
||||
// editor_sequence 는 에디터에서 필수로 달고 다녀야 함....
|
||||
// editor_sequence from the editor must attend mandatory wearing ....
|
||||
var $editor_sequence = 0;
|
||||
var $component_path = '';
|
||||
|
||||
/**
|
||||
* @brief editor_sequence과 컴포넌트의 경로를 받음
|
||||
* @brief editor_sequence and components out of the path
|
||||
**/
|
||||
function poll_maker($editor_sequence, $component_path) {
|
||||
$this->editor_sequence = $editor_sequence;
|
||||
|
|
@ -20,15 +19,14 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief popup window요청시 popup window에 출력할 내용을 추가하면 된다
|
||||
* @brief popup window to display in popup window request is to add content
|
||||
**/
|
||||
function getPopupContent() {
|
||||
// 설문조사 스킨을 구함
|
||||
// Wanted Skins survey
|
||||
$oModuleModel = &getModel('module');
|
||||
$skin_list = $oModuleModel->getSkins("./modules/poll/");
|
||||
Context::set('skin_list', $skin_list);
|
||||
|
||||
// 템플릿을 미리 컴파일해서 컴파일된 소스를 return
|
||||
// Pre-compiled source code to compile template return to
|
||||
$tpl_path = $this->component_path.'tpl';
|
||||
$tpl_file = 'popup.html';
|
||||
|
||||
|
|
@ -37,10 +35,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트가 별도의 고유 코드를 이용한다면 그 코드를 html로 변경하여 주는 method
|
||||
* @brief Editor of the components separately if you use a unique code to the html code for a method to change
|
||||
*
|
||||
* 이미지나 멀티미디어, 설문등 고유 코드가 필요한 에디터 컴포넌트는 고유코드를 내용에 추가하고 나서
|
||||
* DocumentModule::transContent() 에서 해당 컴포넌트의 transHtml() method를 호출하여 고유코드를 html로 변경
|
||||
* Images and multimedia, seolmundeung unique code is required for the editor component added to its own code, and then
|
||||
* DocumentModule:: transContent() of its components transHtml() method call to change the html code for your own
|
||||
**/
|
||||
function transHTML($xml_obj) {
|
||||
$poll_srl = $xml_obj->attrs->poll_srl;
|
||||
|
|
@ -51,8 +49,7 @@
|
|||
$width = $matches[2];
|
||||
if(!$width) $width = 400;
|
||||
$style = sprintf('width:%dpx', $width);
|
||||
|
||||
// poll model 객체 생성해서 html 얻어와서 return
|
||||
// poll model object creation to come get it return html
|
||||
$oPollModel = &getModel('poll');
|
||||
return $oPollModel->getPollHtml($poll_srl, $style, $skin);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,19 +2,19 @@
|
|||
/**
|
||||
* @class editorAdminController
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor 모듈의 admin controller class
|
||||
* @brief editor of the module admin controller class
|
||||
**/
|
||||
|
||||
class editorAdminController extends editor {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 활성화
|
||||
* @brief Activate components
|
||||
**/
|
||||
function procEditorAdminEnableComponent() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 비활성화
|
||||
* @brief Deactivate components
|
||||
**/
|
||||
function procEditorAdminDisableComponent() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
|
@ -52,15 +52,14 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 위치 변경
|
||||
* @brief Change a location of the component
|
||||
**/
|
||||
function procEditorAdminMoveListOrder() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$args->site_srl = (int)$site_module_info->site_srl;
|
||||
$args->component_name = Context::get('component_name');
|
||||
$mode = Context::get('mode');
|
||||
|
||||
// DB에서 전체 목록 가져옴
|
||||
// Get a full list of components from the DB
|
||||
if(!$args->site_srl) $output = executeQuery('editor.getComponentList', $args);
|
||||
else $output = executeQuery('editor.getSiteComponentList', $args);
|
||||
|
||||
|
|
@ -108,7 +107,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트 설정
|
||||
* @brief Set components
|
||||
**/
|
||||
function procEditorAdminSetupComponent() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
|
|
@ -138,7 +137,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트를 DB에 추가
|
||||
* @brief Add a component to DB
|
||||
**/
|
||||
function insertComponent($component_name, $enabled = false, $site_srl = 0) {
|
||||
if($enabled) $enabled = 'Y';
|
||||
|
|
@ -147,13 +146,11 @@
|
|||
$args->component_name = $component_name;
|
||||
$args->enabled = $enabled;
|
||||
$args->site_srl = $site_srl;
|
||||
|
||||
// 컴포넌트가 있는지 확인
|
||||
// Check if the component exists
|
||||
if(!$site_srl) $output = executeQuery('editor.isComponentInserted', $args);
|
||||
else $output = executeQuery('editor.isSiteComponentInserted', $args);
|
||||
if($output->data->count) return new Object(-1, 'msg_component_is_not_founded');
|
||||
|
||||
// 입력
|
||||
// Inert a component
|
||||
$args->list_order = getNextSequence();
|
||||
if(!$site_srl) $output = executeQuery('editor.insertComponent', $args);
|
||||
else $output = executeQuery('editor.insertSiteComponent', $args);
|
||||
|
|
|
|||
|
|
@ -2,26 +2,25 @@
|
|||
/**
|
||||
* @class editorAdminView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor 모듈의 admin view 클래스
|
||||
* @brief editor admin view of the module class
|
||||
**/
|
||||
|
||||
class editorAdminView extends editor {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 관리자 설정 페이지
|
||||
* 에디터 컴포넌트의 on/off 및 설정을 담당
|
||||
* @brief Administrator Setting page
|
||||
* Settings to enable/disable editor component and other features
|
||||
**/
|
||||
function dispEditorAdminIndex() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
// 컴포넌트의 종류를 구해옴
|
||||
// Get a type of component
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component_list = $oEditorModel->getComponentList(false, $site_srl, true);
|
||||
|
||||
|
|
@ -32,33 +31,29 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 컴퍼넌트 setup
|
||||
* @brief Component setup
|
||||
**/
|
||||
function dispEditorAdminSetupComponent() {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
$component_name = Context::get('component_name');
|
||||
|
||||
// 에디터 컴포넌트의 정보를 구함
|
||||
// Get information of the editor component
|
||||
$oEditorModel = &getModel('editor');
|
||||
$component = $oEditorModel->getComponent($component_name,$site_srl);
|
||||
Context::set('component', $component);
|
||||
|
||||
// 그룹 설정을 위한 그룹 목록을 구함
|
||||
// Get a group list to set a group
|
||||
$oMemberModel = &getModel('member');
|
||||
$group_list = $oMemberModel->getGroups($site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
|
||||
// mid 목록을 가져옴
|
||||
// Get a mid list
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$args->site_srl = $site_srl;
|
||||
$mid_list = $oModuleModel->getMidList($args);
|
||||
|
||||
// module_category와 module의 조합
|
||||
// Combination of module_category and module
|
||||
if(!$args->site_srl) {
|
||||
// 모듈 카테고리 목록을 구함
|
||||
// Get a list of module category
|
||||
$module_categories = $oModuleModel->getModuleCategories();
|
||||
|
||||
if(!is_array($mid_list)) $mid_list = array($mid_list);
|
||||
|
|
|
|||
|
|
@ -2,19 +2,18 @@
|
|||
/**
|
||||
* @class editor
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor 모듈의 high class
|
||||
* @brief high class of the editor odule
|
||||
**/
|
||||
|
||||
class editor extends ModuleObject {
|
||||
|
||||
/**
|
||||
* @brief 설치시 추가 작업이 필요할시 구현
|
||||
* @brief Implement if additional tasks are necessary when installing
|
||||
**/
|
||||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
// Register action forward (to use in administrator mode)
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
// 기본 에디터 컴포넌트를 추가
|
||||
// Add the default editor component
|
||||
$oEditorController = &getAdminController('editor');
|
||||
$oEditorController->insertComponent('colorpicker_text',true);
|
||||
$oEditorController->insertComponent('colorpicker_bg',true);
|
||||
|
|
@ -26,83 +25,71 @@
|
|||
$oEditorController->insertComponent('table_maker',true);
|
||||
$oEditorController->insertComponent('poll_maker',true);
|
||||
$oEditorController->insertComponent('image_gallery',true);
|
||||
|
||||
// 에디터 모듈에서 사용할 디렉토리 생성
|
||||
// Create a directory to use in the editor module
|
||||
FileHandler::makeDir('./files/cache/editor');
|
||||
|
||||
// 2007. 10. 17 글의 입력(신규 or 수정)이 일어날때마다 자동 저장된 문서를 삭제하는 trigger 추가
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
|
||||
// 2007. 10. 23 모듈의 추가 설정에서 에디터 trigger 추가
|
||||
// 2007. 10. 23 Add an editor trigger on the module addition setup
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
|
||||
|
||||
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 설치가 이상이 없는지 체크하는 method
|
||||
* @brief a method to check if successfully installed
|
||||
**/
|
||||
function checkUpdate() {
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 2009. 06. 15 자동저장시 module_srl 을 저장
|
||||
// 2009. 06. 15 Save module_srl when auto-saving
|
||||
if(!$oDB->isColumnExists("editor_autosave","module_srl")) return true;
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl")) return true;
|
||||
|
||||
|
||||
// 2007. 10. 17 글의 입력(신규 or 수정)이 일어날때마다 자동 저장된 문서를 삭제하는 trigger 추가
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) return true;
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after')) return true;
|
||||
|
||||
// 2007. 10. 23 모듈의 추가 설정에서 에디터 trigger 추가
|
||||
// 2007. 10. 23 Add an editor trigger on the module addition setup
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before')) return true;
|
||||
|
||||
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before')) return true;
|
||||
|
||||
// 2009. 06. 19 사용하지 않는 트리거 제거
|
||||
// 2009. 06. 19 Remove unused trigger
|
||||
if($oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 업데이트 실행
|
||||
* @brief Execute update
|
||||
**/
|
||||
function moduleUpdate() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$oModuleController = &getController('module');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
// 자동저장시 module_srl 을 저장 2009.6.15
|
||||
// Save module_srl when auto-saving 15/06/2009
|
||||
if(!$oDB->isColumnExists("editor_autosave","module_srl"))
|
||||
$oDB->addColumn("editor_autosave","module_srl","number",11);
|
||||
|
||||
// module_srl을 인덱스로
|
||||
// create an index on module_srl
|
||||
if(!$oDB->isIndexExists("editor_autosave","idx_module_srl")) $oDB->addIndex("editor_autosave","idx_module_srl", "module_srl");
|
||||
|
||||
// 2007. 10. 17 글의 입력(신규 or 수정)이 일어날때마다 자동 저장된 문서를 삭제하는 trigger 추가
|
||||
// 2007. 10. 17 Add a trigger to delete automatically saved document whenever the document(insert or update) is modified
|
||||
if(!$oModuleModel->getTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
||||
$oModuleController->insertTrigger('document.insertDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
if(!$oModuleModel->getTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after'))
|
||||
$oModuleController->insertTrigger('document.updateDocument', 'editor', 'controller', 'triggerDeleteSavedDoc', 'after');
|
||||
|
||||
// 2007. 10. 23 모듈의 추가 설정에서 에디터 trigger 추가
|
||||
// 2007. 10. Add an editor trigger on the module addition setup
|
||||
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before'))
|
||||
$oModuleController->insertTrigger('module.dispAdditionSetup', 'editor', 'view', 'triggerDispEditorAdditionSetup', 'before');
|
||||
|
||||
// 2009. 04. 14 editor component 변환 코드를 trigger로 독립
|
||||
// 2009. 04. 14 Add a trigger from compiled codes of the editor component
|
||||
if(!$oModuleModel->getTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before'))
|
||||
$oModuleController->insertTrigger('display', 'editor', 'controller', 'triggerEditorComponentCompile', 'before');
|
||||
|
||||
// 2009. 06. 19 사용하지 않는 트리거 제거
|
||||
// 2009. 06. 19 Remove unused trigger
|
||||
if($oModuleModel->getTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before'))
|
||||
$oModuleController->deleteTrigger('file.getIsPermitted', 'editor', 'controller', 'triggerSrlSetting', 'before');
|
||||
|
||||
|
|
@ -110,10 +97,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 재생성
|
||||
* @brief Re-generate the cache file
|
||||
**/
|
||||
function recompileCache() {
|
||||
// 에디터 컴포넌트 캐시 파일 삭제
|
||||
// Delete the cache file editor component
|
||||
FileHandler::removeFilesInDir("./files/cache/editor");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,19 +2,19 @@
|
|||
/**
|
||||
* @class editor
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor 모듈의 controller class
|
||||
* @brief editor module's controller class
|
||||
**/
|
||||
|
||||
class editorController extends editor {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 자동 저장
|
||||
* @brief AutoSave
|
||||
**/
|
||||
function procEditorSaveDoc() {
|
||||
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 자동저장된 문서 삭제
|
||||
* @brief Delete autosaved documents
|
||||
**/
|
||||
function procEditorRemoveSavedDoc() {
|
||||
$oEditorController = &getController('editor');
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트에서 ajax요청시 해당 컴포넌트의 method를 실행
|
||||
* @brief Execute a method of the component when the component requests ajax
|
||||
**/
|
||||
function procEditorCall() {
|
||||
$component = Context::get('component');
|
||||
|
|
@ -67,12 +67,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터의 모듈별 추가 확장 폼을 저장
|
||||
* @brief Save Editor's additional form for each module
|
||||
**/
|
||||
function procEditorInsertModuleConfig() {
|
||||
$module_srl = Context::get('target_module_srl');
|
||||
|
||||
// 여러개의 모듈 일괄 설정일 경우
|
||||
// To configure many of modules at once
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
|
|
@ -149,7 +148,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터컴포넌트의 코드를 결과물로 변환 + 문서서식 style 지정
|
||||
* @brief convert editor component codes to be returned and specify content style.
|
||||
**/
|
||||
function triggerEditorComponentCompile(&$content) {
|
||||
if(Context::getResponseMethod()!='HTML') return new Object();
|
||||
|
|
@ -189,7 +188,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트코드를 결과물로 변환
|
||||
* @brief Convert editor component codes to be returned
|
||||
**/
|
||||
function transComponent($content) {
|
||||
$content = preg_replace_callback('!<div([^\>]*)editor_component=([^\>]*)>(.*?)\<\/div\>!is', array($this,'transEditorComponent'), $content);
|
||||
|
|
@ -198,7 +197,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 내용의 에디터 컴포넌트 코드를 변환
|
||||
* @brief Convert editor component code of the contents
|
||||
**/
|
||||
function transEditorComponent($matches) {
|
||||
$script = sprintf(' %s editor_component=%s', $matches[1], $matches[2]);
|
||||
|
|
@ -210,8 +209,7 @@
|
|||
$xml_obj->body = $matches[3];
|
||||
|
||||
if(!$xml_obj->attrs->editor_component) return $matches[0];
|
||||
|
||||
// component::transHTML() 을 이용하여 변환된 코드를 받음
|
||||
// Get converted codes by using component::transHTML()
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($xml_obj->attrs->editor_component, 0);
|
||||
if(!is_object($oComponent)||!method_exists($oComponent, 'transHTML')) return $matches[0];
|
||||
|
|
@ -221,7 +219,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief 자동 저장
|
||||
* @brief AutoSave
|
||||
**/
|
||||
function doSaveDoc($args) {
|
||||
|
||||
|
|
@ -232,7 +230,7 @@
|
|||
} else {
|
||||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
// module_srl이 없으면 현재 모듈
|
||||
// Get the current module if module_srl doesn't exist
|
||||
if(!$args->module_srl) {
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
}
|
||||
|
|
@ -240,13 +238,12 @@
|
|||
$current_module_info = Context::get('current_module_info');
|
||||
$args->module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
|
||||
// 저장
|
||||
// Save
|
||||
return executeQuery('editor.insertSavedDoc', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 자동 저장글 Srl 로드 - XE 이전 버전 사용자를 위함.
|
||||
* @brief Load the srl of autosaved document - for those who uses XE older versions.
|
||||
**/
|
||||
function procEditorLoadSavedDocument() {
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
|
|
@ -267,7 +264,7 @@
|
|||
|
||||
|
||||
/**
|
||||
* @brief 게시글의 입력/수정이 일어났을 경우 자동 저장문서를 제거하는 trigger
|
||||
* @brief A trigger to remove auto-saved document when inserting/updating the document
|
||||
**/
|
||||
function triggerDeleteSavedDoc(&$obj) {
|
||||
$this->deleteSavedDoc(false);
|
||||
|
|
@ -275,8 +272,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 자동 저장된 글을 삭제
|
||||
* 현재 접속한 사용자를 기준
|
||||
* @brief Delete the auto-saved document
|
||||
* Based on the current logged-in user
|
||||
**/
|
||||
function deleteSavedDoc($mode = false) {
|
||||
if(Context::get('is_logged')) {
|
||||
|
|
@ -286,13 +283,12 @@
|
|||
$args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
$args->module_srl = Context::get('module_srl');
|
||||
// module_srl이 없으면 현재 모듈
|
||||
// Get the current module if module_srl doesn't exist
|
||||
if(!$args->module_srl) {
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$args->module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
|
||||
// 자동저장된 값이 혹시 이미 등록된 글인지 확인
|
||||
// Check if the auto-saved document already exists
|
||||
$output = executeQuery('editor.getSavedDocument', $args);
|
||||
$saved_doc = $output->data;
|
||||
if(!$saved_doc) return;
|
||||
|
|
@ -305,13 +301,12 @@
|
|||
$output = ModuleHandler::triggerCall('editor.deleteSavedDoc', 'after', $saved_doc);
|
||||
}
|
||||
}
|
||||
|
||||
// 일단 이전 저장본 삭제
|
||||
// Delete the saved document
|
||||
return executeQuery('editor.deleteSavedDoc', $args);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 가상 사이트에서 사용된 에디터 컴포넌트 정보를 제거
|
||||
* @brief ERemove editor component information used on the virtual site
|
||||
**/
|
||||
function removeEditorConfig($site_srl) {
|
||||
$args->site_srl = $site_srl;
|
||||
|
|
@ -319,8 +314,8 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트 목록 캐싱 (editorModel::getComponentList)
|
||||
* 에디터 컴포넌트 목록의 경우 DB query + Xml Parsing 때문에 캐싱 파일을 이용하도록 함
|
||||
* @brief Caching a list of editor component (editorModel::getComponentList)
|
||||
* For the editor component list, use a caching file because of DB query and Xml parsing
|
||||
**/
|
||||
function makeCache($filter_enabled = true, $site_srl) {
|
||||
$oEditorModel = &getModel('editor');
|
||||
|
|
@ -332,11 +327,9 @@
|
|||
$output = executeQuery('editor.getSiteComponentList', $args);
|
||||
} else $output = executeQuery('editor.getComponentList', $args);
|
||||
$db_list = $output->data;
|
||||
|
||||
// 파일목록을 구함
|
||||
// Get a list of files
|
||||
$downloaded_list = FileHandler::readDir(_XE_PATH_.'modules/editor/components');
|
||||
|
||||
// 로그인 여부 및 소속 그룹 구함
|
||||
// Get information about log-in status and its group
|
||||
$is_logged = Context::get('is_logged');
|
||||
if($is_logged) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
|
@ -344,8 +337,7 @@
|
|||
$group_list = array_keys($logged_info->group_list);
|
||||
} else $group_list = array();
|
||||
}
|
||||
|
||||
// DB 목록을 loop돌면서 xml정보까지 구함
|
||||
// Get xml information for looping DB list
|
||||
if(!is_array($db_list)) $db_list = array($db_list);
|
||||
foreach($db_list as $component) {
|
||||
if(in_array($component->component_name, array('colorpicker_text','colorpicker_bg'))) continue;
|
||||
|
|
@ -370,12 +362,11 @@
|
|||
$xml_info->mid_list = $extra_vars->mid_list;
|
||||
}
|
||||
/*
|
||||
// 사용권한이 있으면 권한 체크
|
||||
// Permisshin check if you are granted
|
||||
if($extra_vars->target_group) {
|
||||
// 사용권한이 체크되어 있는데 로그인이 되어 있지 않으면 무조건 사용 중지
|
||||
// Stop using if not logged-in
|
||||
if(!$is_logged) continue;
|
||||
|
||||
// 대상 그룹을 구해서 현재 로그인 사용자의 그룹과 비교
|
||||
// Compare a target group with the current logged-in user group
|
||||
$target_group = $extra_vars->target_group;
|
||||
unset($extra_vars->target_group);
|
||||
|
||||
|
|
@ -388,13 +379,11 @@
|
|||
}
|
||||
if(!$is_granted) continue;
|
||||
}
|
||||
|
||||
// 대상 모듈이 있으면 체크
|
||||
// Check if the target module exists
|
||||
if($extra_vars->mid_list && count($extra_vars->mid_list) && Context::get('mid')) {
|
||||
if(!in_array(Context::get('mid'), $extra_vars->mid_list)) continue;
|
||||
}*/
|
||||
|
||||
// 에디터 컴포넌트의 설정 정보를 체크
|
||||
// Check the configuration of the editor component
|
||||
if($xml_info->extra_vars) {
|
||||
foreach($xml_info->extra_vars as $key => $val) {
|
||||
$xml_info->extra_vars->{$key}->value = $extra_vars->{$key};
|
||||
|
|
@ -403,34 +392,28 @@
|
|||
}
|
||||
|
||||
$component_list->{$component_name} = $xml_info;
|
||||
|
||||
// 버튼, 아이콘 이미지 구함
|
||||
// Get buttons, icons, images
|
||||
$icon_file = _XE_PATH_.'modules/editor/components/'.$component_name.'/icon.gif';
|
||||
$component_icon_file = _XE_PATH_.'modules/editor/components/'.$component_name.'/component_icon.gif';
|
||||
if(file_exists($icon_file)) $component_list->{$component_name}->icon = true;
|
||||
if(file_exists($component_icon_file)) $component_list->{$component_name}->component_icon = true;
|
||||
}
|
||||
|
||||
// enabled만 체크하도록 하였으면 그냥 return
|
||||
// Return if it checks enabled only
|
||||
if($filter_enabled) {
|
||||
$cache_file = $oEditorModel->getCacheFile($filter_enabled, $site_srl);
|
||||
$buff = sprintf('<?php if(!defined("__ZBXE__")) exit(); $component_list = unserialize("%s"); ?>', str_replace('"','\\"',serialize($component_list)));
|
||||
FileHandler::writeFile($cache_file, $buff);
|
||||
return $component_list;
|
||||
}
|
||||
|
||||
// 다운로드된 목록의 xml_info를 마저 구함
|
||||
// Get xml_info of downloaded list
|
||||
foreach($downloaded_list as $component_name) {
|
||||
if(in_array($component_name, array('colorpicker_text','colorpicker_bg'))) continue;
|
||||
|
||||
// 설정된 것이라면 패스
|
||||
// Pass if configured
|
||||
if($component_list->{$component_name}) continue;
|
||||
|
||||
// DB에 입력
|
||||
// Insert data into the DB
|
||||
$oEditorController = &getAdminController('editor');
|
||||
$oEditorController->insertComponent($component_name, false, $site_srl);
|
||||
|
||||
// component_list에 추가
|
||||
// Add to component_list
|
||||
unset($xml_info);
|
||||
$xml_info = $oEditorModel->getComponentXmlInfo($component_name);
|
||||
$xml_info->enabled = 'N';
|
||||
|
|
@ -446,7 +429,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 캐시 파일 삭제
|
||||
* @brief Delete cache files
|
||||
**/
|
||||
function removeCache($site_srl = 0) {
|
||||
$oEditorModel = &getModel('editor');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* @class editorModel
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor 모듈의 model 클래스
|
||||
* @brief model class of the editor odule
|
||||
**/
|
||||
|
||||
class editorModel extends editor {
|
||||
|
|
@ -10,21 +10,21 @@
|
|||
var $loaded_component_list = array();
|
||||
|
||||
/**
|
||||
* @brief 에디터를 return
|
||||
* @brief Return the editor
|
||||
*
|
||||
* 에디터의 경우 내부적으로 1~30까지의 임시 editor_seuqnece를 생성한다.
|
||||
* 즉 한페이지에 30개 이상의 에디터를 출력하지는 못하도록 제한되어 있다.
|
||||
* Editor internally generates editor_sequence from 1 to 30 for temporary use.
|
||||
* That means there is a limitation that more than 30 editors cannot be displayed on a single page.
|
||||
*
|
||||
* 단, 수정하는 경우 또는 파일업로드를 한 자동저장본의 경우는 getNextSequence() 값으로 저장된 editor_seqnece가
|
||||
* 설정된다.
|
||||
* However, editor_sequence can be value from getNextSequence() in case of the modified or the auto-saved for file upload
|
||||
*
|
||||
**/
|
||||
|
||||
/**
|
||||
* @brief 모듈별 에디터 설정을 return
|
||||
* @brief Return editor setting for each module
|
||||
**/
|
||||
function getEditorConfig($module_srl) {
|
||||
if(!$GLOBALS['__editor_module_config__'][$module_srl]) {
|
||||
// 선택된 모듈의 trackback설정을 가져옴
|
||||
// Get trackback settings of the selected module
|
||||
$oModuleModel = &getModel('module');
|
||||
$GLOBALS['__editor_module_config__'][$module_srl] = $oModuleModel->getModulePartConfig('editor', $module_srl);
|
||||
}
|
||||
|
|
@ -75,20 +75,17 @@
|
|||
|
||||
function getDrComponentXmlInfo($drComponentName){
|
||||
$lang_type = Context::getLangType();
|
||||
|
||||
// 요청된 컴포넌트의 xml파일 위치를 구함
|
||||
// Get the xml file path of requested component
|
||||
$component_path = sprintf('%s/skins/dreditor/drcomponents/%s/', $this->module_path, $drComponentName);
|
||||
|
||||
$xml_file = sprintf('%sinfo.xml', $component_path);
|
||||
$cache_file = sprintf('./files/cache/editor/dr_%s.%s.php', $drComponentName, $lang_type);
|
||||
|
||||
// 캐시된 xml파일이 있으면 include 후 정보 return
|
||||
// Return information after including it after cached xml file exists
|
||||
if(file_exists($cache_file) && file_exists($xml_file) && filemtime($cache_file) > filemtime($xml_file)) {
|
||||
include($cache_file);
|
||||
return $xml_info;
|
||||
}
|
||||
|
||||
// 캐시된 파일이 없으면 파싱후 캐싱 후 return
|
||||
// Return after parsing and caching if the cached file does not exist
|
||||
$oParser = new XmlParser();
|
||||
$xml_doc = $oParser->loadXmlFile($xml_file);
|
||||
|
||||
|
|
@ -111,7 +108,7 @@
|
|||
$buff .= sprintf('$xml_info->license = "%s";', $component_info->license);
|
||||
$buff .= sprintf('$xml_info->license_link = "%s";', $component_info->license_link);
|
||||
|
||||
// 작성자 정보
|
||||
// Author information
|
||||
if(!is_array($xml_doc->component->author)) $author_list[] = $xml_doc->component->author;
|
||||
else $author_list = $xml_doc->component->author;
|
||||
|
||||
|
|
@ -154,8 +151,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 추가 변수 정리 (에디터 컴포넌트에서는 text형만 가능)
|
||||
// List extra variables (text type only in the editor component)
|
||||
$extra_vars = $xml_doc->component->extra_vars->var;
|
||||
if($extra_vars) {
|
||||
if(!is_array($extra_vars)) $extra_vars = array($extra_vars);
|
||||
|
|
@ -182,48 +178,40 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 template을 return
|
||||
* upload_target_srl은 글의 수정시 호출하면 됨.
|
||||
* 이 upload_target_srl은 첨부파일의 유무를 체크하기 위한 루틴을 구현하는데 사용됨.
|
||||
* @brief Return the editor template
|
||||
* You can call upload_target_srl when modifying content
|
||||
* The upload_target_srl is used for a routine to check if an attachment exists
|
||||
**/
|
||||
function getEditor($upload_target_srl = 0, $option = null) {
|
||||
/**
|
||||
* 기본적인 에디터의 옵션을 정리
|
||||
* Editor's default options
|
||||
**/
|
||||
// 파일 업로드 유무 옵션 설정
|
||||
// Option setting to allow file upload
|
||||
if(!$option->allow_fileupload) $allow_fileupload = false;
|
||||
else $allow_fileupload = true;
|
||||
|
||||
// content_style 세팅
|
||||
// content_style setting
|
||||
if(!$option->content_style) $option->content_style = 'default';
|
||||
Context::set('content_style', $option->content_style);
|
||||
|
||||
// 기본 글꼴 지정
|
||||
// Default font setting
|
||||
Context::set('content_font', $option->content_font);
|
||||
Context::set('content_font_size', $option->content_font_size);
|
||||
|
||||
// 자동 저장 유무 옵션 설정 글 수정시는 사용 안함
|
||||
// Option setting to allow auto-save
|
||||
if(!$option->enable_autosave) $enable_autosave = false;
|
||||
elseif(Context::get($option->primary_key_name)) $enable_autosave = false;
|
||||
else $enable_autosave = true;
|
||||
|
||||
// 기본 에디터 컴포넌트 사용 설정
|
||||
// Option setting to allow the default editor component
|
||||
if(!$option->enable_default_component) $enable_default_component = false;
|
||||
else $enable_default_component = true;
|
||||
|
||||
// 확장 컴포넌트 사용 설정
|
||||
// Option setting to allow other extended components
|
||||
if(!$option->enable_component) $enable_component = false;
|
||||
else $enable_component = true;
|
||||
|
||||
// html 모드 조절
|
||||
// Setting for html-mode
|
||||
if($option->disable_html) $html_mode = false;
|
||||
else $html_mode = true;
|
||||
|
||||
// 높이 설정
|
||||
// Set Height
|
||||
if(!$option->height) $editor_height = 400;
|
||||
else $editor_height = $option->height;
|
||||
|
||||
// 스킨 설정
|
||||
// Skin Setting
|
||||
$skin = $option->skin;
|
||||
if(!$skin) $skin = 'xpresseditor';
|
||||
|
||||
|
|
@ -236,19 +224,18 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* 자동백업 기능 체크 (글 수정일 경우는 사용하지 않음)
|
||||
* Check the automatic backup feature (do not use if the post is edited)
|
||||
**/
|
||||
if($enable_autosave) {
|
||||
// 자동 저장된 데이터를 추출
|
||||
// Extract auto-saved data
|
||||
$saved_doc = $this->getSavedDoc($upload_target_srl);
|
||||
|
||||
// 자동 저장 데이터를 context setting
|
||||
// Context setting auto-saved data
|
||||
Context::set('saved_doc', $saved_doc);
|
||||
}
|
||||
Context::set('enable_autosave', $enable_autosave);
|
||||
|
||||
/**
|
||||
* 에디터의 고유 번호 추출 (한 페이지에 여러개의 에디터를 출력하는 경우를 대비)
|
||||
* Extract editor's unique number (in order to display multiple editors on a single page)
|
||||
**/
|
||||
if($option->editor_sequence) $editor_sequence = $option->editor_sequence;
|
||||
else {
|
||||
|
|
@ -257,50 +244,42 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* 업로드 활성화시 내부적으로 file 모듈의 환경설정을 이용하여 설정
|
||||
* Upload setting by using configuration of the file module internally
|
||||
**/
|
||||
$files_count = 0;
|
||||
if($allow_fileupload) {
|
||||
$oFileModel = &getModel('file');
|
||||
|
||||
// SWFUploader에 세팅할 업로드 설정 구함
|
||||
// Get upload configuration to set on SWFUploader
|
||||
$file_config = $oFileModel->getUploadConfig();
|
||||
$file_config->allowed_attach_size = $file_config->allowed_attach_size*1024*1024;
|
||||
$file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024;
|
||||
|
||||
Context::set('file_config',$file_config);
|
||||
|
||||
// 업로드 가능 용량등에 대한 정보를 세팅
|
||||
// Configure upload status such as file size
|
||||
$upload_status = $oFileModel->getUploadStatus();
|
||||
Context::set('upload_status', $upload_status);
|
||||
|
||||
// upload가능하다고 설정 (내부적으로 캐싱하여 처리)
|
||||
// Upload enabled (internally caching)
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->setUploadInfo($editor_sequence, $upload_target_srl);
|
||||
|
||||
// 이미 등록된 파일이 있는지 검사
|
||||
// Check if the file already exists
|
||||
if($upload_target_srl) $files_count = $oFileModel->getFilesCount($upload_target_srl);
|
||||
}
|
||||
Context::set('files_count', (int)$files_count);
|
||||
|
||||
Context::set('allow_fileupload', $allow_fileupload);
|
||||
|
||||
// 에디터 동작을 위한 editor_sequence값 설정
|
||||
// Set editor_sequence value
|
||||
Context::set('editor_sequence', $editor_sequence);
|
||||
|
||||
// 파일 첨부 관련 행동을 하기 위해 문서 번호를 upload_target_srl로 설정
|
||||
// 신규문서일 경우 upload_target_srl=0 이고 첨부파일 관련 동작이 요청될때 이 값이 변경됨
|
||||
// Set the document number to upload_target_srl for file attachments
|
||||
// If a new document, upload_target_srl = 0. The value becomes changed when file attachment is requested
|
||||
Context::set('upload_target_srl', $upload_target_srl);
|
||||
|
||||
// 문서 혹은 댓글의 primary key값을 세팅한다.
|
||||
// Set the primary key valueof the document or comments
|
||||
Context::set('editor_primary_key_name', $option->primary_key_name);
|
||||
|
||||
// 내용을 sync 맞추기 위한 content column name을 세팅한다
|
||||
// Set content column name to sync contents
|
||||
Context::set('editor_content_key_name', $option->content_key_name);
|
||||
|
||||
|
||||
/**
|
||||
* 에디터 컴포넌트 체크
|
||||
* Check editor component
|
||||
**/
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
|
@ -314,20 +293,19 @@
|
|||
Context::set('enable_default_component', $enable_default_component);
|
||||
|
||||
/**
|
||||
* html_mode 가능한지 변수 설정
|
||||
* Variable setting if html_mode is available
|
||||
**/
|
||||
Context::set('html_mode', $html_mode);
|
||||
|
||||
/**
|
||||
* 에디터 세로 크기 설정
|
||||
* Set a height of editor
|
||||
**/
|
||||
Context::set('editor_height', $editor_height);
|
||||
|
||||
// 에디터의 초기화를 수동으로하는 것에 대한 값 체크
|
||||
// Check an option whether to start the editor manually
|
||||
Context::set('editor_manual_start', $option->manual_start);
|
||||
|
||||
/**
|
||||
* 템플릿을 미리 컴파일해서 컴파일된 소스를 하기 위해 스킨의 경로를 설정
|
||||
* Set a skin path to pre-compile the template
|
||||
?**/
|
||||
$tpl_path = sprintf('%sskins/%s/', $this->module_path, $skin);
|
||||
$tpl_file = 'editor.html';
|
||||
|
|
@ -340,24 +318,22 @@
|
|||
|
||||
// load editor skin lang
|
||||
Context::loadLang($tpl_path.'lang');
|
||||
|
||||
// tpl 파일을 compile한 결과를 return
|
||||
// Return the compiled result from tpl file
|
||||
$oTemplate = new TemplateHandler();
|
||||
return $oTemplate->compile($tpl_path, $tpl_file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈별 설정이 반영된 에디터 template을 return
|
||||
* getEditor() 와 동일한 결과물을 return하지만 getModuleEditor()는 각 모듈별 추가 설정을 통해 직접 제어되는 설정을 이용하여 에디터를 생성함
|
||||
* @brief Return editor template which contains settings of each module
|
||||
* Result of getModuleEditor() is as same as getEditor(). But getModuleEditor()uses additional settings of each module to generate an editor
|
||||
*
|
||||
* document/ comment 2가지 종류를 이용함.
|
||||
* 굳이 나눈 이유는 하나의 모듈에서 2개 종류의 에디터 사용을 위해서인데 게시판이나 블로그등 원글과 그에 연관된 글(댓글)을 위한 용도임.
|
||||
* 2 types of editors supported; document and comment.
|
||||
* 2 types of editors can be used on a single module. For instance each for original post and reply port.
|
||||
**/
|
||||
function getModuleEditor($type = 'document', $module_srl, $upload_target_srl, $primary_key_name, $content_key_name) {
|
||||
// 지정된 모듈의 에디터 설정을 구해옴
|
||||
// Get editor settings of the module
|
||||
$editor_config = $this->getEditorConfig($module_srl);
|
||||
|
||||
// type에 따른 설정 정리
|
||||
// Configurations listed according to a type
|
||||
if($type == 'document') {
|
||||
$config->editor_skin = $editor_config->editor_skin;
|
||||
$config->content_style = $editor_config->content_style;
|
||||
|
|
@ -383,23 +359,20 @@
|
|||
$config->editor_height = $editor_config->comment_editor_height;
|
||||
$config->enable_autosave = 'N';
|
||||
}
|
||||
|
||||
// 권한 체크를 위한 현재 로그인 사용자의 그룹 설정 체크
|
||||
// Check a group_list of the currently logged-in user for permission check
|
||||
if(Context::get('is_logged')) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$group_list = $logged_info->group_list;
|
||||
} else {
|
||||
$group_list = array();
|
||||
}
|
||||
|
||||
// 에디터 옵션 변수를 미리 설정
|
||||
// Pre-set option variables of editor
|
||||
$option->skin = $config->editor_skin;
|
||||
$option->content_style = $config->content_style;
|
||||
$option->content_font = $config->content_font;
|
||||
$option->content_font_size = $config->content_font_size;
|
||||
$option->colorset = $config->sel_editor_colorset;
|
||||
|
||||
// 파일 업로드 권한 체크
|
||||
// Permission check for file upload
|
||||
$option->allow_fileupload = false;
|
||||
if(count($config->upload_file_grant)) {
|
||||
foreach($group_list as $group_srl => $group_info) {
|
||||
|
|
@ -409,8 +382,7 @@
|
|||
}
|
||||
}
|
||||
} else $option->allow_fileupload = true;
|
||||
|
||||
// 기본 컴포넌트 사용 권한
|
||||
// Permission check for using default components
|
||||
$option->enable_default_component = false;
|
||||
if(count($config->enable_default_component_grant)) {
|
||||
foreach($group_list as $group_srl => $group_info) {
|
||||
|
|
@ -420,8 +392,7 @@
|
|||
}
|
||||
}
|
||||
} else $option->enable_default_component = true;
|
||||
|
||||
// 확장 컴포넌트 사용 권한
|
||||
// Permisshion check for using extended components
|
||||
$option->enable_component = false;
|
||||
if(count($config->enable_component_grant)) {
|
||||
foreach($group_list as $group_srl => $group_info) {
|
||||
|
|
@ -431,8 +402,7 @@
|
|||
}
|
||||
}
|
||||
} else $option->enable_component = true;
|
||||
|
||||
// HTML 편집 권한
|
||||
// HTML editing privileges
|
||||
$enable_html = false;
|
||||
if(count($config->enable_html_grant)) {
|
||||
foreach($group_list as $group_srl => $group_info) {
|
||||
|
|
@ -445,14 +415,11 @@
|
|||
|
||||
if($enable_html) $option->disable_html = false;
|
||||
else $option->disable_html = true;
|
||||
|
||||
// 높이 설정
|
||||
// Set Height
|
||||
$option->height = $config->editor_height;
|
||||
|
||||
// 자동 저장 유무 옵션 설정
|
||||
// Set an option for Auto-save
|
||||
$option->enable_autosave = $config->enable_autosave=='Y'?true:false;
|
||||
|
||||
// 기타 설정
|
||||
// Other settings
|
||||
$option->primary_key_name = $primary_key_name;
|
||||
$option->content_key_name = $content_key_name;
|
||||
|
||||
|
|
@ -460,10 +427,10 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 자동저장되어 있는 정보를 가져옴
|
||||
* @brief Get information which has been auto-saved
|
||||
**/
|
||||
function getSavedDoc($upload_target_srl) {
|
||||
// 로그인 회원이면 member_srl, 아니면 ipaddress로 저장되어 있는 문서를 찾음
|
||||
// Find a document by using member_srl for logged-in user and ipaddress for non-logged user
|
||||
if(Context::get('is_logged')) {
|
||||
$logged_info = Context::get('logged_info');
|
||||
$auto_save_args->member_srl = $logged_info->member_srl;
|
||||
|
|
@ -471,34 +438,29 @@
|
|||
$auto_save_args->ipaddress = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
$auto_save_args->module_srl = Context::get('module_srl');
|
||||
// module_srl이 없으면 현재 모듈
|
||||
// Get the current module if module_srl doesn't exist
|
||||
if(!$auto_save_args->module_srl) {
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$auto_save_args->module_srl = $current_module_info->module_srl;
|
||||
}
|
||||
|
||||
// DB에서 자동저장 데이터 추출
|
||||
// Extract auto-saved data from the DB
|
||||
$output = executeQuery('editor.getSavedDocument', $auto_save_args);
|
||||
$saved_doc = $output->data;
|
||||
|
||||
// 자동저장한 결과가 없으면 null값 return
|
||||
// Return null if no result is auto-saved
|
||||
if(!$saved_doc) return;
|
||||
|
||||
// 자동저장된 값이 혹시 이미 등록된 글인지 확인
|
||||
// Check if the auto-saved document already exists
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oSaved = $oDocumentModel->getDocument($saved_doc->document_srl);
|
||||
if($oSaved->isExists()) return;
|
||||
|
||||
// 자동저장 데이터에 문서번호가 있고 이 번호에 파일이 있다면 파일을 모두 이동하고
|
||||
// 해당 문서 번호를 editor_sequence로 세팅함
|
||||
// Move all the files if the auto-saved data contains document_srl and file
|
||||
// Then set document_srl to editor_sequence
|
||||
if($saved_doc->document_srl && $upload_target_srl && !Context::get('document_srl')) {
|
||||
$saved_doc->module_srl = $auto_save_args->module_srl;
|
||||
$oFileController = &getController('file');
|
||||
$oFileController->moveFile($saved_doc->document_srl, $saved_doc->module_srl, $upload_target_srl);
|
||||
}
|
||||
else if($upload_target_srl) $saved_doc->document_srl = $upload_target_srl;
|
||||
|
||||
// 자동 저장 데이터 변경
|
||||
// Change auto-saved data
|
||||
$oEditorController = &getController('editor');
|
||||
$oEditorController->deleteSavedDoc(false);
|
||||
$oEditorController->doSaveDoc($saved_doc);
|
||||
|
|
@ -507,24 +469,22 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief component의 객체 생성
|
||||
* @brief create objects of the component
|
||||
**/
|
||||
function getComponentObject($component, $editor_sequence = 0, $site_srl = 0) {
|
||||
if(!preg_match('/^[a-zA-Z0-9_-]+$/',$component) || !preg_match('/^[0-9]+$/', $editor_sequence . $site_srl)) return;
|
||||
|
||||
if(!$this->loaded_component_list[$component][$editor_sequence]) {
|
||||
// 해당 컴포넌트의 객체를 생성해서 실행
|
||||
// Create an object of the component and execute
|
||||
$class_path = sprintf('%scomponents/%s/', $this->module_path, $component);
|
||||
$class_file = sprintf('%s%s.class.php', $class_path, $component);
|
||||
if(!file_exists($class_file)) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
|
||||
// 클래스 파일을 읽은 후 객체 생성
|
||||
// Create an object after loading the class file
|
||||
require_once($class_file);
|
||||
$tmp_fn = create_function('$seq,$path', "return new {$component}(\$seq,\$path);");
|
||||
$oComponent = $tmp_fn($editor_sequence, $class_path);
|
||||
if(!$oComponent) return new Object(-1, sprintf(Context::getLang('msg_component_is_not_founded'), $component));
|
||||
|
||||
// 설정 정보를 추가
|
||||
// Add configuration information
|
||||
$component_info = $this->getComponent($component, $site_srl);
|
||||
$oComponent->setInfo($component_info);
|
||||
$this->loaded_component_list[$component][$editor_sequence] = $oComponent;
|
||||
|
|
@ -534,14 +494,14 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief editor skin 목록을 return
|
||||
* @brief Return a list of the editor skin
|
||||
**/
|
||||
function getEditorSkinList() {
|
||||
return FileHandler::readDir('./modules/editor/skins');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 에디터 컴포넌트 목록 캐시 파일 이름 return
|
||||
* @brief Return the cache file name of editor component list
|
||||
**/
|
||||
function getCacheFile($filter_enabled= true, $site_srl = 0) {
|
||||
$lang = Context::getLangType();
|
||||
|
|
@ -555,7 +515,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief component 목록을 return (DB정보 보함)
|
||||
* @brief Return a component list (DB Information included)
|
||||
**/
|
||||
function getComponentList($filter_enabled = true, $site_srl=0, $from_db=false) {
|
||||
$cache_file = $this->getCacheFile(false, $site_srl);
|
||||
|
|
@ -619,7 +579,7 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief compnent의 xml+db정보를 구함
|
||||
* @brief Get xml and db information of the component
|
||||
**/
|
||||
function getComponent($component_name, $site_srl = 0) {
|
||||
$args->component_name = $component_name;
|
||||
|
|
@ -667,28 +627,24 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief component의 xml정보를 읽음
|
||||
* @brief Read xml information of the component
|
||||
**/
|
||||
function getComponentXmlInfo($component) {
|
||||
$lang_type = Context::getLangType();
|
||||
|
||||
// 요청된 컴포넌트의 xml파일 위치를 구함
|
||||
// Get xml file path of the requested components
|
||||
$component_path = sprintf('%s/components/%s/', $this->module_path, $component);
|
||||
|
||||
$xml_file = sprintf('%sinfo.xml', $component_path);
|
||||
$cache_file = sprintf('./files/cache/editor/%s.%s.php', $component, $lang_type);
|
||||
|
||||
// 캐시된 xml파일이 있으면 include 후 정보 return
|
||||
// Include and return xml file information if cached file exists
|
||||
if(file_exists($cache_file) && file_exists($xml_file) && filemtime($cache_file) > filemtime($xml_file)) {
|
||||
include($cache_file);
|
||||
return $xml_info;
|
||||
}
|
||||
|
||||
// 캐시된 파일이 없으면 파싱후 캐싱 후 return
|
||||
// Parse, cache and then return if the cached file doesn't exist
|
||||
$oParser = new XmlParser();
|
||||
$xml_doc = $oParser->loadXmlFile($xml_file);
|
||||
|
||||
// 정보 정리
|
||||
// Component information listed
|
||||
if($xml_doc->component->version && $xml_doc->component->attrs->version == '0.2') {
|
||||
$component_info->component_name = $component;
|
||||
$component_info->title = $xml_doc->component->title->body;
|
||||
|
|
@ -708,8 +664,7 @@
|
|||
$buff .= sprintf('$xml_info->homepage = "%s";', $component_info->homepage);
|
||||
$buff .= sprintf('$xml_info->license = "%s";', $component_info->license);
|
||||
$buff .= sprintf('$xml_info->license_link = "%s";', $component_info->license_link);
|
||||
|
||||
// 작성자 정보
|
||||
// Author information
|
||||
if(!is_array($xml_doc->component->author)) $author_list[] = $xml_doc->component->author;
|
||||
else $author_list = $xml_doc->component->author;
|
||||
|
||||
|
|
@ -776,8 +731,7 @@
|
|||
$buff .= sprintf('$xml_info->author[0]->email_address = "%s";', $xml_info->author->email_address);
|
||||
$buff .= sprintf('$xml_info->author[0]->homepage = "%s";', $xml_info->author->homepage);
|
||||
}
|
||||
|
||||
// 추가 변수 정리 (에디터 컴포넌트에서는 text형만 가능)
|
||||
// List extra variables (text type only for editor component)
|
||||
$extra_vars = $xml_doc->component->extra_vars->var;
|
||||
if($extra_vars) {
|
||||
if(!is_array($extra_vars)) $extra_vars = array($extra_vars);
|
||||
|
|
|
|||
|
|
@ -2,32 +2,30 @@
|
|||
/**
|
||||
* @class editorView
|
||||
* @author NHN (developers@xpressengine.com)
|
||||
* @brief editor 모듈의 view 클래스
|
||||
* @brief view class of the editor module
|
||||
**/
|
||||
|
||||
class editorView extends editor {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
* @brief Initialization
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴포넌트의 팝업 출력을 요청을 받는 action
|
||||
* @brief Action to get a request to display compoenet pop-up
|
||||
**/
|
||||
function dispEditorPopup() {
|
||||
// css 파일 추가
|
||||
// add a css file
|
||||
Context::addCssFile($this->module_path."tpl/css/editor.css");
|
||||
|
||||
// 변수 정리
|
||||
// List variables
|
||||
$editor_sequence = Context::get('editor_sequence');
|
||||
$component = Context::get('component');
|
||||
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$site_srl = (int)$site_module_info->site_srl;
|
||||
|
||||
// component 객체를 받음
|
||||
// Get compoenet object
|
||||
$oEditorModel = &getModel('editor');
|
||||
$oComponent = &$oEditorModel->getComponentObject($component, $editor_sequence, $site_srl);
|
||||
if(!$oComponent->toBool()) {
|
||||
|
|
@ -35,22 +33,19 @@
|
|||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('component_not_founded');
|
||||
} else {
|
||||
|
||||
// 컴포넌트의 popup url을 출력하는 method실행후 결과를 받음
|
||||
// Get the result after executing a method to display popup url of the component
|
||||
$popup_content = $oComponent->getPopupContent();
|
||||
Context::set('popup_content', $popup_content);
|
||||
|
||||
// 레이아웃을 popup_layout으로 설정
|
||||
// Set layout to popup_layout
|
||||
$this->setLayoutFile('popup_layout');
|
||||
|
||||
// 템플릿 지정
|
||||
// Set a template
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('popup');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 컴퍼넌트 정보 보기
|
||||
* @brief Get component information
|
||||
**/
|
||||
function dispEditorComponentInfo() {
|
||||
$component_name = Context::get('component_name');
|
||||
|
|
@ -68,28 +63,26 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 추가 설정에서 에디터 설정을 하는 form 추가
|
||||
* @brief Add a form for editor addition setup
|
||||
**/
|
||||
function triggerDispEditorAdditionSetup(&$obj) {
|
||||
$current_module_srl = Context::get('module_srl');
|
||||
$current_module_srls = Context::get('module_srls');
|
||||
|
||||
if(!$current_module_srl && !$current_module_srls) {
|
||||
// 선택된 모듈의 정보를 가져옴
|
||||
// Get information of the current module
|
||||
$current_module_info = Context::get('current_module_info');
|
||||
$current_module_srl = $current_module_info->module_srl;
|
||||
if(!$current_module_srl) return new Object();
|
||||
}
|
||||
|
||||
// 에디터 설정을 구함
|
||||
// Get editors settings
|
||||
$oEditorModel = &getModel('editor');
|
||||
$editor_config = $oEditorModel->getEditorConfig($current_module_srl);
|
||||
|
||||
Context::set('editor_config', $editor_config);
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
|
||||
// 에디터 스킨 목록을 구함
|
||||
// Get a list of editor skin
|
||||
$editor_skin_list = FileHandler::readDir(_XE_PATH_.'modules/editor/skins');
|
||||
Context::set('editor_skin_list', $editor_skin_list);
|
||||
|
||||
|
|
@ -105,15 +98,12 @@
|
|||
$content_style_list[$style]->title = $info->title;
|
||||
}
|
||||
Context::set('content_style_list', $content_style_list);
|
||||
|
||||
|
||||
// 그룹 목록을 구함
|
||||
// Get a group list
|
||||
$oMemberModel = &getModel('member');
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$group_list = $oMemberModel->getGroups($site_module_info->site_srl);
|
||||
Context::set('group_list', $group_list);
|
||||
|
||||
// 템플릿 파일 지정
|
||||
// Set a template file
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'editor_module_config');
|
||||
$obj .= $tpl;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue