mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
css 및 js 호출순서 조정기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5785 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f380d9c48
commit
61851f1dfe
2149 changed files with 109090 additions and 18689 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="0.2">
|
||||
<title xml:lang="ko">RSS</title>
|
||||
<title xml:lang="zh-CN">RSS</title>
|
||||
<title xml:lang="zh-CN">整站RSS</title>
|
||||
<title xml:lang="jp">RSS</title>
|
||||
<title xml:lang="en">RSS</title>
|
||||
<title xml:lang="es">RSS</title>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<module>
|
||||
<grants />
|
||||
<permissions />
|
||||
<actions>
|
||||
<action name="dispRssAdminIndex" type="view" index="true" standalone="true" admin_index="true" />
|
||||
<action name="rss" type="view" standalone="true" />
|
||||
<action name="procRssAdminInsertConfig" type="controller" standalone="true" />
|
||||
<action name="procRssAdminInsertModuleConfig" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/rss/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief English language pack (basic)
|
||||
**/
|
||||
|
||||
// general words
|
||||
$lang->rss_disable = "Disable RSS";
|
||||
$lang->rss_type = "RSS feed type";
|
||||
$lang->open_rss = 'Open RSS';
|
||||
$lang->open_rss_types = array(
|
||||
'Y' => 'Open all',
|
||||
'H' => 'Open summary',
|
||||
'N' => 'Not open',
|
||||
);
|
||||
|
||||
// for description
|
||||
$lang->about_rss_disable = "If checked, RSS will be disabled.";
|
||||
$lang->about_rss_type = "You can assign RSS feed type.";
|
||||
$lang->about_open_rss = 'You can select RSS on the current module to be open to the public.\nNo matter the view permission of article , RSS will be open to the public by its option.';
|
||||
|
||||
// for error message
|
||||
$lang->msg_rss_is_disabled = "RSS function is disabled.";
|
||||
?>
|
||||
<?php
|
||||
/**
|
||||
* @file modules/rss/lang/en.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief English language pack (basic)
|
||||
**/
|
||||
|
||||
// general words
|
||||
$lang->rss_disable = "Disable RSS";
|
||||
$lang->rss_type = "RSS feed type";
|
||||
$lang->open_rss = 'Open RSS';
|
||||
$lang->open_rss_types = array(
|
||||
'Y' => 'Open all',
|
||||
'H' => 'Open summary',
|
||||
'N' => 'Not open',
|
||||
);
|
||||
|
||||
// for description
|
||||
$lang->about_rss_disable = "If checked, RSS will be disabled.";
|
||||
$lang->about_rss_type = "You can assign RSS feed type.";
|
||||
$lang->about_open_rss = 'You can select RSS on the current module to be open to the public.\nNo matter the view permission of article , RSS will be open to the public by its option.';
|
||||
|
||||
// for error message
|
||||
$lang->msg_rss_is_disabled = "RSS function is disabled.";
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -6,20 +6,31 @@
|
|||
**/
|
||||
|
||||
// 일반 단어들
|
||||
$lang->rss_disable = "RSS 끄기";
|
||||
$lang->rss_type = "출력할 RSS 형식";
|
||||
$lang->open_rss = 'RSS 공개';
|
||||
$lang->feed = '피드(Feed) 발행';
|
||||
$lang->total_feed = '통합 피드';
|
||||
$lang->rss_disable = '피드(Feed) 끄기';
|
||||
$lang->feed_copyright = '저작권';
|
||||
$lang->feed_document_count = '한 페이지당 글 수';
|
||||
$lang->feed_image = '피드 이미지';
|
||||
$lang->rss_type = '출력할 피드(Feed) 형식';
|
||||
$lang->open_rss = '피드(Feed) 공개';
|
||||
$lang->open_rss_types = array(
|
||||
'Y' => '전문 공개 ',
|
||||
'H' => '요약 공개',
|
||||
'N' => '공개하지 않음',
|
||||
);
|
||||
$lang->open_feed_to_total = '통합 피드에 포함';
|
||||
|
||||
// 설명문
|
||||
$lang->about_rss_disable = "체크하시면 RSS 출력을 하지 않습니다";
|
||||
$lang->about_rss_type = "출력하실 RSS 형식을 지정하실 수 있습니다";
|
||||
$lang->about_open_rss = '현재 모듈에 대한 RSS 공개를 선택하실 수 있습니다. 글 보는 권한과 상관없이 옵션에 따라 RSS가 공개됩니다';
|
||||
$lang->about_rss_disable = '체크하시면 피드(Feed) 출력을 하지 않습니다.';
|
||||
$lang->about_rss_type = '출력하실 피드(Feed) 형식을 지정하실 수 있습니다.';
|
||||
$lang->about_open_rss = '현재 모듈에 대한 피드(Feed) 공개를 선택하실 수 있습니다. 글 보는 권한과 상관없이 옵션에 따라 RSS가 공개됩니다.';
|
||||
$lang->about_feed_description = '발행될 피드에 대한 설명을 입력하실 수 있습니다. 설명을 입력하지 않으실 경우, 해당 모듈에 설정된 관리용 설명이 포함됩니다.';
|
||||
$lang->about_feed_copyright = '발행될 피드의 글에 대한 저작권 정보입니다.';
|
||||
$lang->about_part_feed_copyright = '입력하지 않으면 전체 피드 저작권 설정과 동일하게 적용됩니다.';
|
||||
$lang->about_feed_document_count = '피드 한페이지에 공개되는 글의 수. (기본값 : 15)';
|
||||
|
||||
// 에러 메세지들
|
||||
$lang->msg_rss_is_disabled = "RSS 기능이 잠겨 있습니다";
|
||||
$lang->msg_rss_is_disabled = '피드(Feed) 기능이 잠겨 있습니다';
|
||||
$lang->msg_rss_invalid_image_format = '이미지의 형식이 잘못되었습니다.\nJPEG, GIF, PNG 파일만 지원합니다.';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -1,25 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* @file modules/rss/lang/zh-CN.lang.php
|
||||
* @author zero <zero@nzeo.com>
|
||||
* @brief 简体中文语言包 (只收录基本内容)
|
||||
* @author zero <zero@nzeo.com> 翻译:guny
|
||||
* @brief RSS模块简体中文语言包
|
||||
**/
|
||||
|
||||
// 一般单词
|
||||
$lang->feed = 'RSS发布';
|
||||
$lang->total_feed = '整站RSS';
|
||||
$lang->rss_disable = "关闭RSS";
|
||||
$lang->feed_copyright = '版权';
|
||||
$lang->feed_document_count = '每页主题数';
|
||||
$lang->feed_image = 'RSS图片';
|
||||
$lang->rss_type = "将显示的RSS形式";
|
||||
$lang->open_rss = '公开RSS';
|
||||
$lang->open_rss = 'RSS公开';
|
||||
$lang->open_rss_types = array(
|
||||
'Y' => '公开全文',
|
||||
'H' => '公开摘要',
|
||||
'N' => '不公开',
|
||||
);
|
||||
|
||||
// 说明文
|
||||
$lang->open_feed_to_total = '包含到整站RSS';
|
||||
|
||||
// 说明
|
||||
$lang->about_rss_disable = "选此项不显示RSS。";
|
||||
$lang->about_rss_type = "可以指定要显示的RSS形式。";
|
||||
$lang->about_open_rss = '可以选择对该模块的RSS公开程度。RSS公开将不受查看内容权限的限制,随公开RSS的选项公开RSS。';
|
||||
$lang->about_open_rss = '可以指定RSS公开程度,RSS公开不受查看内容权限的限制。';
|
||||
$lang->about_feed_description = '可以输入简单说明,留空输出该模块的说明。';
|
||||
$lang->about_feed_copyright = 'RSS Feed版权信息。';
|
||||
$lang->about_part_feed_copyright = '留空版权信息参照整站RSS的版权信息。';
|
||||
$lang->about_feed_document_count = '每页要显示的主题数(默认: 15)。';
|
||||
|
||||
// 错误提示
|
||||
$lang->msg_rss_is_disabled = "RSS功能处于锁定状态。";
|
||||
$lang->msg_rss_invalid_image_format = '上传的文件格式错误!\n只允许上传JPEG, GIF, PNG图片文件。';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -6,20 +6,31 @@
|
|||
**/
|
||||
|
||||
// 一般語言
|
||||
$lang->rss_disable = "關閉 RSS";
|
||||
$lang->rss_type = "RSS形式";
|
||||
$lang->open_rss = '公開 RSS';
|
||||
$lang->feed = '發佈RSS Feed';
|
||||
$lang->total_feed = '所有RSS';
|
||||
$lang->rss_disable = "關閉RSS Feed";
|
||||
$lang->feed_copyright = '版權';
|
||||
$lang->feed_document_count = '每頁主題數';
|
||||
$lang->feed_image = 'RSS圖片';
|
||||
$lang->rss_type = "RSS Feed類型";
|
||||
$lang->open_rss = '公開RSS Feed';
|
||||
$lang->open_rss_types = array(
|
||||
'Y' => '公開全文',
|
||||
'Y' => '全部公開',
|
||||
'H' => '公開摘要',
|
||||
'N' => '不公開',
|
||||
);
|
||||
$lang->open_feed_to_total = '包含所有RSS Feed';
|
||||
|
||||
// 說明
|
||||
$lang->about_rss_disable = "不顯示 RSS。";
|
||||
$lang->about_rss_type = "指定要顯示的 RSS形式。";
|
||||
$lang->about_open_rss = '選擇該模組的 RSS公開程度。公開 RSS將不受檢視內容權限的限制,隨公開 RSS的選項公開 RSS。';
|
||||
$lang->about_rss_disable = "不顯示RSS Feed。";
|
||||
$lang->about_rss_type = "指定要顯示的RSS Feed類型。";
|
||||
$lang->about_open_rss = '選擇該模組的RSS Feed公開程度。公開RSS Feed將不受檢視內容權限的限制,隨公開RSS Feed的選項公開RSS Feed。';
|
||||
$lang->about_feed_description = '현재 모듈에 대한 간단한 설명을 쓸 수 있습니다. 설명을 입력하지 않으실 경우, 해당 모듈에 설정된 관리용 설명이 포함됩니다.';
|
||||
$lang->about_feed_copyright = '현재 모듈에서 Feed로 발행되는 글에 대한 저작권 정보입니다.';
|
||||
$lang->about_part_feed_copyright = '입력하지 않으면 전체 피드 저작권 설정과 동일하게 적용됩니다.';
|
||||
$lang->about_feed_document_count = '每頁要顯示的主題數。(預設: 15)';
|
||||
|
||||
// 錯誤提示
|
||||
$lang->msg_rss_is_disabled = "RSS功能處於鎖定狀態。";
|
||||
$lang->msg_rss_is_disabled = "RSS Feed功能未開啟。";
|
||||
$lang->msg_rss_invalid_image_format = '錯誤的檔案格式,無法上傳。\n只允許上傳JPEG, GIF, PNG等檔案格式。';
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,69 @@
|
|||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief RSS 전체피드 설정
|
||||
**/
|
||||
function procRssAdminInsertConfig() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$total_config = $oModuleModel->getModuleConfig('rss');
|
||||
|
||||
$config_vars = Context::getRequestVars();
|
||||
|
||||
$config_vars->feed_document_count = (int)$config_vars->feed_document_count;
|
||||
|
||||
if(!$config_vars->use_total_feed) $alt_message = 'msg_invalid_request';
|
||||
if(!in_array($config_vars->use_total_feed, array('Y','N'))) $config_vars->open_rss = 'Y';
|
||||
|
||||
if($config_vars->image || $config_vars->del_image) {
|
||||
$image_obj = $config_vars->image;
|
||||
$config_vars->image = $total_config->image;
|
||||
|
||||
// 삭제 요청에 대한 변수를 구함
|
||||
if($config_vars->del_image == 'Y' || $image_obj) {
|
||||
FileHandler::removeFile($config_vars->image);
|
||||
$config_vars->image = '';
|
||||
$total_config->image = '';
|
||||
}
|
||||
|
||||
// 정상적으로 업로드된 파일이 아니면 무시
|
||||
if($image_obj['tmp_name'] && is_uploaded_file($image_obj['tmp_name'])) {
|
||||
// 이미지 파일이 아니어도 무시 (swf는 패스~)
|
||||
$image_obj['name'] = Context::convertEncodingStr($image_obj['name']);
|
||||
|
||||
if(!preg_match("/\.(jpg|jpeg|gif|png)$/i", $image_obj['name'])) $alt_message = 'msg_rss_invalid_image_format';
|
||||
else {
|
||||
// 경로를 정해서 업로드
|
||||
$path = './files/attach/images/rss/';
|
||||
// 디렉토리 생성
|
||||
if(!FileHandler::makeDir($path)) $alt_message = 'msg_error_occured';
|
||||
else{
|
||||
$filename = $path.$image_obj['name'];
|
||||
// 파일 이동
|
||||
if(!move_uploaded_file($image_obj['tmp_name'], $filename)) $alt_message = 'msg_error_occured';
|
||||
else {
|
||||
$config_vars->image = $filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$config_vars->image && $config_vars->del_image != 'Y') $config_vars->image = $total_config->image;
|
||||
|
||||
$output = $this->setFeedConfig($config_vars);
|
||||
|
||||
if(!$alt_message) $alt_message = 'success_updated';
|
||||
|
||||
$alt_message = Context::getLang($alt_message);
|
||||
Context::set('msg', $alt_message);
|
||||
|
||||
$this->setLayoutPath('./common/tpl');
|
||||
$this->setLayoutFile('default_layout.html');
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile("top_refresh.html");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief RSS 모듈별 설정
|
||||
**/
|
||||
|
|
@ -26,8 +89,15 @@
|
|||
// 여러개의 모듈 일괄 설정일 경우
|
||||
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
|
||||
else $module_srl = array($module_srl);
|
||||
|
||||
$open_rss = Context::get('open_rss');
|
||||
if(!is_array($module_srl)) $module_srl[0] = $module_srl;
|
||||
|
||||
$config_vars = Context::getRequestVars();
|
||||
|
||||
$open_rss = $config_vars->open_rss;
|
||||
$open_total_feed = $config_vars->open_total_feed;
|
||||
$feed_description = trim($config_vars->feed_description);
|
||||
$feed_copyright = trim($config_vars->feed_copyright);
|
||||
|
||||
if(!$module_srl || !$open_rss) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
if(!in_array($open_rss, array('Y','H','N'))) $open_rss = 'N';
|
||||
|
|
@ -36,19 +106,33 @@
|
|||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
if(!$srl) continue;
|
||||
$output = $this->setRssModuleConfig($srl, $open_rss);
|
||||
$output = $this->setRssModuleConfig($srl, $open_rss, $open_total_feed, $feed_description, $feed_copyright);
|
||||
}
|
||||
|
||||
$this->setError(-1);
|
||||
$this->setMessage('success_updated');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief RSS모듈의 전체 Feed 설정용 함수
|
||||
**/
|
||||
function setFeedConfig($config) {
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertModuleConfig('rss',$config);
|
||||
return new Object();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief RSS 모듈별 설정 함수
|
||||
**/
|
||||
function setRssModuleConfig($module_srl, $open_rss) {
|
||||
function setRssModuleConfig($module_srl, $open_rss, $open_total_feed = 'N', $feed_description = 'N', $feed_copyright = 'N') {
|
||||
$oModuleController = &getController('module');
|
||||
$config->open_rss = $open_rss;
|
||||
$config->open_total_feed = $open_total_feed;
|
||||
if($feed_description != 'N') { $config->feed_description = $feed_description; }
|
||||
if($feed_copyright != 'N') { $config->feed_copyright = $feed_copyright; }
|
||||
$oModuleController->insertModulePartConfig('rss',$module_srl,$config);
|
||||
return new Object();
|
||||
}
|
||||
|
|
|
|||
43
modules/rss/rss.admin.view.php
Normal file
43
modules/rss/rss.admin.view.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* @class rssAdminView
|
||||
* @author misol (misol221@paran.com)
|
||||
* @brief rss 모듈의 admin view class
|
||||
**/
|
||||
|
||||
class rssAdminView extends rss {
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
// 템플릿 경로 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 관리자 페이지 초기화면
|
||||
**/
|
||||
function dispRssAdminIndex() {
|
||||
$oModuleModel = &getModel('module');
|
||||
$rss_config = $oModuleModel->getModulePartConfigs('rss');
|
||||
$total_config = $oModuleModel->getModuleConfig('rss');
|
||||
|
||||
if($rss_config) {
|
||||
foreach($rss_config as $module_srl => $config) {
|
||||
if($config) {
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
|
||||
$feed_config[$module_srl]['mid'] = $module_info->mid;
|
||||
$feed_config[$module_srl]['open_feed'] = $config->open_rss;
|
||||
$feed_config[$module_srl]['open_total_feed'] = $config->open_total_feed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('feed_config', $feed_config);
|
||||
Context::set('total_config', $total_config);
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('rss_admin_index');
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -72,38 +72,5 @@
|
|||
function recompileCache() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 권한 체크를 실행하는 method
|
||||
* 모듈 객체가 생성된 경우는 직접 권한을 체크하지만 기능성 모듈등 스스로 객체를 생성하지 않는 모듈들의 경우에는
|
||||
* ModuleObject에서 직접 method를 호출하여 권한을 확인함
|
||||
*
|
||||
* isAdminGrant는 관리권한 이양시에만 사용되도록 하고 기본은 false로 return 되도록 하여 잘못된 권한 취약점이 생기지 않도록 주의하여야 함
|
||||
**/
|
||||
function isAdmin() {
|
||||
// 로그인이 되어 있지 않으면 무조건 return false
|
||||
$is_logged = Context::get('is_logged');
|
||||
if(!$is_logged) return false;
|
||||
|
||||
// 사용자 아이디를 구함
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
// 모듈 요청에 사용된 변수들을 가져옴
|
||||
$args = Context::getRequestVars();
|
||||
|
||||
// act의 값에 따라서 관리 권한 체크
|
||||
switch($args->act) {
|
||||
case 'procRssAdminInsertModuleConfig' :
|
||||
if(!$args->target_module_srl) return false;
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_info = $oModuleModel->getModuleInfoByModuleSrl($args->target_module_srl);
|
||||
if(!$module_info) return false;
|
||||
|
||||
if($oModuleModel->isModuleAdmin($module_info, $logged_info)) return true;
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @author zero (zero@nzeo.com)
|
||||
* @brief rss module의 controller class
|
||||
*
|
||||
* RSS 2.0형식으로 문서 출력
|
||||
* Feed 로 문서 출력
|
||||
*
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* @author zero (zero@nzeo.com)
|
||||
* @brief rss module의 model class
|
||||
*
|
||||
* RSS 2.0형식으로 문서 출력
|
||||
* Feed 문서 출력
|
||||
*
|
||||
**/
|
||||
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@
|
|||
}
|
||||
|
||||
/**
|
||||
* @brief RSS 출력
|
||||
* @brief 피드 출력
|
||||
**/
|
||||
function rss() {
|
||||
/**
|
||||
* RSS 출력을 위한 변수 설정
|
||||
* 피드 출력을 위한 변수 설정
|
||||
**/
|
||||
$mid = Context::get('mid'); ///< 대상 모듈 id, 없으면 전체로
|
||||
$start_date = (int)Context::get('start_date');
|
||||
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
$module_srls = array();
|
||||
$rss_config = array();
|
||||
$total_config = '';
|
||||
$total_config = $oModuleModel->getModuleConfig('rss');
|
||||
|
||||
// 하나의 mid가 지정되어 있으면 그 mid에 대한 것만 추출
|
||||
if($mid) {
|
||||
|
|
@ -38,17 +40,19 @@
|
|||
$config = $oModuleModel->getModulePartConfig('rss', $module_srl);
|
||||
if($config->open_rss && $config->open_rss != 'N') {
|
||||
$module_srls[] = $module_srl;
|
||||
$rss_config[$module_srl] = $config->open_rss;
|
||||
$open_rss_config[$module_srl] = $config->open_rss;
|
||||
}
|
||||
|
||||
// mid 가 선택되어 있지 않으면 전체
|
||||
} else {
|
||||
$rss_config = $oModuleModel->getModulePartConfigs('rss');
|
||||
if($rss_config) {
|
||||
foreach($rss_config as $module_srl => $config) {
|
||||
if($config && $config->open_rss != 'N') {
|
||||
$module_srls[] = $module_srl;
|
||||
$rss_config[$module_srl] = $config->open_rss;
|
||||
if($total_config->use_total_feed != 'N') {
|
||||
$rss_config = $oModuleModel->getModulePartConfigs('rss');
|
||||
if($rss_config) {
|
||||
foreach($rss_config as $module_srl => $config) {
|
||||
if($config && $config->open_rss != 'N' && $config->open_total_feed != 'T_N') {
|
||||
$module_srls[] = $module_srl;
|
||||
$open_rss_config[$module_srl] = $config->open_rss;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -63,6 +67,7 @@
|
|||
$args->search_keyword = 'N';
|
||||
$args->page = (int)Context::get('page');
|
||||
$args->list_count = 15;
|
||||
if($total_config->feed_document_count) $args->list_count = $total_config->feed_document_count;
|
||||
if(!$args->page || $args->page < 1) $args->page = 1;
|
||||
if($start_date || $start_date != 0) $args->start_date = $start_date;
|
||||
if($end_date || $end_date != 0) $args->end_date = $end_date;
|
||||
|
|
@ -77,18 +82,33 @@
|
|||
$output = $oDocumentModel->getDocumentList($args);
|
||||
$document_list = $output->data;
|
||||
|
||||
// rss 제목 및 정보등을 추출 Context::getBrowserTitle
|
||||
// 피드 제목 및 정보등을 추출 Context::getBrowserTitle
|
||||
if($mid) {
|
||||
$info->title = Context::getBrowserTitle();
|
||||
$info->title = str_replace('\'', ''',$info->title);
|
||||
$info->description = $this->module_info->description;
|
||||
if($config->feed_description) {
|
||||
$info->description = str_replace('\'', ''', htmlspecialchars($config->feed_description));
|
||||
}
|
||||
else {
|
||||
$info->description = str_replace('\'', ''', htmlspecialchars($this->module_info->description));
|
||||
}
|
||||
$info->link = getUrl('','mid',$mid);
|
||||
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($feed_config->feed_copyright));
|
||||
if(!$info->feed_copyright) {
|
||||
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($total_config->feed_copyright));
|
||||
}
|
||||
} else {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$info->title = $site_module_info->browser_title;
|
||||
if($total_config->feed_title) $info->title = $total_config->feed_title;
|
||||
else {
|
||||
$site_module_info = Context::get('site_module_info');
|
||||
$info->title = $site_module_info->browser_title;
|
||||
}
|
||||
$info->title = str_replace('\'', ''', htmlspecialchars($info->title));
|
||||
$info->description = str_replace('\'', ''', htmlspecialchars($total_config->feed_description));
|
||||
$info->link = Context::getRequestUri();
|
||||
$info->feed_copyright = str_replace('\'', ''', htmlspecialchars($total_config->feed_copyright));
|
||||
}
|
||||
if($total_config->image) $info->image = Context::getRequestUri().str_replace('\'', ''', htmlspecialchars($total_config->image));
|
||||
$info->total_count = $output->total_count;
|
||||
$info->total_page = $output->total_page;
|
||||
switch (Context::get('format')) {
|
||||
|
|
@ -108,7 +128,8 @@
|
|||
|
||||
// RSS 출력물에서 사용될 변수 세팅
|
||||
Context::set('info', $info);
|
||||
Context::set('rss_config', $rss_config);
|
||||
Context::set('feed_config', $config);
|
||||
Context::set('open_rss_config', $open_rss_config);
|
||||
Context::set('document_list', $document_list);
|
||||
|
||||
// 결과 출력을 XMLRPC로 강제 지정
|
||||
|
|
|
|||
|
|
@ -9,20 +9,21 @@
|
|||
<id>{$info->id}</id>
|
||||
<link rel="alternate" type="text/html" hreflang="{$info->language}" href="{$info->link}"/>
|
||||
<link rel="self" type="application/atom+xml" href="{$info->id}"/>
|
||||
<generator uri="http://www.zeroboard.com/" version="{__ZBXE_VERSION__}">XpressEngine</generator>
|
||||
<generator uri="http://www.xpressengine.com/" version="{__ZBXE_VERSION__}">XpressEngine</generator>
|
||||
<!--@foreach($document_list as $oDocument)--> <entry>
|
||||
<title>{str_replace('\'', ''',$oDocument->getTitle())}</title>
|
||||
<id>{$oDocument->getPermanentUrl()}</id>
|
||||
<published>{$oDocument->getRegdate('Y-m-d\TH:i:sP')}</published>
|
||||
<updated>{zdate($oDocument->get('last_update'),'Y-m-d\TH:i:sP')}</updated>
|
||||
<link href="{$oDocument->getPermanentUrl()}"/>
|
||||
<link rel="alternate" type="text/html" href="{$oDocument->getPermanentUrl()}"/>
|
||||
<link rel="replies" type="text/html" href="{$oDocument->getPermanentUrl()}#comment"/>
|
||||
<author>
|
||||
<name>{str_replace('\'', ''',$oDocument->getNickName())}</name>
|
||||
<!--@if($oDocument->isExistsHomepage())-->
|
||||
<uri>{$oDocument->getHomepageUrl()}</uri>
|
||||
<!--@end-->
|
||||
</author>
|
||||
<!--@if($rss_config[$oDocument->get('module_srl')]=='Y')-->
|
||||
<!--@if($open_rss_config[$oDocument->get('module_srl')]=='Y')-->
|
||||
<content type="html">{str_replace('\'', ''', htmlspecialchars($oDocument->getTransContent(false,false,true)))}</content>
|
||||
<!--@else-->
|
||||
<summary type="text">{str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))}</summary>
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
<!--@foreach($oDocument->get('tag_list') as $tag)-->
|
||||
<category term="{str_replace('\'', ''', htmlspecialchars($tag))}"/>
|
||||
<!--@end-->
|
||||
|
||||
</entry>
|
||||
<!--@end-->
|
||||
</feed>
|
||||
|
|
|
|||
7
modules/rss/tpl/filter/insert_rss_config.xml
Normal file
7
modules/rss/tpl/filter/insert_rss_config.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<filter name="insert_rss_config" module="rss" act="procRssAdminInsertConfig" confirm_msg_code="confirm_submit">
|
||||
<form />
|
||||
<response>
|
||||
<tag name="error" />
|
||||
<tag name="message" />
|
||||
</response>
|
||||
</filter>
|
||||
|
|
@ -4,10 +4,21 @@
|
|||
<channel>
|
||||
<title>{$info->title}</title>
|
||||
<link>{$info->link}</link>
|
||||
<description>{str_replace('\'', ''', htmlspecialchars($info->description))}</description>
|
||||
<description>{$info->description}</description>
|
||||
<language>{$info->language}</language>
|
||||
<pubDate>{$info->date}</pubDate>
|
||||
<lastBuildDate>{$info->date}</lastBuildDate>
|
||||
<generator>XpressEngine {__ZBXE_VERSION__}</generator>
|
||||
<!--@if($info->feed_copyright)-->
|
||||
<copyright>{$info->feed_copyright}</copyright>
|
||||
<!--@end-->
|
||||
<!--@if($info->image)-->
|
||||
<image>
|
||||
<url>{$info->image}</url>
|
||||
<title>{$info->title}</title>
|
||||
<link>{$info->link}</link>
|
||||
</image>
|
||||
<!--@end-->
|
||||
<!--@foreach($document_list as $oDocument)-->
|
||||
<item>
|
||||
<title>{str_replace('\'', ''',$oDocument->getTitle())}</title>
|
||||
|
|
@ -17,7 +28,7 @@
|
|||
<!--@if($oDocument->allowComment()) -->
|
||||
<comments>{$oDocument->getPermanentUrl()}#comment</comments>
|
||||
<!--@end-->
|
||||
<!--@if($rss_config[$oDocument->get('module_srl')]=='Y')-->
|
||||
<!--@if($open_rss_config[$oDocument->get('module_srl')]=='Y')-->
|
||||
<description>{str_replace('\'', ''', htmlspecialchars($oDocument->getTransContent(false,false,true)))}</description>
|
||||
<!--@else-->
|
||||
<description>{str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))}</description>
|
||||
|
|
|
|||
82
modules/rss/tpl/rss_admin_index.html
Normal file
82
modules/rss/tpl/rss_admin_index.html
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
<h3 class="xeAdmin">{$lang->total_feed} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
|
||||
<!--%import("filter/insert_rss_config.xml")-->
|
||||
<form id="fo_layout" action="./" method="post" enctype="multipart/form-data" target="hidden_iframe">
|
||||
<input type="hidden" name="module" value="rss" />
|
||||
<input type="hidden" name="act" value="procRssAdminInsertConfig" />
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->total_feed}</div></th>
|
||||
<td class="wide">
|
||||
<select name="use_total_feed" class="w200">
|
||||
<option value="Y" <!--@if(!$total_config->use_total_feed || $total_config->use_total_feed == 'Y')-->selected="selected"<!--@end-->>{$lang->use}</option>
|
||||
<option value="N" <!--@if($total_config->use_total_feed == 'N')-->selected="selected"<!--@end-->>{$lang->notuse}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->title}</div></th>
|
||||
<td class="wide">
|
||||
<input type="text" class="inputTypeText" name="feed_title" value="{htmlspecialchars($total_config->feed_title)}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->description}</div></th>
|
||||
<td class="wide">
|
||||
<textarea name="feed_description" class="inputTypeTextArea">{$total_config->feed_description}</textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->feed_image}</div></th>
|
||||
<td class="wide">
|
||||
<!--@if($total_config->image)-->
|
||||
<div>
|
||||
<img src="../../../{$total_config->image}" alt="image" /><br />
|
||||
<input type="checkbox" name="del_image" value="Y" id="del_image" class="checkbox" />
|
||||
<label for="del_image">{$lang->cmd_delete}</label>
|
||||
</div>
|
||||
<!--@end-->
|
||||
<input type="file" name="image" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->feed_copyright}</div></th>
|
||||
<td class="wide">
|
||||
<input type="text" class="inputTypeText" name="feed_copyright" value="{htmlspecialchars($total_config->feed_copyright)}" />
|
||||
<p>{$lang->about_feed_copyright}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->feed_document_count}</div></th>
|
||||
<td class="wide">
|
||||
<input type="text" class="inputTypeText" name="feed_document_count" value="{$total_config->feed_document_count}" />
|
||||
<p>{$lang->about_feed_document_count}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<th class="button" colspan="2"><span class="button strong black"><input type="submit" value="{$lang->cmd_save}"/></span></th>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<h3 class="xeAdmin">{$lang->feed} <span class="gray">{$lang->cmd_management}</span></h3>
|
||||
<table cellspacing="0" class="crossTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{$lang->mid}</td>
|
||||
<th scope="col">{$lang->open_rss}</td>
|
||||
<th scope="col">{$lang->open_feed_to_total}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!--@foreach($feed_config as $config)-->
|
||||
<tr>
|
||||
<th>{$config['mid']}</th>
|
||||
<td>{$lang->open_rss_types[$config['open_feed']]}</td>
|
||||
<td><!--@if($config['open_total_feed'] == 'T_N')-->{$lang->notuse}<!--@else-->{$lang->use}<!--@end--></td>
|
||||
</tr>
|
||||
<!--@end-->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<iframe name="hidden_iframe" frameborder="0" style="display:none"></iframe>
|
||||
|
|
@ -3,21 +3,44 @@
|
|||
<form action="./" method="post" onsubmit="return procFilter(this, insert_rss_module_config)">
|
||||
<input type="hidden" name="target_module_srl" value="{$rss_config->module_srl?$rss_config->module_srl:$module_srls}" />
|
||||
|
||||
<table cellspacing="0" class="adminTable">
|
||||
<caption>{$lang->open_rss}</caption>
|
||||
<h4 class="xeAdmin">{$lang->open_rss}</h4>
|
||||
<p class="summary">{$lang->about_open_rss}</p>
|
||||
<table cellspacing="0" class="rowTable">
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->open_rss}</div></th>
|
||||
<td class="wide">
|
||||
<select name="open_rss" class="w400">
|
||||
<select name="open_rss" class="w200">
|
||||
<!--@foreach($lang->open_rss_types as $key=>$val)-->
|
||||
<option value="{$key}" <!--@if(!$rss_config->open_rss && $key=='N')-->selected="selected"<!--@elseif($rss_config->open_rss==$key)-->selected="selected"<!--@end-->>{$val}</option>
|
||||
<!--@end-->
|
||||
</select>
|
||||
<p>{$lang->about_open_rss}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->open_feed_to_total}</div></th>
|
||||
<td class="wide">
|
||||
<select name="open_total_feed" class="w200">
|
||||
<option value="N" <!--@if(!$rss_config->open_total_feed || $rss_config->open_total_feed == 'N')-->selected="selected"<!--@end-->>{$lang->use}</option>
|
||||
<option value="T_N" <!--@if($rss_config->open_total_feed == 'T_N')-->selected="selected"<!--@end-->>{$lang->notuse}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->description}</div></th>
|
||||
<td class="wide">
|
||||
<textarea name="feed_description" class="inputTypeTextArea">{$rss_config->feed_description}</textarea>
|
||||
<p>{$lang->about_feed_description}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><div>{$lang->feed_copyright}</div></th>
|
||||
<td class="wide">
|
||||
<input type="text" class="inputTypeText" name="feed_copyright" value="{htmlspecialchars($rss_config->feed_copyright)}" />
|
||||
<p>{$lang->about_feed_copyright}<br />{$lang->about_part_feed_copyright}</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row2">
|
||||
<td class="right" colspan="2"><span class="button"><input type="submit" value="{$lang->cmd_save}"/></span></td>
|
||||
<th class="button" colspan="2"><span class="button strong black"><input type="submit" value="{$lang->cmd_save}"/></span></th>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
4
modules/rss/tpl/top_refresh.html
Normal file
4
modules/rss/tpl/top_refresh.html
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<script type="text/javascript">//<![CDATA[
|
||||
alert('{$msg}');
|
||||
top.location.href = top.location.href;
|
||||
//]]></script>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<title>{str_replace('\'', ''',$oDocument->getTitle())}</title>
|
||||
<author>{str_replace('\'', ''',$oDocument->getNickName())}</author>
|
||||
<link>{$oDocument->getPermanentUrl()}</link>
|
||||
<!--@if($rss_config[$oDocument->get('module_srl')]=='Y')-->
|
||||
<!--@if($open_rss_config[$oDocument->get('module_srl')]->open_rss=='Y')-->
|
||||
<description>{str_replace('\'', ''', htmlspecialchars($oDocument->getTransContent(false,false,true)))}</description>
|
||||
<!--@else-->
|
||||
<description>{str_replace('\'', ''', htmlspecialchars($oDocument->getContentText(100)))}</description>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue