인증키를 직접 삽입 후 아래 파일로 교체함.
<?php /** * Froala WYSIWYG Editor Skin * Base class of froala WYSIWYG editor skin * @author largeden (largeden@romanesque.co) * @package /modules/editor/skins/froalaeditor */ class roFE extends ModuleObject { //var $rokey = array(); var $rokey = array('인증키'); var $roact = array('dispEditorConfigPreview','dispCommunicationSendMessage'); function roFE () { $oModuleModel = getModel('module'); $froalaeditor_default_config = $oModuleModel->getModuleConfig('froalaeditor'); if(!$froalaeditor_default_config) { $froalaeditor_default_config = new stdClass(); } if(count($this->rokey) == 0) { $this->rokey = $froalaeditor_default_config->license_key; $this->rokey = array_filter(array_map('trim', preg_split('/[\r\n]/', $this->rokey)), function($item) { return $item !== ''; }); } $filename = '_f_'; $path = 'files/cache/froalaeditor/'.$filename.'.js'; $cookie = $filename; $script = "try { (function (k){localStorage.ROK=k;})([".'"'.implode( '","', $this->rokey ).'"'."]) } catch(e){}"; if(!@FileHandler::readFile($path)) { @FileHandler::writeFile($path, $script, 'w'); } // if(!$_COOKIE[$cookie]) // { // setcookie($cookie,date('YmdHis'),time()+(60*60*24*365)); // Context::addJsFile($path, false, '', 0, 'body'); // } // elseif($_COOKIE[$cookie] < date('YmdHis', filemtime($path))) // { // setcookie($cookie,"",time()-3600); // Context::addJsFile($path, false, '', 0, 'body'); // } if(!$_COOKIE[$cookie]) { setcookie($cookie,date('YmdHis'),time()+(60*60*24*365)); Context::addJsFile($path, false, '', 0, 'body'); } elseif($_COOKIE[$cookie] < date('YmdHis', filemtime($path))) { setcookie($cookie,"",time()-3600); Context::addJsFile($path, false, '', 0, 'body'); } else { Context::addJsFile($path, false, '', 0, 'body'); } if(in_array(Context::get('act'), $this->roact)) { Context::set('roact', true); } $this->getFroalaeditorConfig($froalaeditor_default_config, Context::get('module_info')->module_srl); } function getFroalaeditorConfig ($froalaeditor_default_config,$current_module_srl = '') { if(!$current_module_srl && !Context::get('roact')) { return; } if($current_module_srl) { $oModuleModel = getModel('module'); $froalaeditor_config = $oModuleModel->getModulePartConfig('froalaeditor', $current_module_srl); } if(!$froalaeditor_config) { $froalaeditor_config = new stdClass(); } if($froalaeditor_default_config->is_froalaeditor_document_config == 'Y') { Context::set('froalaeditor_default_document_config', $froalaeditor_default_config->froalaeditor_document_config); } if($froalaeditor_default_config->is_froalaeditor_comment_config == 'Y') { Context::set('froalaeditor_default_comment_config', $froalaeditor_default_config->froalaeditor_comment_config); } if($froalaeditor_default_config->is_froalaeditor_message_config == 'Y') { Context::set('froalaeditor_default_message_config', $froalaeditor_default_config->froalaeditor_message_config); } if($froalaeditor_default_config->is_froalaeditor_document_mobile_config == 'Y') { Context::set('froalaeditor_default_document_mobile_config', $froalaeditor_default_config->froalaeditor_document_mobile_config); } if($froalaeditor_default_config->is_froalaeditor_comment_mobile_config == 'Y') { Context::set('froalaeditor_default_comment_mobile_config', $froalaeditor_default_config->froalaeditor_comment_mobile_config); } if($froalaeditor_default_config->is_froalaeditor_message_mobile_config == 'Y') { Context::set('froalaeditor_default_message_mobile_config', $froalaeditor_default_config->froalaeditor_message_mobile_config); } if(Context::get('act') == 'dispEditorConfigPreview') { return; } if($froalaeditor_config->is_froalaeditor_document_config == 'Y') { Context::set('froalaeditor_document_config', $froalaeditor_config->froalaeditor_document_config); } if($froalaeditor_config->is_froalaeditor_comment_config == 'Y') { Context::set('froalaeditor_comment_config', $froalaeditor_config->froalaeditor_comment_config); } if($froalaeditor_config->is_froalaeditor_document_mobile_config == 'Y') { Context::set('froalaeditor_document_mobile_config', $froalaeditor_config->froalaeditor_document_mobile_config); } if($froalaeditor_config->is_froalaeditor_comment_mobile_config == 'Y') { Context::set('froalaeditor_comment_mobile_config', $froalaeditor_config->froalaeditor_comment_mobile_config); } if($froalaeditor_config->froalaeditor_cdn == 'N') { $module_info = Context::get('module_info'); $module_info->ro_cdn =$froalaeditor_config->froalaeditor_cdn; Context::set('module_info', $module_info); } } } $roFE = new roFE(); $roFE->roFE(); /* End of file editor.php */ /* Location: ./modules/editor/skins/froalaeditor/editor.php */
참조
https://github.com/rhymix/rhymix/issues/2360
https://romanesque.me/contact/18338