From ec950bd76527e94bbfdeb3d86db780fc89a79586 Mon Sep 17 00:00:00 2001 From: ngleader Date: Tue, 18 Nov 2008 05:19:47 +0000 Subject: [PATCH] =?UTF-8?q?planet=20=20api=20=EC=B6=94=EA=B0=80=20(reply?= =?UTF-8?q?=20comment=5Fcount)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4878 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/planet/conf/module.xml | 1 + modules/planet/planet.api.php | 21 ++++++++++++++++++- modules/planet/planet.view.php | 8 +++++++ .../planet/skins/xe_planet/content_list.html | 2 +- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/modules/planet/conf/module.xml b/modules/planet/conf/module.xml index 4ff90a523..f63cf1d28 100644 --- a/modules/planet/conf/module.xml +++ b/modules/planet/conf/module.xml @@ -48,6 +48,7 @@ + diff --git a/modules/planet/planet.api.php b/modules/planet/planet.api.php index e23d70bf3..b4fda7a44 100644 --- a/modules/planet/planet.api.php +++ b/modules/planet/planet.api.php @@ -37,12 +37,30 @@ $oModule->add('pageNavigation', Context::get('page_navigation')); } + function dispReplyList(&$oModule){ + $reply_list = Context::get('reply_list'); + $output = array(); + if(count($reply_list)) { + foreach($reply_list as $key => $val) { + unset($obj); + $obj->mid = $val->mid; + $obj->document_srl = $val->document_srl; + $obj->nick_name = $val->nick_name; + $obj->content = $val->content; + $obj->regdate = $val->regdate; + $output[] = $obj; + } + } + $oModule->add('planetReplyList', $output ); + $oModule->add('pageNavigation', Context::get('page_navigation')); + } + function arrangeContentList($content_list) { $output = array(); if(count($content_list)) { foreach($content_list as $key => $val) { $item = null; - $item = $val->gets('mid','document_srl','nick_name','content','postscript','voted_count','regdate','tag_list'); + $item = $val->gets('mid','document_srl','nick_name','content','postscript','voted_count','regdate','tag_list','comment_count'); $item->photo = $val->getPlanetPhotoSrc(); $output[] = $item; } @@ -50,6 +68,7 @@ return $output; } + function arrangePlanetList($planet_list) { $output = array(); if(count($planet_list)) { diff --git a/modules/planet/planet.view.php b/modules/planet/planet.view.php index 4c724bcbf..297698e45 100644 --- a/modules/planet/planet.view.php +++ b/modules/planet/planet.view.php @@ -339,6 +339,14 @@ $this->setTemplateFile('search_planet'); } + function dispReplyList(){ + $page = Context::get('page'); + $document_srl = Context::get('document_srl'); + $oPlanetModel = &getModel('planet'); + $output = $oPlanetModel->getReplyList($document_srl,$page); + Context::set('reply_list',$output->data); + } + } ?> diff --git a/modules/planet/skins/xe_planet/content_list.html b/modules/planet/skins/xe_planet/content_list.html index 7c48ca1c6..1cb229736 100644 --- a/modules/planet/skins/xe_planet/content_list.html +++ b/modules/planet/skins/xe_planet/content_list.html @@ -1,5 +1,5 @@ -
+