mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-16 17:02:17 +09:00
#217 썸네일 생성 방법을 문서 모듈에서 crop/ratio를 정할 수 있게 하고 xe_webzine, xe_gallery에서 방식/가로/세로크기를 지정할 수 있게 함. newest_images 위젯 역시 동일한 설정과 동작을 추가함
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2734 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e4d55fc4d1
commit
5bdad63b7f
28 changed files with 514 additions and 267 deletions
|
|
@ -253,5 +253,44 @@
|
|||
|
||||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 문서 모듈의 기본설정 저장
|
||||
**/
|
||||
function procDocumentAdminInsertConfig() {
|
||||
// 기본 정보를 받음
|
||||
$args = Context::gets('thumbnail_type');
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('document',$args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모든 생성된 썸네일 삭제
|
||||
**/
|
||||
function procDocumentAdminDeleteAllThumbnail() {
|
||||
|
||||
// files/attaches/images/ 디렉토리를 순환하면서 thumbnail_*.jpg 파일을 모두 삭제
|
||||
$this->deleteThumbnailFile('./files/attach/images');
|
||||
|
||||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
function deleteThumbnailFile($path) {
|
||||
$directory = dir($path);
|
||||
while($entry = $directory->read()) {
|
||||
if ($entry != "." && $entry != "..") {
|
||||
if (is_dir($path."/".$entry)) {
|
||||
$this->deleteThumbnailFile($path."/".$entry);
|
||||
} else {
|
||||
if(!eregi('^thumbnail_([^\.]*)\.jpg$',$entry)) continue;
|
||||
@unlink($path.'/'.$entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
$directory->close();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue