diff --git a/modules/syndication/conf/info.xml b/modules/syndication/conf/info.xml deleted file mode 100644 index 59994825c..000000000 --- a/modules/syndication/conf/info.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - Syndication - 聯合供搞 - İçerik Paylaşımı - 검색서비스업체와 직접 통신을 통해 컨텐츠를 잘 검색되도록 하는 Syndication 규약을 따라 정보를 주고받는 모듈 - 검색서비스업체와 직접 통신을 통해 컨텐츠를 잘 검색되도록 하는 Syndication 규약을 따라 정보를 주고받는 모듈 - 검색서비스업체와 직접 통신을 통해 컨텐츠를 잘 검색되도록 하는 Syndication 규약을 따라 정보를 주고받는 모듈 - 1.0.1 - 2010-06-23 - interlock - - - NHN - NHN - NHN - - diff --git a/modules/syndication/conf/module.xml b/modules/syndication/conf/module.xml deleted file mode 100644 index 338f3eaf9..000000000 --- a/modules/syndication/conf/module.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/modules/syndication/lang/lang.xml b/modules/syndication/lang/lang.xml deleted file mode 100644 index 52ad1e92c..000000000 --- a/modules/syndication/lang/lang.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - 최소한의 요청만으로 효과적으로 컨텐츠를 검색 서비스 업체와 동기화합니다]]> - It will synchronize contents with search service providers with the least requests.]]> - Gerekli olan şeyleri en aza indirerek, arama hizmeti sunucusunu içeriklerle uygun hale getirir.]]> - - - - - - - - - [적용하기] 버튼을 선택하시면 선택 또는 해제된 서비스에 Ping 을 통해서 결과를 통보하게 됩니다]]> - You will get Ping result from the selected (deselected) services if you apply.]]> - [應用] 透過 Ping 的方式]]> - Tercih edilen(edilmeyen) hizmetlerin Ping sonuçlarını başvurarak alabilirsiniz.]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/modules/syndication/queries/deleteExceptModules.xml b/modules/syndication/queries/deleteExceptModules.xml deleted file mode 100644 index 981cf5149..000000000 --- a/modules/syndication/queries/deleteExceptModules.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/modules/syndication/queries/getDeletedList.xml b/modules/syndication/queries/getDeletedList.xml deleted file mode 100644 index 6dae7a09a..000000000 --- a/modules/syndication/queries/getDeletedList.xml +++ /dev/null @@ -1,19 +0,0 @@ - - -
- - - - - - - - - - - - - - - - diff --git a/modules/syndication/queries/getDocumentList.xml b/modules/syndication/queries/getDocumentList.xml deleted file mode 100644 index a5916f0a6..000000000 --- a/modules/syndication/queries/getDocumentList.xml +++ /dev/null @@ -1,31 +0,0 @@ - - -
-
-
- - - -
-
- - - - - - - - - - - - - - - - - - - - -
diff --git a/modules/syndication/queries/getExceptModule.xml b/modules/syndication/queries/getExceptModule.xml deleted file mode 100644 index 68aec543d..000000000 --- a/modules/syndication/queries/getExceptModule.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/modules/syndication/queries/getExceptModuleSrls.xml b/modules/syndication/queries/getExceptModuleSrls.xml deleted file mode 100644 index 8742b6894..000000000 --- a/modules/syndication/queries/getExceptModuleSrls.xml +++ /dev/null @@ -1,8 +0,0 @@ - - -
- - - - - diff --git a/modules/syndication/queries/getExceptModules.xml b/modules/syndication/queries/getExceptModules.xml deleted file mode 100644 index 583350185..000000000 --- a/modules/syndication/queries/getExceptModules.xml +++ /dev/null @@ -1,14 +0,0 @@ - - -
-
- - - - - - - - - - diff --git a/modules/syndication/queries/getGrantedModule.xml b/modules/syndication/queries/getGrantedModule.xml deleted file mode 100644 index 4bb67c296..000000000 --- a/modules/syndication/queries/getGrantedModule.xml +++ /dev/null @@ -1,17 +0,0 @@ - - -
- - - - - - - - - - - - - - diff --git a/modules/syndication/queries/getGrantedModules.xml b/modules/syndication/queries/getGrantedModules.xml deleted file mode 100644 index c72bd0a8a..000000000 --- a/modules/syndication/queries/getGrantedModules.xml +++ /dev/null @@ -1,19 +0,0 @@ - - -
- - - - - - - - - - - - - - - - diff --git a/modules/syndication/queries/getLang.xml b/modules/syndication/queries/getLang.xml deleted file mode 100644 index eb0c59672..000000000 --- a/modules/syndication/queries/getLang.xml +++ /dev/null @@ -1,12 +0,0 @@ - - -
- - - - - - - - - diff --git a/modules/syndication/queries/getModuleSiteInfo.xml b/modules/syndication/queries/getModuleSiteInfo.xml deleted file mode 100644 index 921e33431..000000000 --- a/modules/syndication/queries/getModuleSiteInfo.xml +++ /dev/null @@ -1,15 +0,0 @@ - - -
-
- - - - - - - - - - - diff --git a/modules/syndication/queries/getModules.xml b/modules/syndication/queries/getModules.xml deleted file mode 100644 index ecb397cf4..000000000 --- a/modules/syndication/queries/getModules.xml +++ /dev/null @@ -1,26 +0,0 @@ - - -
-
-
- - - -
-
- - - - - - - - - - - - - - - -
diff --git a/modules/syndication/queries/getSiteUpdatedTime.xml b/modules/syndication/queries/getSiteUpdatedTime.xml deleted file mode 100644 index e5ead1bbc..000000000 --- a/modules/syndication/queries/getSiteUpdatedTime.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/modules/syndication/queries/insertExceptModule.xml b/modules/syndication/queries/insertExceptModule.xml deleted file mode 100644 index f50e0b818..000000000 --- a/modules/syndication/queries/insertExceptModule.xml +++ /dev/null @@ -1,9 +0,0 @@ - - -
- - - - - - diff --git a/modules/syndication/queries/insertLog.xml b/modules/syndication/queries/insertLog.xml deleted file mode 100644 index d8bd17086..000000000 --- a/modules/syndication/queries/insertLog.xml +++ /dev/null @@ -1,13 +0,0 @@ - - -
- - - - - - - - - - diff --git a/modules/syndication/ruleset/insertService.xml b/modules/syndication/ruleset/insertService.xml deleted file mode 100644 index 092f8b7ab..000000000 --- a/modules/syndication/ruleset/insertService.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/modules/syndication/schemas/syndication_except_modules.xml b/modules/syndication/schemas/syndication_except_modules.xml deleted file mode 100644 index afb5c516f..000000000 --- a/modules/syndication/schemas/syndication_except_modules.xml +++ /dev/null @@ -1,4 +0,0 @@ -
- - -
diff --git a/modules/syndication/schemas/syndication_logs.xml b/modules/syndication/schemas/syndication_logs.xml deleted file mode 100644 index 666c7b09e..000000000 --- a/modules/syndication/schemas/syndication_logs.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - -
diff --git a/modules/syndication/syndication.admin.controller.php b/modules/syndication/syndication.admin.controller.php deleted file mode 100644 index c81870c57..000000000 --- a/modules/syndication/syndication.admin.controller.php +++ /dev/null @@ -1,140 +0,0 @@ -target_services = explode('|@|',Context::get('target_services')); - $config->site_url = preg_replace('/\/+$/is','',Context::get('site_url')); - $config->year = Context::get('year'); - if(!$config->site_url) return new Object(-1,'msg_site_url_is_null'); - - $oModuleController->insertModuleConfig('syndication',$config); - $oSyndicationController->ping($oSyndicationModel->getID('site'), 'site'); - - $except_module = Context::get('except_module'); - $output = executeQuery('syndication.deleteExceptModules'); - if(!$output->toBool()) return $output; - - if ($except_module){ - $modules = explode(',',$except_module); - for($i=0,$c=count($modules);$i<$c;$i++) { - $args->module_srl = $modules[$i]; - $output = executeQuery('syndication.insertExceptModule',$args); - if(!$output->toBool()) return $output; - } - } - - $this->setMessage('success_applied'); - if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) { - $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSyndicationAdminConfig'); - header('location:'.$returnUrl); - return; - } - } - - function procSyndicationAdminCheckSitePingResult(){ - $site_url = trim(Context::get('site_url')); - if(!$site_url) return new Object(-1,'msg_invalid_request'); - - $oSyndicationModel = &getModel('syndication'); - - $id = $oSyndicationModel->getID('site'); - if(substr($site_url,-1)!='/') $site_url .= '/'; - $site_ping = sprintf('http://%s?module=syndication&act=getSyndicationList&id=%s&type=site', $site_url, $id); - - $headers = array(); - $headers['Connection'] = 'TE, close'; - $headers['User-Agent'] = 'Mozilla/4.0 (compatible; NaverBot/1.0; http://help.naver.com/customer_webtxt_02.jsp)'; - - $xml = FileHandler::getRemoteResource($site_ping, null, 3, 'GET', '', $headers); - if(!$xml) return new Object(-1, 'msg_ping_test_error'); - - $oXmlParser = new XmlParser(); - $oXml = $oXmlParser->parse($xml); - - if(!$oXml || !is_object($oXml) || !$oXml->entry || !$oXml->entry->id || !$oXml->entry->title) { - $this->setMessage('msg_ping_test_error'); - $this->add('ping_result',$xml); - }else{ - $this->setMessage('msg_success_ping_test'); - } - } - - function procSyndicationAdminCheckApiStatus(){ - $target_service = Context::get('target_service'); - if(!$target_service) return new Object(-1,'msg_invalid_request'); - - $status_url = trim($this->statuses[$target_service]); - if(!$status_url) return new Object(-1,'msg_syndication_status_not_support'); - - $oModuleModel = &getModel('module'); - - $config = $oModuleModel->getModuleConfig('syndication'); - $site_url = preg_replace('/^(http|https):\/\//i','',$config->site_url); - - $method = 'getSyndicationStatus' . ucfirst(strtolower($target_service)); - if(!method_exists($this, $method)) return new Object(-1,'msg_syndication_status_not_support'); - - $output = call_user_func(array(&$this,$method),$site_url); - if(!$output->toBool()) return $output; - - $this->add('result_status',$output->get('result_status')); - } - - function getSyndicationStatusNaver($site_url){ - $status_url = trim($this->statuses['Naver']); - - $xml = FileHandler::getRemoteResource(sprintf($status_url,$site_url), null, 3, 'GET', 'application/xml'); - $oXmlParser = new XmlParser(); - $oXml = $oXmlParser->parse($xml); - $oStatus = $oXml->syndication_status; - - if($oStatus->error->body != 0) return new Object(-1,$oStatus->message->body); - - $result->site_name = $oStatus->site_name->body; - $result->first_update = $oStatus->first_update->body; - $result->last_update = $oStatus->last_update->body; - $result->visit_ok_count = $oStatus->visit_ok_count->body; - $result->visit_fail_count = $oStatus->visit_fail_count->body; - $result->status = $oStatus->status->body; - - if(!$oStatus->sync || !$oStatus->sync->article){ - $oArticleList = array(); - }else{ - $oArticleList = $oStatus->sync->article; - if(!is_array($oArticleList)) $oArticleList = array($oArticleList); - } - - if(count($oArticleList)>0){ - $article_count = array(); - foreach($oArticleList as $article){ - $article_count[$article->attrs->date] = $article->body; - } - - $result->article_count = $article_count; - $result->max_article_count = max($result->article_count); - - } - - Context::set('result', $result); - $oTemplateHandler = &TemplateHandler::getInstance(); - $html = $oTemplateHandler->compile($this->module_path.'tpl', 'naver_result'); - - $output = new Object(); - $output->add('result_status', $html); - return $output; - } - } -?> diff --git a/modules/syndication/syndication.admin.view.php b/modules/syndication/syndication.admin.view.php deleted file mode 100644 index ea34a1b8c..000000000 --- a/modules/syndication/syndication.admin.view.php +++ /dev/null @@ -1,56 +0,0 @@ -getModuleConfig('syndication'); - if(!$module_config->target_services) $module_config->target_services = array(); - - foreach($this->services as $key => $val) { - unset($obj); - $obj->service = $key; - $obj->ping = $val; - $obj->selected = in_array($key, $module_config->target_services)?true:false; - $services[] = $obj; - } - Context::set('services', $services); - - if(!$module_config->site_url) { - $module_config->site_url = Context::getDefaultUrl()?Context::getDefaultUrl():getFullUrl(); - } - Context::set('site_url', preg_replace('/^(http|https):\/\//i','',$module_config->site_url)); - - if(!$module_config->year) { - $module_config->year = date("Y"); - } - Context::set('year', $module_config->year); - - $output = executeQueryArray('syndication.getExceptModules'); - $except_module_list = array(); - for($i=0,$c=count($output->data);$i<$c;$i++) { - $except_module_list[] = $output->data[$i]; - } - Context::set('except_module', $except_module_list); - - //Security - $security = new Security(); - $security->encodeHTML('services..service','except_module..ping'); - $security->encodeHTML('except_module..mid','except_module..browser_title'); - - - $this->setTemplatePath($this->module_path.'tpl'); - $this->setTemplateFile('config'); - } - - } -?> diff --git a/modules/syndication/syndication.class.php b/modules/syndication/syndication.class.php deleted file mode 100644 index d4ceb0d9b..000000000 --- a/modules/syndication/syndication.class.php +++ /dev/null @@ -1,74 +0,0 @@ - 'http://syndication.openapi.naver.com/ping/', - ); - - var $statuses = array( - 'Naver' => 'http://syndication.openapi.naver.com/status/?site=%s', - ); - - function moduleInstall() { - $oModuleController = &getController('module'); - $oModuleController->insertTrigger('document.insertDocument', 'syndication', 'controller', 'triggerInsertDocument', 'after'); - $oModuleController->insertTrigger('document.updateDocument', 'syndication', 'controller', 'triggerUpdateDocument', 'after'); - $oModuleController->insertTrigger('document.deleteDocument', 'syndication', 'controller', 'triggerDeleteDocument', 'after'); - $oModuleController->insertTrigger('module.deleteModule', 'syndication', 'controller', 'triggerDeleteModule', 'after'); - - $oModuleController->insertTrigger('document.moveDocumentToTrash', 'syndication', 'controller', 'triggerMoveDocumentToTrash', 'after'); - $oModuleController->insertTrigger('document.restoreTrash', 'syndication', 'controller', 'triggerRestoreTrash', 'after'); - - $oAddonAdminModel = &getAdminModel('addon'); - if($oAddonAdminModel->getAddonInfoXml('catpcha')){ - $oAddonAdminController = &addonAdminController::getInstance(); - $oAddonAdminController->doActivate('catpcha'); - $oAddonAdminController->makeCacheFile(); - } - } - - function checkUpdate() { - $oModuleModel = &getModel('module'); - if(!$oModuleModel->getTrigger('document.moveDocumentToTrash', 'syndication', 'controller', 'triggerMoveDocumentToTrash', 'after')) return true; - if(!$oModuleModel->getTrigger('document.restoreTrash', 'syndication', 'controller', 'triggerRestoreTrash', 'after')) return true; - - return false; - } - - function moduleUpdate() { - $oModuleModel = &getModel('module'); - $oModuleController = &getController('module'); - - if(!$oModuleModel->getTrigger('document.moveDocumentToTrash', 'syndication', 'controller', 'triggerMoveDocumentToTrash', 'after')){ - $oModuleController->insertTrigger('document.moveDocumentToTrash', 'syndication', 'controller', 'triggerMoveDocumentToTrash', 'after'); - } - if(!$oModuleModel->getTrigger('document.restoreTrash', 'syndication', 'controller', 'triggerRestoreTrash', 'after')){ - $oModuleController->insertTrigger('document.restoreTrash', 'syndication', 'controller', 'triggerRestoreTrash', 'after'); - } - - $oAddonAdminModel = &getAdminModel('addon'); - if($oAddonAdminModel->getAddonInfoXml('catpcha')){ - $oAddonAdminController = &addonAdminController::getInstance(); - $oAddonAdminController->doActivate('catpcha'); - $oAddonAdminController->makeCacheFile(); - } - - } - - function recompileCache() { - } - } -?> diff --git a/modules/syndication/syndication.controller.php b/modules/syndication/syndication.controller.php deleted file mode 100644 index f789c7359..000000000 --- a/modules/syndication/syndication.controller.php +++ /dev/null @@ -1,127 +0,0 @@ -module_srl < 1) return new Object(); - - $oSyndicationModel = &getModel('syndication'); - $oModuleModel = &getModel('module'); - - if($oSyndicationModel->isExceptedModules($obj->module_srl)) return new Object(); - - $config = $oModuleModel->getModuleConfig('syndication'); - - $id = $oSyndicationModel->getID('channel', $obj->module_srl); - $this->ping($id, 'article'); - - return new Object(); - } - - function triggerUpdateDocument(&$obj) { - if($obj->module_srl < 1) return new Object(); - - $oSyndicationModel = &getModel('syndication'); - $oModuleModel = &getModel('module'); - - if($oSyndicationModel->isExceptedModules($obj->module_srl)) return new Object(); - - $config = $oModuleModel->getModuleConfig('syndication'); - - $id = $oSyndicationModel->getID('channel', $obj->module_srl); - $this->ping($id, 'article'); - - return new Object(); - } - - function triggerDeleteDocument(&$obj) { - if($obj->module_srl < 1) return new Object(); - - $oSyndicationModel = &getModel('syndication'); - $oModuleModel = &getModel('module'); - - if($oSyndicationModel->isExceptedModules($obj->module_srl)) return new Object(); - - $this->insertLog($obj->module_srl, $obj->document_srl, $obj->title, $obj->content); - - $id = $oSyndicationModel->getID('channel', $obj->module_srl); - $this->ping($id, 'deleted'); - - return new Object(); - } - - function triggerDeleteModule(&$obj) { - $oSyndicationModel = &getModel('syndication'); - $oModuleModel = &getModel('module'); - - if($oSyndicationModel->isExceptedModules($obj->module_srl)) return new Object(); - - $this->insertLog($obj->module_srl, $obj->document_srl, $obj->title, $obj->content); - - $output = executeQuery('syndication.getExceptModule', $obj); - if($output->data->count) return new Object(); - - $id = $oSyndicationModel->getID('site', $obj->module_srl); - $this->ping($id, 'deleted'); - - return new Object(); - } - - function triggerMoveDocumentToTrash(&$obj) { - $document_srl = $obj->document_srl; - $module_srl = $obj->module_srl; - - $oSyndicationModel = &getModel('syndication'); - $oModuleModel = &getModel('module'); - - if($oSyndicationModel->isExceptedModules($module_srl)) return new Object(); - - $id = $oSyndicationModel->getID('channel', $module_srl); - $this->ping($id, 'deleted'); - - return new Object(); - } - - function triggerRestoreTrash(&$obj) { - $document_srl = $obj->document_srl; - $module_srl = $obj->module_srl; - - $oSyndicationModel = &getModel('syndication'); - $oModuleModel = &getModel('module'); - - if($oSyndicationModel->isExceptedModules($module_srl)) return new Object(); - - $id = $oSyndicationModel->getID('article', $module_srl.'-'.$document_srl); - $this->ping($id, 'article'); - - return new Object(); - } - - function insertLog($module_srl, $document_srl, $title = null, $summary = null) { - $args->module_srl = $module_srl; - $args->document_srl = $document_srl; - $args->title = $title; - $args->summary = $summary; - $output = executeQuery('syndication.insertLog', $args); - } - - function ping($id, $type) { - $oModuleModel = &getModel('module'); - $config = $oModuleModel->getModuleConfig('syndication'); - - if(!count($config->target_services)) return; - if(substr($config->site_url,-1)!='/') $config->site_url .= '/'; - foreach($config->target_services as $key => $val) { - $ping_url = trim($this->services[$val]); - if(!$ping_url) continue; - $ping_body = sprintf('http://%s?module=syndication&act=getSyndicationList&id=%s&type=%s', $config->site_url, $id, $type); - FileHandler::getRemoteResource($ping_url, null, 3, 'POST', 'application/x-www-form-urlencoded', array(), array(), array('link'=>$ping_body)); - } - } - } -?> diff --git a/modules/syndication/syndication.model.php b/modules/syndication/syndication.model.php deleted file mode 100644 index 891b46f20..000000000 --- a/modules/syndication/syndication.model.php +++ /dev/null @@ -1,383 +0,0 @@ -getModuleConfig('syndication'); - $this->site_url = preg_replace('/\/+$/is','',$config->site_url); - $this->target_services = $config->target_services; - $this->year = $config->year; - - $output = executeQueryArray('syndication.getGrantedModules'); - if($output->data) { - foreach($output->data as $key => $val) { - $this->granted_modules[] = $val->module_srl; - } - } - } - - function isExceptedModules($module_srl) { - $args->module_srl = $module_srl; - $output = executeQuery('syndication.getExceptModule', $args); - if($output->data->count) return true; - $output = executeQuery('syndication.getGrantedModule', $args); - if($output->data->count) return true; - return false; - - } - - function getLang($key, $site_srl) - { - if(!$this->langs[$site_srl]) - { - $this->langs[$site_srl] = array(); - $args->site_srl = $site_srl; - $args->lang_code = Context::getLangType(); - $output = executeQueryArray("syndication.getLang", $args); - if(!$output->toBool() || !$output->data) return $key; - foreach($output->data as $value) - { - $this->langs[$site_srl][$value->name] = $value->value; - } - } - if($this->langs[$site_srl][$key]) - { - return $this->langs[$site_srl][$key]; - } - else return $key; - } - - function handleLang($title, $site_srl) - { - $matches = null; - if(!preg_match("/\\\$user_lang->(.+)/",$title, $matches)) return $title; - else - { - return $this->getLang($matches[1], $site_srl); - } - } - - function getSyndicationList() { - $oModuleModel = &getModel('module'); - $config = $oModuleModel->getModuleConfig('syndication'); - if(!$config->year || !$config->site_url) return new Object(-1,'msg_check_syndication_config'); - - $id = Context::get('id'); - $type = Context::get('type'); - $page = Context::get('page'); - if(!$id || !$type) return new Object(-1,'msg_invalid_request'); - - if(!preg_match('/^tag:([^,]+),([0-9]+):(site|channel|article)(.*)$/i',$id,$matches)) return new Object(-1,'msg_invalid_request'); - - $url = $matches[1]; - $year = $matches[2]; - $target = $matches[3]; - $id = $matches[4]; - if($id && $id{0}==':') $id = substr($id, 1); - - if($id && strpos($id,'-')!==false) list($module_srl, $document_srl) = explode('-',$id); - elseif($id) $module_srl = $id; - if(!$url || !$year || !$target) return new Object(-1,'msg_invalid_request'); - - $startTime = Context::get('start-time'); - $endTime = Context::get('end-time'); - - $time_zone = substr($GLOBALS['_time_zone'],0,3).':'.substr($GLOBALS['_time_zone'],3); - Context::set('time_zone', $time_zone); - - $site_module_info = Context::get('site_module_info'); - - if($target == 'channel' && !$module_srl) $target = 'site'; - if($target == 'channel' && $module_srl) { - $args->module_srls = $module_srl; - $output = executeQuery('syndication.getModules', $args); - $module_info = $output->data; - if($module_info) { - $args->module_srl = $module_srl; - $output = executeQuery('syndication.getExceptModules', $args); - if($output->data->count) $error = 'target is not founded'; - } else $error = 'target is not founded'; - - unset($args); - } - - if(!$error) { - Context::set('target', $target); - Context::set('type', $type); - switch($target) { - case 'site' : - $site_info->id = $this->getID('site'); - $site_info->title = $this->handleLang($site_module_info->browser_title, $site_module_info->site_srl); - - $except_module_output = executeQueryArray('syndication.getExceptModuleSrls'); - if (is_array($except_module_output->data)) - { - $except_module_srls = array(); - foreach($except_module_output->data as $val) - { - $except_module_srls[] = $val->module_srl; - } - $args->except_modules = implode(',',$except_module_srls); - } - $output = executeQuery('syndication.getSiteUpdatedTime', $args); - if($output->data) $site_info->updated = date("Y-m-d\\TH:i:s", ztime($output->data->last_update)).$time_zone; - $site_info->self_href = $this->getSelfHref($site_info->id,$type); - $site_info->alternative_href =$this->getAlternativeHref(); - Context::set('site_info', $site_info); - - $this->setTemplateFile('site'); - switch($type) { - case 'channel' : - Context::set('channels', $this->getChannels()); - break; - case 'article' : - Context::set('articles', $this->getArticles(null, $page, $startTime, $endTime, 'article',$site_info->id)); - break; - case 'deleted' : - Context::set('deleted', $this->getDeleted(null, $page, $startTime, $endTime, 'deleted',$site_info->id)); - break; - default : - $this->setTemplateFile('site.info'); - break; - } - break; - case 'channel' : - $channel_info->id = $this->getID('channel', $module_info->module_srl); - $channel_info->title = $this->handleLang($module_info->browser_title, $module_info->site_srl); - $channel_info->updated = date("Y-m-d\\TH:i:s").$time_zone; - $channel_info->self_href = $this->getSelfHref($channel_info->id, $type); - $channel_info->alternative_href = $this->getAlternativeHref($module_info); - $channel_info->summary = $module_info->description; - if($module_info->module == "textyle") - { - $channel_info->type = "blog"; - $channel_info->rss_href = getFullSiteUrl($module_info->domain, '', 'mid', $module_info->mid, 'act', 'rss'); - } - else - { - $channel_info->type = "web"; - } - $except_module_output = executeQueryArray('syndication.getExceptModuleSrls'); - if (is_array($except_module_output->data)) - { - $except_module_srls = array(); - foreach($except_module_output->data as $val) - { - $except_module_srls[] = $val->module_srl; - } - $args->except_modules = implode(',',$except_module_srls); - } - $output = executeQuery('syndication.getSiteUpdatedTime', $args); - if($output->data) $channel_info->updated = date("Y-m-d\\TH:i:s", ztime($output->data->last_update)).$time_zone; - Context::set('channel_info', $channel_info); - - $this->setTemplateFile('channel'); - switch($type) { - case 'article' : - Context::set('articles', $this->getArticles($module_srl, $page, $startTime, $endTime, 'article', $channel_info->id)); - break; - case 'deleted' : - Context::set('deleted', $this->getDeleted($module_srl, $page, $startTime, $endTime, 'deleted', $channel_info->id)); - break; - default : - $this->setTemplateFile('channel.info'); - break; - } - break; - - case 'article': - Context::set('article', $this->getArticle($document_srl)); - $this->setTemplateFile('include.articles'); - break; - } - } else { - Context::set('message', $error); - $this->setTemplateFile('error'); - } - - $this->setTemplatePath($this->module_path.'tpl'); - Context::setResponseMethod('XMLRPC'); - } - - function getChannels() { - if($module_srls) $args->module_srls = $module_srls; - if(count($this->granted_modules)) $args->except_module_srls = implode(',',$this->granted_modules); - $output = executeQueryArray('syndication.getModules', $args); - if($output->data) { - foreach($output->data as $module_info) { - unset($obj); - $obj->id = $this->getID('channel', $module_info->module_srl); - $obj->title = $this->handleLang($module_info->browser_title, $module_info->site_srl); - $obj->updated = date("Y-m-d\\TH:i:s").$time_zone; - $obj->self_href = $this->getSelfHref($obj->id, 'channel'); - $obj->alternative_href = $this->getAlternativeHref($module_info); - $obj->summary = $module_info->description; - if($module_info->module == "textyle") - { - $obj->type = "blog"; - $obj->rss_href = getFullSiteUrl($module_info->domain, '', 'mid', $module_info->mid, 'act', 'rss'); - } - else - { - $obj->type = "web"; - } - - $list[] = $obj; - } - } - return $list; - } - - function getArticle($document_srl) { - if($this->site_url==null) $this->init(); - - $oDocumentModel = &getModel('document'); - $oDocument = $oDocumentModel->getDocument($document_srl,false,false); - if(!$oDocument->isExists()) return; - - $val = $oDocument->getObjectVars(); - - $val->id = $this->getID('article', $val->module_srl.'-'.$val->document_srl); - $val->updated = date("Y-m-d\\TH:i:s", ztime($val->last_update)).$GLOBALS['_time_zone']; - $val->alternative_href = getFullSiteUrl($this->site_url, '', 'document_srl', $val->document_srl); - $val->channel_alternative_href = $this->getChannelAlternativeHref($val->module_srl); - $val->channel_id = $this->getID('channel', $val->module_srl.'-'.$val->document_srl); - if(!$val->nick_name) $val->nick_name = $val->user_name; - - return $val; - } - - function getArticles($module_srl = null, $page=1, $startTime = null, $endTime = null, $type = null, $id = null) { - if($this->site_url==null) $this->init(); - - if($module_srl) $args->module_srl = $module_srl; - if($startTime) $args->start_date = $this->getDate($startTime); - if($endTime) $args->end_date = $this->getDate($endTime); - if(count($this->granted_modules)) $args->except_module_srls = implode(',',$this->granted_modules); - $args->page = $page; - $output = executeQueryArray('syndication.getDocumentList', $args); - $cur_page = $output->page_navigation->cur_page; - $total_page = $output->page_navigation->last_page; - - $result->next_url = null; - $result->list = array(); - - if($cur_page<$total_page) { - $next_url = $this->getSelfHref($id, $type); - if($startTime) $next_url .= '&startTime='.$startTime; - if($endTime) $next_url .= '&endTime='.$endTime; - $result->next_url = $next_url.'&page='.($cur_page+1); - } - - if($output->data) { - foreach($output->data as $key => $val) { - $val->id = $this->getID('article', $val->module_srl.'-'.$val->document_srl); - $val->updated = date("Y-m-d\\TH:i:s", ztime($val->last_update)).$GLOBALS['_time_zone']; - $val->alternative_href = getFullSiteUrl($this->site_url, '', 'document_srl', $val->document_srl); - $val->channel_alternative_href = $this->getChannelAlternativeHref($val->module_srl); - $val->channel_id = $this->getID('channel', $val->module_srl.'-'.$val->document_srl); - if(!$val->nick_name) $val->nick_name = $val->user_name; - $output->data[$key] = $val; - } - $result->list = $output->data; - } - return $result; - } - - function getDeleted($module_srl = null, $page = 1, $startTime = null, $endTime = null, $type = null, $id = null) { - if($this->site_url==null) $this->init(); - - if($module_srl) $args->module_srl= $module_srl; - if($startTime) $args->start_date = $this->getDate($startTime); - if($endTime) $args->end_date = $this->getDate($endTime); - $args->page = $page; - - $output = executeQueryArray('syndication.getDeletedList', $args); - - $cur_page = $output->page_navigation->cur_page; - $total_page = $output->page_navigation->last_page; - - $result->next_url = null; - $result->list = array(); - - if($cur_page<$total_page) { - $next_url = $this->getSelfHref($id, $type); - if($startTime) $next_url .= '&startTime='.$startTime; - if($endTime) $next_url .= '&endTime='.$endTime; - $result->next_url = $next_url . '&page='.($cur_page+1); - } - - if($output->data) { - foreach($output->data as $key => $val) { - $val->id = $this->getID('article', $val->module_srl.'-'.$val->document_srl); - $val->deleted = date("Y-m-d\\TH:i:s", ztime($val->regdate)).$GLOBALS['_time_zone']; - $val->alternative_href = getFullSiteUrl($this->site_url, '', 'document_srl', $val->document_srl); - $val->channel_id = $this->getID('channel', $val->module_srl.'-'.$val->document_srl); - $output->data[$key] = $val; - } - $result->list = $output->data; - } - return $result; - } - - function getID($type, $target_id = null) { - if($this->site_url==null) $this->init(); - - return sprintf('tag:%s,%d:%s', $this->site_url, $this->year, $type) . ($target_id?':'.$target_id:''); - } - - function getChannelAlternativeHref($module_srl) { - static $module_info = array(); - if(!isset($module_info[$module_srl])) { - $args->module_srl = $module_srl; - $output = executeQuery('syndication.getModuleSiteInfo', $args); - if($output->data) $module_info[$module_srl] = $output->data; - else $module_info[$module_srl] = null; - } - - if(is_null($module_info[$module_srl])) return $this->site_url; - - $domain = $module_info[$module_srl]->domain; - $url = getFullSiteUrl($domain, '', 'mid', $module_info[$module_srl]->mid); - if(substr($url,0,1)=='/') $domain = 'http://'.$this->site_url.$url; - return $url; - } - - function getSelfHref($id, $type = null) { - if($this->site_url==null) $this->init(); - - return sprintf('http://%s/?module=syndication&act=getSyndicationList&id=%s&type=%s', $this->site_url, $id, $type); - } - - function getAlternativeHref($module_info = null) { - if($this->site_url==null) $this->init(); - - if(!$module_info) return sprintf('http://%s', $this->site_url); - if(!$module_info->site_srl) return getFullUrl('', 'mid', $module_info->mid); - - $domain = $module_info->domain; - $url = getFullSiteUrl($domain, '', 'mid', $module_info->mid); - - if(substr($url,0,1)=='/') $domain = 'http://'.$this->site_url.$url; - return $url; - } - - function getDate($date) { - $time = strtotime($date); - if($time == -1) $time = ztime(str_replace(array('-','T',':'),'',$date)); - return date('YmdHis', $time); - } - } -?> diff --git a/modules/syndication/tpl/channel.html b/modules/syndication/tpl/channel.html deleted file mode 100644 index 55cf2b34d..000000000 --- a/modules/syndication/tpl/channel.html +++ /dev/null @@ -1,16 +0,0 @@ -{''} - - - - - - - - - - - - - - - diff --git a/modules/syndication/tpl/channel.info.html b/modules/syndication/tpl/channel.info.html deleted file mode 100644 index c8543d979..000000000 --- a/modules/syndication/tpl/channel.info.html +++ /dev/null @@ -1,5 +0,0 @@ -{''} - - - - diff --git a/modules/syndication/tpl/config.html b/modules/syndication/tpl/config.html deleted file mode 100644 index 33a23f7fb..000000000 --- a/modules/syndication/tpl/config.html +++ /dev/null @@ -1,63 +0,0 @@ - - - -

{$lang->syndication} {$lang->cmd_management}

-

{$lang->about_syndication}

- -
-

{$XE_VALIDATOR_MESSAGE}

-
-
- - - - - - - - - - - - - - - - - - -
{$lang->my_syndication_url}
- http:// - -

{$lang->about_my_syndication_url}

-

-
{$lang->syndication_service}
-
    - -
  • - selected)-->checked="checked" /> - - -
  • - -
- -

{$lang->about_syndication}

-
{$lang->except_module}
- - -

{$lang->about_except_module}

- -
- -
-
diff --git a/modules/syndication/tpl/css/syndication.css b/modules/syndication/tpl/css/syndication.css deleted file mode 100644 index 1a6213680..000000000 --- a/modules/syndication/tpl/css/syndication.css +++ /dev/null @@ -1,17 +0,0 @@ -@charset "utf-8"; - -input.siteUrl { width:400px; } -ul.syndiService { list-style:none; margin:0; padding:0;} -ul.syndiService li { padding:10px 0; margin:0;} -select.exceptModuleList { width:400px; } -ul.midCommand { margin:20px 0 0 0; padding:0; list-style:none; } -ul.midCommand li { display:inline; margin:0 20px 0 0; padding:0;} - -/* Vertical Bar Graph */ -.vGraph{ padding:20px 0;} -.vGraph ul{ margin:0; padding:0; height:100px; border:1px solid #ddd; border-top:0; border-right:0; font-size:11px; font-family:Tahoma, Geneva, sans-serif; list-style:none;} -.vGraph ul:after{ content:""; display:block; clear:both;} -.vGraph li{ float:left; display:inline; width:8%; height:100%; margin:0 3%; position:relative; text-align:center; white-space:nowrap;} -.vGraph .gTerm{ position:relative; display:inline-block; width:100%; height:20px; line-height:20px; margin:0 -100% -20px 0; padding:100px 0 0 0; vertical-align:bottom; color:#767676; font-weight:bold;} -.vGraph .gBar{ position:relative; display:inline-block; width:100%; margin:-1px 0 0 0; border:1px solid #ccc; border-bottom:0; background:#e9e9e9; vertical-align:bottom;} -.vGraph .gBar span{ position:absolute; width:100%; top:-20px; left:0; color:#767676;} diff --git a/modules/syndication/tpl/error.html b/modules/syndication/tpl/error.html deleted file mode 100644 index e641f1dcb..000000000 --- a/modules/syndication/tpl/error.html +++ /dev/null @@ -1,5 +0,0 @@ -{''} - - -1 - {$message} - diff --git a/modules/syndication/tpl/filter/insert_service.xml b/modules/syndication/tpl/filter/insert_service.xml deleted file mode 100644 index b81953e60..000000000 --- a/modules/syndication/tpl/filter/insert_service.xml +++ /dev/null @@ -1,8 +0,0 @@ - -
- - - - - - diff --git a/modules/syndication/tpl/include.articles.html b/modules/syndication/tpl/include.articles.html deleted file mode 100644 index 2d501a39f..000000000 --- a/modules/syndication/tpl/include.articles.html +++ /dev/null @@ -1,14 +0,0 @@ - - - {htmlspecialchars($article->id)} - {htmlspecialchars($article->title)} - {$article->updated} - - - - {date('Y-m-d\TH:i:s',ztime($article->regdate)).$time_zone} - - {htmlspecialchars($article->nick_name)} - - {htmlspecialchars($article->content)} - diff --git a/modules/syndication/tpl/include.channel.html b/modules/syndication/tpl/include.channel.html deleted file mode 100644 index 4ead02593..000000000 --- a/modules/syndication/tpl/include.channel.html +++ /dev/null @@ -1,8 +0,0 @@ - {htmlspecialchars($channel_info->id)} - {htmlspecialchars($channel_info->title)} - {$channel_info->updated} - - - - {$channel_info->type} - {htmlspecialchars($channel_info->summary)} diff --git a/modules/syndication/tpl/include.channels.html b/modules/syndication/tpl/include.channels.html deleted file mode 100644 index 76a6a42cb..000000000 --- a/modules/syndication/tpl/include.channels.html +++ /dev/null @@ -1,8 +0,0 @@ - - {htmlspecialchars($channel_info->id)} - {htmlspecialchars($channel_info->title)} - {$channel_info->updated} - - - {htmlspecialchars($channel_info->summary)} - diff --git a/modules/syndication/tpl/include.deleted.html b/modules/syndication/tpl/include.deleted.html deleted file mode 100644 index c3bce73a8..000000000 --- a/modules/syndication/tpl/include.deleted.html +++ /dev/null @@ -1,8 +0,0 @@ - - - {htmlspecialchars($delete->id)} - {htmlspecialchars($delete->title)} - {$delete->deleted} - - {$delete->deleted} - diff --git a/modules/syndication/tpl/include.site.html b/modules/syndication/tpl/include.site.html deleted file mode 100644 index a8499e0c5..000000000 --- a/modules/syndication/tpl/include.site.html +++ /dev/null @@ -1,5 +0,0 @@ - {htmlspecialchars($site_info->id)} - {htmlspecialchars($site_info->title)} - {$site_info->updated} - - diff --git a/modules/syndication/tpl/js/syndication.js b/modules/syndication/tpl/js/syndication.js deleted file mode 100644 index 47c202672..000000000 --- a/modules/syndication/tpl/js/syndication.js +++ /dev/null @@ -1,55 +0,0 @@ -function insertSelectedModules(id, module_srl, mid, browser_title) { - var sel_obj = get_by_id('_'+id); - for(var i=0;i8) sel_obj.size = sel_obj.options.length; - - doSyncExceptModules(id); -} - -function removeExceptModule(id) { - var sel_obj = get_by_id('_'+id); - sel_obj.remove(sel_obj.selectedIndex); - if(sel_obj.options.length) sel_obj.selectedIndex = sel_obj.options.length-1; - doSyncExceptModules(id); -} - -function doSyncExceptModules(id) { - var selected_module_srls = new Array(); - var sel_obj = get_by_id('_'+id); - for(var i=0;iNaver Syndication Status - -

{$lang->syndication_status_result}

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
{$lang->site}{$result->site_name}
{$lang->syndication_status}{$result->status}
{$lang->syndication_synic_start_date}{$result->first_update}
{$lang->syndication_synic_last_date}{$result->last_update}
{$lang->syndication_visit_ok_count}{number_format($result->visit_ok_count)}
{$lang->syndication_visit_fail_count}{number_format($result->visit_fail_count)}
-

{$lang->syndication_sync_article}

-
- -
    - -
  • {$date}{number_format($count)}
  • - -
- -
diff --git a/modules/syndication/tpl/site.html b/modules/syndication/tpl/site.html deleted file mode 100644 index 04fa4e46f..000000000 --- a/modules/syndication/tpl/site.html +++ /dev/null @@ -1,21 +0,0 @@ -{''} - - - - - - - - - - - - - - - - - - - - diff --git a/modules/syndication/tpl/site.info.html b/modules/syndication/tpl/site.info.html deleted file mode 100644 index d4aff8112..000000000 --- a/modules/syndication/tpl/site.info.html +++ /dev/null @@ -1,4 +0,0 @@ -{''} - - -