title; // 출력된 목록 수 $list_count = (int)$args->list_count; if(!$list_count) $list_count = 5; $args->list_count = $list_count; // 중복 허용/ 비허용 체크 if($args->allow_repetition != 'Y') { $output = executeQueryArray('widgets.planet_document.getUniqueNewestDocuments', $args); } else { $output = executeQueryArray('widgets.planet_document.getNewestDocuments', $args); } // 플래닛 글 목록 구함 $oPlanetModel = &getModel('planet'); Context::set('planet', $planet = $oPlanetModel->getPlanet()); if(count($output->data)) { foreach($output->data as $key => $val) { $document_srl = $val->document_srl; $oPlanet = null; $oPlanet = new PlanetItem(); $oPlanet->setAttribute($val); $planet_list[] = $oPlanet; } } else { $planet_list = array(); } Context::set('planet_list', $planet_list); // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); Context::set('colorset', $args->colorset); // 템플릿 파일을 지정 $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; $widget_info->domain = Context::getDefaultUrl(); if(!$args->show_number_of_comments) $args->show_number_of_comments = "N"; if(!$args->show_author_name) $args->show_author_name = "N"; $widget_info->show_number_of_comments = $args->show_number_of_comments; $widget_info->show_author_name = $args->show_author_name; Context::set('widget_info', $widget_info); // 템플릿 컴파일 $oTemplate = &TemplateHandler::getInstance(); $output = $oTemplate->compile($tpl_path, $tpl_file); return $output; } } ?>