mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@262 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
31bfa47594
commit
3e23bb535f
4 changed files with 51 additions and 22 deletions
|
|
@ -9,7 +9,9 @@
|
||||||
|
|
||||||
var $default_rss_type = "rss20";
|
var $default_rss_type = "rss20";
|
||||||
var $rss_types = array(
|
var $rss_types = array(
|
||||||
"rss20" => "rss2.0"
|
"rss20" => "rss 2.0",
|
||||||
|
"rss10" => "rss 1.0",
|
||||||
|
"atom03" => "atom 0.3",
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,10 @@
|
||||||
|
|
||||||
// RSS 출력 형식을 체크
|
// RSS 출력 형식을 체크
|
||||||
$rss_type = $config->rss_type;
|
$rss_type = $config->rss_type;
|
||||||
if(!$this->rss_types->{$rss_type}) $rss_type = $this->default_rss_type;
|
if(!$this->rss_types[$rss_type]) $rss_type = $this->default_rss_type;
|
||||||
|
|
||||||
if(count($content)) {
|
if(count($content)) {
|
||||||
|
$idx = 0;
|
||||||
foreach($content as $key => $item) {
|
foreach($content as $key => $item) {
|
||||||
$year = substr($item->regdate,0,4);
|
$year = substr($item->regdate,0,4);
|
||||||
$month = substr($item->regdate,4,2);
|
$month = substr($item->regdate,4,2);
|
||||||
|
|
@ -60,13 +61,13 @@
|
||||||
$item->link = sprintf("%s?document_srl=%d", Context::getRequestUri(), $item->document_srl);
|
$item->link = sprintf("%s?document_srl=%d", Context::getRequestUri(), $item->document_srl);
|
||||||
$item->description = $item->content;
|
$item->description = $item->content;
|
||||||
$item->date = gmdate("D, d M Y H:i:s", $time);
|
$item->date = gmdate("D, d M Y H:i:s", $time);
|
||||||
$content[$key] = $item;
|
$output[$idx++] = $item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// RSS 출력물에서 사용될 변수 세팅
|
// RSS 출력물에서 사용될 변수 세팅
|
||||||
Context::set('info', $info);
|
Context::set('info', $info);
|
||||||
Context::set('content', $content);
|
Context::set('content', $output);
|
||||||
|
|
||||||
// 결과 출력을 XMLRPC로 강제 지정
|
// 결과 출력을 XMLRPC로 강제 지정
|
||||||
Context::setResponseMethod("XMLRPC");
|
Context::setResponseMethod("XMLRPC");
|
||||||
|
|
|
||||||
27
modules/rss/tpl/rss10.html
Normal file
27
modules/rss/tpl/rss10.html
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{'<?xml version="1.0" encoding="utf-8" ?>'}
|
||||||
|
|
||||||
|
<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" >
|
||||||
|
<channel rdf:about="http://blog.rss.naver.com/blogRss.nhn?blogId=myyami78&rss=1.0">
|
||||||
|
<title><![CDATA[{$info->title}]]></title>
|
||||||
|
<link><![CDATA[{$info->link}]]></link>
|
||||||
|
<description><![CDATA[{$info->description}]]></description>
|
||||||
|
<items>
|
||||||
|
<rdf:Seq>
|
||||||
|
<!--@foreach($content as $key => $item)-->
|
||||||
|
<rdf:li resource="{$key}" />
|
||||||
|
<!--@end-->
|
||||||
|
</rdf:Seq>
|
||||||
|
</items>
|
||||||
|
<dc:date>{$info->date}</dc:date>
|
||||||
|
<dc:language>{$info->language}</dc:language>
|
||||||
|
<totalCount>{$info->total_count}</totalCount>
|
||||||
|
</channel>
|
||||||
|
<!--@foreach($content as $key => $item)-->
|
||||||
|
<item rdf:about="{$key}">
|
||||||
|
<title><![CDATA[{$item->title}]]></title>
|
||||||
|
<link><![CDATA[{$item->link}]]></link>
|
||||||
|
<description><![CDATA[{$item->description}]]></description>
|
||||||
|
<dc:date>{$item->date}</dc:date>
|
||||||
|
</item>
|
||||||
|
<!--@end-->
|
||||||
|
</rdf:RDF>
|
||||||
|
|
@ -1,22 +1,21 @@
|
||||||
{'<?xml version="1.0" encoding="utf-8" ?>'}
|
{'<?xml version="1.0" encoding="utf-8" ?>'}
|
||||||
|
|
||||||
<!-- // RSS2.0 -->
|
|
||||||
<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/">
|
<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/">
|
||||||
<channel>
|
<channel>
|
||||||
<title><![CDATA[{$info->title}]]></title>
|
<title><![CDATA[{$info->title}]]></title>
|
||||||
<link><![CDATA[{$info->link}]]></link>
|
<link><![CDATA[{$info->link}]]></link>
|
||||||
<description><![CDATA[{$info->description}]]></description>
|
<description><![CDATA[{$info->description}]]></description>
|
||||||
<language>{$info->language}</language>
|
<language>{$info->language}</language>
|
||||||
<pubDate>{$info->date}</pubDate>
|
<pubDate>{$info->date}</pubDate>
|
||||||
<totalCount>{$info->total_count}</totalCount>
|
<totalCount>{$info->total_count}</totalCount>
|
||||||
<!--@foreach($content as $item)-->
|
<!--@foreach($content as $item)-->
|
||||||
<item>
|
<item>
|
||||||
<title><![CDATA[{$item->title}]]></title>
|
<title><![CDATA[{$item->title}]]></title>
|
||||||
<author><![CDATA[{$item->author}]]></author>
|
<author><![CDATA[{$item->author}]]></author>
|
||||||
<link><![CDATA[{$item->link}]]></link>
|
<link><![CDATA[{$item->link}]]></link>
|
||||||
<description><![CDATA[{$item->description}]]></description>
|
<description><![CDATA[{$item->description}]]></description>
|
||||||
<pubDate>{$item->date}</pubDate>
|
<pubDate>{$item->date}</pubDate>
|
||||||
</item>
|
</item>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue