diff --git a/modules/editor/lang/en.php b/modules/editor/lang/en.php index 2419c8867..77087dfc6 100644 --- a/modules/editor/lang/en.php +++ b/modules/editor/lang/en.php @@ -65,7 +65,7 @@ $lang->msg_auto_saved = 'Automatically Saved.'; $lang->cmd_disable = 'Inactive'; $lang->cmd_enable = 'Active'; $lang->cmd_select_cover = 'Be a cover image'; -$lang->default_editor_settings = 'Default settings for this module'; +$lang->default_editor_settings = 'Use Default Settings'; $lang->editor_skin = 'Editor Skin'; $lang->upload_file_grant = 'Permission to upload files'; $lang->enable_default_component_grant = 'Permission to use default components'; @@ -75,7 +75,7 @@ $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.'; +$lang->about_default_editor_settings = 'Follow the default settings from the Editor module.'; $lang->about_content_font = 'Please use comma for multiple input.'; $lang->about_content_font_size = 'Please input units such as px or em.'; $lang->about_enable_autosave = 'You may decide whether the auto-save function will be used.'; diff --git a/modules/editor/lang/ko.php b/modules/editor/lang/ko.php index 2e80a7ebb..e6abe63e5 100644 --- a/modules/editor/lang/ko.php +++ b/modules/editor/lang/ko.php @@ -79,7 +79,7 @@ $lang->enable_autosave = '자동저장 사용'; $lang->allow_html = 'HTML 허용'; $lang->height_resizable = '높이 조절 가능'; $lang->editor_height = '에디터 높이'; -$lang->about_default_editor_settings = '사이트 전체 에디터 설정을 통일하여서 모듈별 에디터 설정을 단순하게 합니다.'; +$lang->about_default_editor_settings = '에디터 모듈의 기본 설정을 따릅니다.'; $lang->about_content_font = '콤마(,)로 여러 폰트를 지정할 수 있습니다.'; $lang->about_content_font_size = '12px, 1em등 단위까지 포함해서 입력해주세요.'; $lang->about_enable_autosave = '글 작성 시 자동 저장 기능을 활성화 시킬 수 있습니다.'; diff --git a/modules/file/file.admin.controller.php b/modules/file/file.admin.controller.php index e7ea054c9..1b11dd4f1 100644 --- a/modules/file/file.admin.controller.php +++ b/modules/file/file.admin.controller.php @@ -147,8 +147,6 @@ class fileAdminController extends file if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl); else $module_srl = array($module_srl); - $download_grant = Context::get('download_grant'); - $file_config = new stdClass; $file_config->allowed_filesize = Context::get('allowed_filesize'); $file_config->allowed_attach_size = Context::get('allowed_attach_size'); @@ -163,15 +161,6 @@ class fileAdminController extends file $file_config->image_autorotate = Context::get('image_autorotate') === 'Y' ? true : false; $file_config->image_autorotate_quality = max(50, min(100, intval(Context::get('image_autorotate_quality')))); - if(!is_array($download_grant)) - { - $file_config->download_grant = explode('|@|',$download_grant); - } - else - { - $file_config->download_grant = array_values($download_grant); - } - // Check maximum file size if (PHP_INT_SIZE < 8) { @@ -196,6 +185,23 @@ class fileAdminController extends file $file_config->allowed_filetypes = '*.*'; } + // Use default config + if(Context::get('use_default_file_config') === 'Y') + { + $file_config = new stdClass; + $file_config->use_default_file_config = true; + } + + // Check download grant + $download_grant = Context::get('download_grant'); + if(!is_array($download_grant)) + { + $file_config->download_grant = explode('|@|',$download_grant); + } + else + { + $file_config->download_grant = array_values($download_grant); + } $oModuleController = getController('module'); for($i=0;$iuse_default_file_config = $file_config->use_default_file_config; $config->allowed_filesize = $file_config->allowed_filesize; $config->allowed_attach_size = $file_config->allowed_attach_size; $config->allowed_filetypes = $file_config->allowed_filetypes; diff --git a/modules/file/lang/en.php b/modules/file/lang/en.php index 04c0f0d2b..62ae777ab 100644 --- a/modules/file/lang/en.php +++ b/modules/file/lang/en.php @@ -32,6 +32,8 @@ $lang->inline_download_audio = 'Audio'; $lang->inline_download_video = 'Video'; $lang->inline_download_text = 'Text (except HTML)'; $lang->inline_download_pdf = 'PDF'; +$lang->use_default_file_config = 'Use Default Settings'; +$lang->about_use_default_file_config = 'Follow the default settings from the File module.'; $lang->about_inline_download_format = 'Selected types of files will be opened in the current window instead of a download dialog when a user clicks the download link.'; $lang->enable_download_group = 'Downloadable Groups'; $lang->about_allow_outlink = 'Allow other websites to link directly to your download URLs.
Rhymix does not control links to image files that can be embedded directly in a document.
in order to block external links to such images, you may need to modify your web server configuration.'; diff --git a/modules/file/lang/ko.php b/modules/file/lang/ko.php index e4be7a262..d6dba863e 100644 --- a/modules/file/lang/ko.php +++ b/modules/file/lang/ko.php @@ -32,6 +32,8 @@ $lang->inline_download_audio = '오디오'; $lang->inline_download_video = '비디오'; $lang->inline_download_text = '텍스트 (HTML 제외)'; $lang->inline_download_pdf = 'PDF'; +$lang->use_default_file_config = '기본 파일 설정 사용'; +$lang->about_use_default_file_config = '파일 모듈의 기본 설정을 따릅니다.'; $lang->about_inline_download_format = '선택한 종류의 파일은 다운로드 링크를 클릭하더라도 다운로드 창을 열지 않고 현재 창에 표시합니다.'; $lang->enable_download_group = '다운로드 가능 그룹'; $lang->about_allow_outlink = '다른 사이트에서 파일 다운로드 링크에 직접 접근하는 것을 허용합니다.
본문에 바로 삽입할 수 있는 이미지 파일은 라이믹스에서 접근을 통제할 수 없으며, 이를 차단하려면 웹서버 설정이 필요합니다.'; diff --git a/modules/file/tpl/css/config.css b/modules/file/tpl/css/config.css new file mode 100644 index 000000000..8dda1fea9 --- /dev/null +++ b/modules/file/tpl/css/config.css @@ -0,0 +1,5 @@ +.use_default_file_config { + margin-top: -10px; + border-bottom: 1px solid #ccc; + background: #f5f5f5; +} \ No newline at end of file diff --git a/modules/file/tpl/file_module_config.html b/modules/file/tpl/file_module_config.html index bb78bd8f3..da4f3d4df 100644 --- a/modules/file/tpl/file_module_config.html +++ b/modules/file/tpl/file_module_config.html @@ -1,3 +1,6 @@ + + +

{$lang->file}

@@ -7,6 +10,17 @@ +
+ +
+ +
+
+
diff --git a/modules/file/tpl/js/config.js b/modules/file/tpl/js/config.js new file mode 100644 index 000000000..6b37187d5 --- /dev/null +++ b/modules/file/tpl/js/config.js @@ -0,0 +1,12 @@ +(function($) { + $(function() { + + $('#use_default_file_config').on('change', function() { + if ($(this).is(':checked')) { + $('.use_custom_file_config').hide(); + } else { + $('.use_custom_file_config').show(); + } + }); + }); +})(jQuery);