mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-20 19:59:54 +09:00
planet_document 위젯에 중복 허용/ 비허용 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5205 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
89cb51fd13
commit
f406df3349
4 changed files with 124 additions and 7 deletions
|
|
@ -22,11 +22,25 @@
|
|||
$list_count = (int)$args->list_count;
|
||||
if(!$list_count) $list_count = 5;
|
||||
|
||||
// 중복 허용/ 비허용 체크
|
||||
if($args->allow_repetition != 'Y') {
|
||||
$output = executeQueryArray('widgets.planet_document.getUniqueNewestDocuments');
|
||||
} else {
|
||||
$output = executeQueryArray('widgets.planet_document.getNewestDocuments');
|
||||
}
|
||||
|
||||
// 플래닛 글 목록 구함
|
||||
$oPlanetModel = &getModel('planet');
|
||||
Context::set('planet', $planet = $oPlanetModel->getPlanet());
|
||||
$output = $oPlanetModel->getContentList(null, 'content', '', 1, $list_count);
|
||||
Context::set('planet_list', $output->data);
|
||||
|
||||
foreach($output->data as $key => $val) {
|
||||
$document_srl = $val->document_srl;
|
||||
$oPlanet = null;
|
||||
$oPlanet = new PlanetItem();
|
||||
$oPlanet->setAttribute($val);
|
||||
$planet_list[] = $oPlanet;
|
||||
}
|
||||
Context::set('planet_list', $planet_list);
|
||||
|
||||
// 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정)
|
||||
$tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin);
|
||||
|
|
@ -35,11 +49,11 @@
|
|||
// 템플릿 파일을 지정
|
||||
$tpl_file = 'list';
|
||||
|
||||
if(!$args->thumbnail_width) $args->thumbnail_width = 50;
|
||||
if(!$args->thumbnail_height) $args->thumbnail_height = 50;
|
||||
$widget_info->thumbnail_width = $args->thumbnail_width;
|
||||
$widget_info->thumbnail_height = $args->thumbnail_height;
|
||||
Context::set('widget_info', $widget_info);
|
||||
if(!$args->thumbnail_width) $args->thumbnail_width = 50;
|
||||
if(!$args->thumbnail_height) $args->thumbnail_height = 50;
|
||||
$widget_info->thumbnail_width = $args->thumbnail_width;
|
||||
$widget_info->thumbnail_height = $args->thumbnail_height;
|
||||
Context::set('widget_info', $widget_info);
|
||||
|
||||
// 템플릿 컴파일
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue