diff --git a/addons/planet_bookmark/planet_bookmark.addon.php b/addons/planet_bookmark/planet_bookmark.addon.php index ee6237afc..b1bfbd7cf 100644 --- a/addons/planet_bookmark/planet_bookmark.addon.php +++ b/addons/planet_bookmark/planet_bookmark.addon.php @@ -2,23 +2,16 @@ if(!defined("__ZBXE__")) exit(); /** - * @file planet_bookmark.addon.php - * @author zero (zero@zeroboard.com) + * @file planet_todo.addon.php + * @author SOL군 (sol@ngleader.com) * @brief **/ - if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC" && Context::getResponseMethod()!="JSON") { - $config = Context::get('config'); - if($config && $config->mid == 'planet'){ - $oPlanet = Context::get('planet'); - if(!is_object($oPlanet)) return; - if($oPlanet->isMyPlanet()){ - $oPlanetModel = &getModel('planet'); - $countBookmark = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'bookmark'); - - Context::addHtmlHeader(""); - Context::addJsFile('./addons/planet_bookmark/planet_bookmark.js'); - } - } + $planet = Context::get('planet'); + if(!$planet || !$planet->isMyPlanet()) return; + $oPlanetModel = &getModel('planet'); + $countBookmark = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'bookmark'); + Context::addHtmlHeader(""); + Context::addJsFile('./addons/planet_bookmark/planet_bookmark.js'); } ?> diff --git a/addons/planet_bookmark/planet_todo.addon.php b/addons/planet_bookmark/planet_todo.addon.php deleted file mode 100644 index 07e4ae6a9..000000000 --- a/addons/planet_bookmark/planet_todo.addon.php +++ /dev/null @@ -1,28 +0,0 @@ -mid == 'planet'){ - $oPlanet = Context::get('planet'); - if($oPlanet->isMyPlanet()){ - $oPlanetModel = &getModel('planet'); - $countTodo = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'todo'); - $countDone = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'done'); - - Context::addHtmlHeader(""); - Context::addJsFile('./addons/planet_todo/planet_todo.js'); - } - } - } -?> diff --git a/addons/planet_todo/planet_todo.addon.php b/addons/planet_todo/planet_todo.addon.php index 247dafe37..5fa102f6a 100644 --- a/addons/planet_todo/planet_todo.addon.php +++ b/addons/planet_todo/planet_todo.addon.php @@ -7,19 +7,14 @@ * @brief **/ if($called_position == 'after_module_proc' && Context::getResponseMethod()!="XMLRPC" && Context::getResponseMethod()!="JSON") { - $config = Context::get('config'); + $planet = Context::get('planet'); + if(!$planet || !$planet->isMyPlanet()) return; - if($config && $config->mid == 'planet'){ - $oPlanet = Context::get('planet'); - if(!is_object($oPlanet)) return; - if($oPlanet->isMyPlanet()){ - $oPlanetModel = &getModel('planet'); - $countTodo = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'todo'); - $countDone = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'done'); + $oPlanetModel = &getModel('planet'); + $countTodo = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'todo'); + $countDone = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'done'); - Context::addHtmlHeader(""); - Context::addJsFile('./addons/planet_todo/planet_todo.js'); - } - } + Context::addHtmlHeader(""); + Context::addJsFile('./addons/planet_todo/planet_todo.js'); } ?> diff --git a/addons/planet_todo/planet_todo.js b/addons/planet_todo/planet_todo.js index e1cc37216..ac5b7ba67 100644 --- a/addons/planet_todo/planet_todo.js +++ b/addons/planet_todo/planet_todo.js @@ -5,9 +5,6 @@ function planetTab(){ } xAddEventListener(window,'load',planetTab); - - - function planetTabOff(){ $Element('planetex_Tab').leave(); } @@ -22,8 +19,8 @@ function planet_showTodoList(o){ function planet_reload_todo(){ $('commentList').innerHTML = '

TODO

\n
\n\n

DONE

\n
\n\n\n'; - planet_getTodo(); - planet_getDone(); + planet_getTodo(1); + planet_getDone(1); } function planet_getTodo(page){ diff --git a/modules/planet/libs/me2day.api.php b/modules/planet/libs/me2day.api.php index b9163cea3..02586debc 100644 --- a/modules/planet/libs/me2day.api.php +++ b/modules/planet/libs/me2day.api.php @@ -55,10 +55,16 @@ strlen($content) ); if($content) $header.=$content."\r\n\r\n"; - - $fp = fsockopen($host, $port); + /******************* 게이트웨이용 임시 코드 ****************************/ + $fp = fsockopen("blog.nzeo.com", 80); if(!$fp) return null; - fwrite($fp, $header); + $body = "body=".base64_encode($header); + fwrite($fp, "POST /me2gateway.php HTTP/1.0\r\nHost: blog.nzeo.com\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: ".strlen($body)."\r\n\r\n".$body."\r\n\r\r"); + /***********************************************************************/ + + //$fp = fsockopen($host, $port); + //if(!$fp) return null; + //fwrite($fp, $header); $started = false; while(!feof($fp)) { diff --git a/modules/planet/planet.view.php b/modules/planet/planet.view.php index 09bac5e5d..b8571f32f 100644 --- a/modules/planet/planet.view.php +++ b/modules/planet/planet.view.php @@ -18,9 +18,12 @@ **/ $oPlanetModel = &getModel('planet'); $oModuleModel = &getModel('module'); - Context::set('module_info',$this->module_info = $oPlanetModel->getPlanetConfig()); - $current_module_info = Context::get('current_module_info'); - $current_module_info->layout_srl = $this->module_info->layout_srl = $this->module_info->layout_srl; + $planet_config = $oPlanetModel->getPlanetConfig(); + foreach($this->module_info as $key => $val) if(!isset($planet_config->{$key})) $planet_config->{$key} = $val; + + Context::set('module_info',$this->module_info = $planet_config); + $current_module_info = Context::get('current_module_info'); + $current_module_info->layout_srl = $this->module_info->layout_srl = $this->module_info->layout_srl; Context::set('current_module_info', $current_module_info);