diff --git a/modules/admin/admin.admin.controller.php b/modules/admin/admin.admin.controller.php
index cbe6475fa..21e819733 100644
--- a/modules/admin/admin.admin.controller.php
+++ b/modules/admin/admin.admin.controller.php
@@ -816,7 +816,7 @@ class adminAdminController extends admin
// Thumbnail settings
$oDocumentModel = getModel('document');
$document_config = $oDocumentModel->getDocumentConfig();
- $document_config->thumbnail_type = $vars->thumbnail_type === 'ratio' ? 'ratio' : 'crop';
+ $document_config->thumbnail_type = $vars->thumbnail_type ?: 'crop';
$oModuleController = getController('module');
$oModuleController->insertModuleConfig('document', $document_config);
diff --git a/modules/admin/lang/en.php b/modules/admin/lang/en.php
index c5ae38649..2597c831c 100644
--- a/modules/admin/lang/en.php
+++ b/modules/admin/lang/en.php
@@ -214,8 +214,9 @@ $lang->tablets_as_mobile = 'Treat Tablets as Mobile';
$lang->thumbnail_type = 'Select thumbnail type.';
$lang->input_footer_script = 'Footer script';
$lang->detail_input_footer_script = 'The script is inserted into the bottom of body. It does not work at admin page.';
-$lang->corp = 'Crop (Cut)';
-$lang->ratio = 'Ratio (Keep Aspect Ratio)';
+$lang->thumbnail_crop = 'Crop';
+$lang->thumbnail_ratio = 'Keep aspect ratio (may result in spaces)';
+$lang->thumbnail_none = 'Do not create thumbnails';
$lang->admin_ip_allow = 'IP addresses allowed to log in as administrator';
$lang->admin_ip_deny = 'IP addresses forbidden to log in as administrator';
$lang->local_ip_address = 'Local IP address';
diff --git a/modules/admin/lang/ja.php b/modules/admin/lang/ja.php
index 3eea07a08..72245d979 100644
--- a/modules/admin/lang/ja.php
+++ b/modules/admin/lang/ja.php
@@ -125,8 +125,9 @@ $lang->about_use_mobile_view = 'モバイル機器で接続した際にモバイ
$lang->thumbnail_type = 'サムネイルの作成方式を選択してください。';
$lang->input_footer_script = '下段(footer)スクリプト';
$lang->detail_input_footer_script = '最下段にコードを追加します。管理者ページでは遂行できません。';
-$lang->corp = '切り取り';
-$lang->ratio = 'Ratio(縦横の比率をキープ)';
+$lang->thumbnail_crop = 'トリミングする';
+$lang->thumbnail_ratio = '比率に合わせる';
+$lang->thumbnail_none = 'サムネイルを作成しない';
$lang->admin_ip_allow = '管理者ログイン許容IP';
$lang->admin_ip_deny = '管理者ログイン禁止IP';
$lang->local_ip_address = 'ローカルIPアドレス';
diff --git a/modules/admin/lang/ko.php b/modules/admin/lang/ko.php
index 7fc6b5c76..c84c4b225 100644
--- a/modules/admin/lang/ko.php
+++ b/modules/admin/lang/ko.php
@@ -209,8 +209,9 @@ $lang->tablets_as_mobile = '태블릿도 모바일 취급';
$lang->thumbnail_type = '썸네일 생성 방식';
$lang->input_footer_script = '하단(footer) 스크립트';
$lang->detail_input_footer_script = '최하단에 코드를 삽입합니다. 관리자 페이지에서는 수행되지 않습니다.';
-$lang->corp = 'Crop (잘라내기)';
-$lang->ratio = 'Ratio (비율 맞추기)';
+$lang->thumbnail_crop = '크기에 맞추어 잘라내기';
+$lang->thumbnail_ratio = '비율 유지 (여백이 생길 수 있음)';
+$lang->thumbnail_none = '썸네일 생성하지 않음';
$lang->admin_ip_allow = '관리자 로그인 허용 IP';
$lang->admin_ip_deny = '관리자 로그인 금지 IP';
$lang->local_ip_address = '로컬 IP 주소';
diff --git a/modules/admin/tpl/config_advanced.html b/modules/admin/tpl/config_advanced.html
index 03260260d..56d0f0329 100644
--- a/modules/admin/tpl/config_advanced.html
+++ b/modules/admin/tpl/config_advanced.html
@@ -62,12 +62,16 @@
+
diff --git a/modules/comment/comment.item.php b/modules/comment/comment.item.php
index db8fa09f0..04332540f 100644
--- a/modules/comment/comment.item.php
+++ b/modules/comment/comment.item.php
@@ -567,6 +567,24 @@ class commentItem extends Object
return;
}
+ // Get thumbnai_type information from document module's configuration
+ if(!in_array($thumbnail_type, array('crop', 'ratio', 'none')))
+ {
+ $config = $GLOBALS['__document_config__'];
+ if(!$config)
+ {
+ $oDocumentModel = getModel('document');
+ $config = $oDocumentModel->getDocumentConfig();
+ $GLOBALS['__document_config__'] = $config;
+ }
+ $thumbnail_type = $config->thumbnail_type ?: 'crop';
+ }
+
+ if ($thumbnail_type === 'none')
+ {
+ return;
+ }
+
if($this->isSecret() && !$this->isGranted())
{
return;
@@ -584,12 +602,6 @@ class commentItem extends Object
return;
}
- // get thumbail generation info on the doc module configuration.
- if(!in_array($thumbnail_type, array('crop', 'ratio')))
- {
- $thumbnail_type = 'crop';
- }
-
// Define thumbnail information
$thumbnail_path = sprintf('files/thumbnails/%s', getNumberingPath($this->comment_srl, 3));
$thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, $width, $height, $thumbnail_type);
diff --git a/modules/document/document.item.php b/modules/document/document.item.php
index 84970348a..c63279037 100644
--- a/modules/document/document.item.php
+++ b/modules/document/document.item.php
@@ -879,6 +879,24 @@ class documentItem extends Object
// Return false if the document doesn't exist
if(!$this->document_srl) return;
+ // Get thumbnai_type information from document module's configuration
+ if(!in_array($thumbnail_type, array('crop', 'ratio', 'none')))
+ {
+ $config = $GLOBALS['__document_config__'];
+ if(!$config)
+ {
+ $oDocumentModel = getModel('document');
+ $config = $oDocumentModel->getDocumentConfig();
+ $GLOBALS['__document_config__'] = $config;
+ }
+ $thumbnail_type = $config->thumbnail_type ?: 'crop';
+ }
+
+ if ($thumbnail_type === 'none')
+ {
+ return;
+ }
+
if($this->isSecret() && !$this->isGranted())
{
return;
@@ -897,20 +915,9 @@ class documentItem extends Object
$output = executeQuery('document.getDocument', $args);
$content = $output->data->content;
}
+
// Return false if neither attachement nor image files in the document
if(!$this->get('uploaded_count') && !preg_match("!
getDocumentConfig();
- $GLOBALS['__document_config__'] = $config;
- }
- $thumbnail_type = $config->thumbnail_type ?: 'crop';
- }
// Define thumbnail information
$thumbnail_path = sprintf('files/thumbnails/%s',getNumberingPath($this->document_srl, 3));
diff --git a/modules/document/lang/en.php b/modules/document/lang/en.php
index acabc9684..768c3c6ce 100644
--- a/modules/document/lang/en.php
+++ b/modules/document/lang/en.php
@@ -1,8 +1,6 @@
document_list = 'Documents List';
$lang->thumbnail_type = 'Thumbnail Type';
-$lang->thumbnail_crop = 'Crop (to a specific size)';
-$lang->thumbnail_ratio = 'Ratio (keeping the same aspect ratio as the original image)';
$lang->cmd_delete_all_thumbnail = 'Delete all thumbnails';
$lang->title_bold = 'Bold';
$lang->title_color = 'Color';
diff --git a/modules/document/lang/ja.php b/modules/document/lang/ja.php
index 4730b8632..e3c16e467 100644
--- a/modules/document/lang/ja.php
+++ b/modules/document/lang/ja.php
@@ -1,8 +1,6 @@
document_list = 'ドキュメントリスト';
$lang->thumbnail_type = 'サムネールタイプ';
-$lang->thumbnail_crop = 'トリミングする';
-$lang->thumbnail_ratio = '比率に合わせる';
$lang->cmd_delete_all_thumbnail = 'すべてのサムネール削除';
$lang->title_bold = 'タイトル太字';
$lang->title_color = 'タイトルの色';
diff --git a/modules/document/lang/ko.php b/modules/document/lang/ko.php
index ffc3759c0..4129d3e35 100644
--- a/modules/document/lang/ko.php
+++ b/modules/document/lang/ko.php
@@ -6,8 +6,6 @@ $lang->view_count_option_all = '모두 계산';
$lang->view_count_option_some = '일부 계산';
$lang->view_count_option_once = '중복 금지';
$lang->view_count_option_none = '계산 안함';
-$lang->thumbnail_crop = '잘라내기 (정해진 크기에 꽉 찬 모습의 썸네일을 만듭니다.)';
-$lang->thumbnail_ratio = '비율 맞추기 (원본 이미지의 비율에 맞춥니다. 다만 정해진 크기에 여백이 생깁니다.)';
$lang->cmd_delete_all_thumbnail = '섬네일 모두 삭제';
$lang->title_bold = '제목 굵게';
$lang->title_color = '제목 색깔';