Beispiel #1
0
 function _getTrackbackItems($args)
 {
     // 분류 구함
     $output = executeQueryArray('widgets.content.getCategories', $obj);
     if ($output->toBool() && $output->data) {
         foreach ($output->data as $key => $val) {
             $category_lists[$val->module_srl][$val->category_srl] = $val;
         }
     }
     $obj->module_srl = $args->module_srl;
     $obj->sort_index = $args->order_target;
     $obj->list_count = $args->list_count * $args->page_count;
     // trackback 모듈의 model 객체를 받아서 getTrackbackList() method를 실행
     $oTrackbackModel =& getModel('trackback');
     $output = $oTrackbackModel->getNewestTrackbackList($obj);
     // 오류가 생기면 그냥 무시
     if (!$output->toBool() || !$output->data) {
         return;
     }
     // 결과가 있으면 각 문서 객체화를 시킴
     $content_items = array();
     foreach ($output->data as $key => $item) {
         $domain = $args->module_srls_info[$item->module_srl]->domain;
         $category = $category_lists[$item->module_srl]->text;
         $url = getSiteUrl($domain, '', 'document_srl', $item->document_srl);
         $browser_title = $args->module_srls_info[$item->module_srl]->browser_title;
         $content_item = new contentItem($browser_title);
         $content_item->adds($item);
         $content_item->setTitle($item->title);
         $content_item->setCategory($category);
         $content_item->setNickName($item->blog_name);
         $content_item->setContent($item->excerpt);
         ///<<
         $content_item->setDomain($domain);
         ///<<
         $content_item->setLink($url);
         $content_item->add('mid', $args->mid_lists[$item->module_srl]);
         $content_item->setRegdate($item->regdate);
         $content_items[] = $content_item;
     }
     return $content_items;
 }
Beispiel #2
0
 function _getTrackbackItems($args)
 {
     // Get categories
     $output = executeQueryArray('widgets.content.getCategories', $obj);
     if ($output->toBool() && $output->data) {
         foreach ($output->data as $key => $val) {
             $category_lists[$val->module_srl][$val->category_srl] = $val;
         }
     }
     $obj->module_srl = $args->module_srl;
     $obj->sort_index = $args->order_target;
     $obj->list_count = $args->list_count * $args->page_count;
     // Get model object from the trackback module and execute getTrackbackList() method
     $oTrackbackModel =& getModel('trackback');
     $output = $oTrackbackModel->getNewestTrackbackList($obj);
     // If an error occurs, just ignore it.
     if (!$output->toBool() || !$output->data) {
         return;
     }
     // If the result exists, make each document as an object
     $content_items = array();
     foreach ($output->data as $key => $item) {
         $domain = $args->module_srls_info[$item->module_srl]->domain;
         $category = $category_lists[$item->module_srl]->text;
         $url = getSiteUrl($domain, '', 'document_srl', $item->document_srl);
         $browser_title = $args->module_srls_info[$item->module_srl]->browser_title;
         $content_item = new contentItem($browser_title);
         $content_item->adds($item);
         $content_item->setTitle($item->title);
         $content_item->setCategory($category);
         $content_item->setNickName($item->blog_name);
         $content_item->setContent($item->excerpt);
         ///<<
         $content_item->setDomain($domain);
         ///<<
         $content_item->setLink($url);
         $content_item->add('mid', $args->mid_lists[$item->module_srl]);
         $content_item->setRegdate($item->regdate);
         $content_items[] = $content_item;
     }
     return $content_items;
 }