mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 02:39:56 +09:00
최근 이미지 추출시 대상 모듈들의 문서별 이미지 1개씩만을 대상으로 하여 데이터 추출하도록 변경. 기본 스킨에 작성자 닉네임 표시하도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2076 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
87727ec117
commit
f7e29bb654
6 changed files with 54 additions and 15 deletions
|
|
@ -32,7 +32,7 @@ form { margin:0; padding:0; }
|
|||
.iePngFix { behavior:url(./common/js/iePngFix.htc); }
|
||||
|
||||
/* Input Style Definition */
|
||||
.inputTypeText { border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; height:1.4em; padding:.2em 0 0 .3em; background:#ffffff; font-size:1em; margin-bottom:-2px;}
|
||||
.inputTypeText { border:1px solid; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6; height:1.4em; padding:.2em 0 0 .3em; background:#ffffff; font-size:1em; }
|
||||
.inputTypeText:hover,
|
||||
.inputTypeText:focus { background:#f4f4f4; }
|
||||
.inputTypeTextArea { border:1px solid !important; border-color:#a6a6a6 #d8d8d8 #d8d8d8 #a6a6a6 !important; background:#ffffff; font-size:1em;}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@
|
|||
/**
|
||||
* @brief 여러개의 문서들을 가져옴 (페이징 아님)
|
||||
**/
|
||||
function getDocuments($document_srl_list, $is_admin = false) {
|
||||
if(is_array($document_srl_list)) $document_srls = implode(',',$document_srl_list);
|
||||
function getDocuments($document_srls, $is_admin = false) {
|
||||
if(is_array($document_srls)) $document_srls = implode(',',$document_srls);
|
||||
|
||||
// DB에서 가져옴
|
||||
$args->document_srls = $document_srls;
|
||||
|
|
|
|||
20
modules/file/queries/getOneFileInDocument.xml
Normal file
20
modules/file/queries/getOneFileInDocument.xml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<query id="getOneFileInDocument" action="select">
|
||||
<tables>
|
||||
<table name="files" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
|
||||
</conditions>
|
||||
<groups>
|
||||
<group column="upload_target_srl" />
|
||||
</groups>
|
||||
<navigation>
|
||||
<index var="sort_index" default="file_srl" order="desc" />
|
||||
<list_count var="list_count" default="20" />
|
||||
<page_count var="page_count" default="10" />
|
||||
<page var="page" default="1" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
@ -25,19 +25,38 @@
|
|||
if(!$list_count) $list_count = 5;
|
||||
$mid_list = explode(",",$args->mid_list);
|
||||
|
||||
// DocumentModel::getDocumentList()를 이용하기 위한 변수 정리
|
||||
// 템플릿 파일에서 사용할 변수들을 세팅
|
||||
if(count($mid_list)==1) $widget_info->module_name = $mid_list[0];
|
||||
|
||||
// 변수 정리
|
||||
$obj->mid = $mid_list;
|
||||
$obj->sort_index = $order_target;
|
||||
$obj->list_count = $list_count*2;
|
||||
|
||||
// document 모듈의 model 객체를 받아서 getDocumentList() method를 실행
|
||||
$oDocumentModel = &getModel('document');
|
||||
$output = $oDocumentModel->getDocumentList($obj);
|
||||
// mid에 해당하는 module_srl을 구함
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_srl_list = $oModuleModel->getModuleSrlByMid($obj->mid);
|
||||
|
||||
// 템플릿 파일에서 사용할 변수들을 세팅
|
||||
if(count($mid_list)==1) $widget_info->module_name = $mid_list[0];
|
||||
$obj->module_srls = implode(",",$module_srl_list);
|
||||
|
||||
// 정해진 모듈에서 문서별 파일 목록을 구함
|
||||
$files_output = executeQuery("file.getOneFileInDocument", $obj);
|
||||
|
||||
// 결과에서 문서 번호만을 따로 추출
|
||||
if($files_output->data) {
|
||||
foreach($files_output->data as $key => $val) {
|
||||
$document_srl = $val->upload_target_srl;
|
||||
$document_srl_list[] = $document_srl;
|
||||
}
|
||||
}
|
||||
|
||||
if(!count($document_srl_list)) return;
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$documents_output = $oDocumentModel->getDocuments($document_srl_list);
|
||||
if(!count($documents_output)) return;
|
||||
|
||||
$widget_info->document_list = $output->data;
|
||||
$widget_info->document_list = $documents_output;
|
||||
$widget_info->title_length = $title_length;
|
||||
$widget_info->thumbnail_width = $thumbnail_width;
|
||||
$widget_info->list_count = $list_count;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,5 @@
|
|||
.ni_box .ni_item { float:left; margin:3px; list-style:none; text-align:center;}
|
||||
.ni_box .ni_item a { color:#444444; text-decoration:none; }
|
||||
.ni_box .ni_item a:visited { color:#AAAAAA; text-decoration:none; }
|
||||
.ni_box .ni_item a:hover { font-weight:bold; letter-spacing:-1px; }
|
||||
.ni_box .ni_item img { padding:5px; }
|
||||
.ni_box .ni_item img:hover { border:1px solid #888888; padding:4px;}
|
||||
.ni_box .ni_item .thumbnail { border:1px solid #DDDDDD; padding:4px; }
|
||||
.ni_box .ni_item .thumbnail:hover { border:1px solid #888888; padding:4px;}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,13 @@
|
|||
|
||||
<li class="ni_item">
|
||||
<!--@if($oDocument->thumbnailExists($widget_info->thumbnail_width))-->
|
||||
<a href="{getUrl('','document_srl',$oDocument->document_srl)}"><img src="{$oDocument->getThumbnail($widget_info->thumbnail_width)}" width="{$widget_info->thumbnail_width}" height="{$widget_info->thumbnail_width}" border="0" alt="" /></a>
|
||||
<a href="{getUrl('','document_srl',$oDocument->document_srl)}"><img src="{$oDocument->getThumbnail($widget_info->thumbnail_width)}" width="{$widget_info->thumbnail_width}" height="{$widget_info->thumbnail_width}" border="0" alt="" class="thumbnail" /></a>
|
||||
<!--@else-->
|
||||
<img src="./images/blank.gif" border="0" width="{$widget_info->thumbnail_width}" height="{$widget_info->thumbnail_width}" />
|
||||
<!--@end-->
|
||||
|
||||
<br /><a href="{$oDocument->getPermanentUrl()}#{$oDocument->getCommentCount()}">{$oDocument->getTitleText($widget_info->title_length)}</a>
|
||||
<div><a href="{$oDocument->getPermanentUrl()}#{$oDocument->getCommentCount()}">{$oDocument->getTitleText($widget_info->title_length)}</a></div>
|
||||
<div class="member_{$oDocument->get('member_srl')}">{$oDocument->getNickName()}</div>
|
||||
</li>
|
||||
|
||||
{@ $count++}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue