mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
planet의 todo, bookmark 애드온 동작하지 않던 오류 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5940 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
801cc6c811
commit
0ed1d678ba
6 changed files with 32 additions and 66 deletions
|
|
@ -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()){
|
||||
$planet = Context::get('planet');
|
||||
if(!$planet || !$planet->isMyPlanet()) return;
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$countBookmark = $oPlanetModel->getTagSearchResultCount($oPlanet->getModuleSrl(),'bookmark');
|
||||
|
||||
$countBookmark = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'bookmark');
|
||||
Context::addHtmlHeader("<script type=\"text/javascript\">//<![CDATA[\nvar planet_bookmark_count=".( (int)$countBookmark).";\n//]]></script>");
|
||||
Context::addJsFile('./addons/planet_bookmark/planet_bookmark.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
<?php
|
||||
if(!defined("__ZBXE__")) exit();
|
||||
|
||||
/**
|
||||
* @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');
|
||||
|
||||
//getTagSearchResultCount
|
||||
if($config->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("<script type=\"text/javascript\">//<![CDATA[\nvar planet_todo_count={todo:".$countTodo.",done:".$countDone."};\n//]]></script>");
|
||||
Context::addJsFile('./addons/planet_todo/planet_todo.js');
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -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');
|
||||
$countTodo = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'todo');
|
||||
$countDone = $oPlanetModel->getTagSearchResultCount($planet->getModuleSrl(),'done');
|
||||
|
||||
Context::addHtmlHeader("<script type=\"text/javascript\">//<![CDATA[\nvar planet_todo_count={todo:".$countTodo.",done:".$countDone."};\n//]]></script>");
|
||||
Context::addJsFile('./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 = '<div class="commentHeader"><h3 class="exTitle">TODO</h3><span class="button strong black todoWrite"><button type="button" onclick="showWritePostTodo()">TODO Post</button></span></div>\n<div id="todoList" class="commentBody todoManager"></div>\n<div id="todoList_page" class="pagination a1"></div>\n<div class="commentHeader"><h3 class="exTitle">DONE</h3></div>\n<div id="doneList" class="commentBody todoManager"></div>\n<div id="doneList_page" class="pagination a1"></div>\n<span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span>\n';
|
||||
planet_getTodo();
|
||||
planet_getDone();
|
||||
planet_getTodo(1);
|
||||
planet_getDone(1);
|
||||
}
|
||||
|
||||
function planet_getTodo(page){
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,10 @@
|
|||
**/
|
||||
$oPlanetModel = &getModel('planet');
|
||||
$oModuleModel = &getModel('module');
|
||||
Context::set('module_info',$this->module_info = $oPlanetModel->getPlanetConfig());
|
||||
$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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue