mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
parent
22b16ecc73
commit
b667808d95
6 changed files with 27 additions and 19 deletions
|
|
@ -689,12 +689,12 @@ class documentItem extends Object
|
||||||
|
|
||||||
function getRegdateGM()
|
function getRegdateGM()
|
||||||
{
|
{
|
||||||
return gmdate('r', ztime($this->get('regdate')));
|
return Rhymix\Framework\DateTime::formatTimestampForCurrentUser('r', $this->getRegdateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
function getRegdateDT()
|
function getRegdateDT()
|
||||||
{
|
{
|
||||||
return zdate($this->get('regdate'), 'c', false);
|
return Rhymix\Framework\DateTime::formatTimestampForCurrentUser('c', $this->getRegdateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUpdate($format = 'Y.m.d H:i:s', $conversion = true)
|
function getUpdate($format = 'Y.m.d H:i:s', $conversion = true)
|
||||||
|
|
@ -709,12 +709,12 @@ class documentItem extends Object
|
||||||
|
|
||||||
function getUpdateGM()
|
function getUpdateGM()
|
||||||
{
|
{
|
||||||
return gmdate('r', ztime($this->get('last_update')));
|
return Rhymix\Framework\DateTime::formatTimestampForCurrentUser('r', $this->getUpdateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUpdateDT()
|
function getUpdateDT()
|
||||||
{
|
{
|
||||||
return zdate($this->get('last_update'), 'c', false);
|
return Rhymix\Framework\DateTime::formatTimestampForCurrentUser('c', $this->getUpdateTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPermanentUrl()
|
function getPermanentUrl()
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ class rssView extends rss
|
||||||
$obj = new stdClass;
|
$obj = new stdClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$act = Context::get('act');
|
||||||
$page = $obj->page ?: Context::get('page');
|
$page = $obj->page ?: Context::get('page');
|
||||||
$start = $obj->start_date ?: Context::get('start_date');
|
$start = $obj->start_date ?: Context::get('start_date');
|
||||||
$end = $obj->end_date ?: Context::get('end_date');
|
$end = $obj->end_date ?: Context::get('end_date');
|
||||||
|
|
@ -71,7 +72,6 @@ class rssView extends rss
|
||||||
break;
|
break;
|
||||||
// RSS 2.0 (default)
|
// RSS 2.0 (default)
|
||||||
default:
|
default:
|
||||||
$format = '';
|
|
||||||
$template = 'rss20';
|
$template = 'rss20';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -81,6 +81,12 @@ class rssView extends rss
|
||||||
$module_config = $oRssModel->getRssModuleConfig($target_module_srl);
|
$module_config = $oRssModel->getRssModuleConfig($target_module_srl);
|
||||||
$module_info = getModel('module')->getModuleInfoByModuleSrl($target_module_srl);
|
$module_info = getModel('module')->getModuleInfoByModuleSrl($target_module_srl);
|
||||||
|
|
||||||
|
// Get URL
|
||||||
|
$format = ($act != $format) ? $format : '';
|
||||||
|
$mid = $is_part_feed ? $module_info->mid : '';
|
||||||
|
$channel_url = getFullUrl('', 'mid', $mid, 'act', $act, 'format', $format, 'page', $page, 'start_date', $start, 'end_date', $end);
|
||||||
|
|
||||||
|
// Check error
|
||||||
if($obj->error)
|
if($obj->error)
|
||||||
{
|
{
|
||||||
Context::set('target_modules', array());
|
Context::set('target_modules', array());
|
||||||
|
|
@ -167,13 +173,14 @@ class rssView extends rss
|
||||||
$info->feed_copyright = $config->feed_copyright;
|
$info->feed_copyright = $config->feed_copyright;
|
||||||
}
|
}
|
||||||
|
|
||||||
$info->id = getFullUrl('', 'mid', $module_info->mid, 'act', 'rss', 'format', $format, 'page', $page, 'start_date', $start, 'end_date', $end);
|
$info->id = $channel_url;
|
||||||
$info->title = $obj->title ?: $info->title;
|
$info->title = $obj->title ?: $info->title;
|
||||||
$info->feed_title = $config->feed_title;
|
$info->feed_title = $config->feed_title;
|
||||||
$info->description = $obj->description ?: $info->description;
|
$info->description = $obj->description ?: $info->description;
|
||||||
$info->language = Context::getLangType();
|
$info->language = Context::getLangType();
|
||||||
$info->site_url = Context::getRequestUri();
|
$info->site_url = Context::getRequestUri();
|
||||||
$info->date = Rhymix\Framework\DateTime::formatTimestampForCurrentUser('c');
|
$info->dateGM = Rhymix\Framework\DateTime::formatTimestampForCurrentUser('r');
|
||||||
|
$info->dateDT = Rhymix\Framework\DateTime::formatTimestampForCurrentUser('c');
|
||||||
$info->image = $config->image ? Context::getRequestUri() . $config->image : '';
|
$info->image = $config->image ? Context::getRequestUri() . $config->image : '';
|
||||||
getController('module')->replaceDefinedLangCode($info->title);
|
getController('module')->replaceDefinedLangCode($info->title);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<subtitle cond="$info->description">{$info->description}</subtitle>
|
<subtitle cond="$info->description">{$info->description}</subtitle>
|
||||||
<link rel="alternate" type="text/html" hreflang="{$info->language}" href="{$info->link}"/>
|
<link rel="alternate" type="text/html" hreflang="{$info->language}" href="{$info->link}"/>
|
||||||
<link rel="self" type="application/atom+xml" href="{$info->id}"/>
|
<link rel="self" type="application/atom+xml" href="{$info->id}"/>
|
||||||
<updated>{$info->date}</updated>
|
<updated>{$info->dateDT}</updated>
|
||||||
<id>{$info->id}</id>
|
<id>{$info->id}</id>
|
||||||
<generator>Rhymix</generator>
|
<generator>Rhymix</generator>
|
||||||
<rights cond="$info->feed_copyright">{$info->feed_copyright}</rights>
|
<rights cond="$info->feed_copyright">{$info->feed_copyright}</rights>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<link>{$info->link}</link>
|
<link>{$info->link}</link>
|
||||||
<description>{$info->description}</description>
|
<description>{$info->description}</description>
|
||||||
<dc:language>{$info->language}</dc:language>
|
<dc:language>{$info->language}</dc:language>
|
||||||
<dc:date>{$info->date}</dc:date>
|
<dc:date>{$info->dateDT}</dc:date>
|
||||||
<!--@if($info->feed_copyright)-->
|
<!--@if($info->feed_copyright)-->
|
||||||
<dc:rights>{$info->feed_copyright}</dc:rights>
|
<dc:rights>{$info->feed_copyright}</dc:rights>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<item loop="$document_list=>$oDocument" rdf:about="{$oDocument->getPermanentUrl()}">
|
<item loop="$document_list=>$oDocument" rdf:about="{$oDocument->getPermanentUrl()}">
|
||||||
<title>{$oDocument->getTitleText()}</title>
|
<title>{$oDocument->getTitleText()}</title>
|
||||||
<link>{$oDocument->getPermanentUrl()}</link>
|
<link>{$oDocument->getPermanentUrl()}</link>
|
||||||
<description>{$oDocument->getSummary(400)}</description>
|
<description>{$oDocument->getSummary(400)|escape}</description>
|
||||||
<dc:creator>{$oDocument->getNickName()}</dc:creator>
|
<dc:creator>{$oDocument->getNickName()}</dc:creator>
|
||||||
<dc:date>{$oDocument->getRegdateDT()}</dc:date>
|
<dc:date>{$oDocument->getRegdateDT()}</dc:date>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
{'<?xml version="1.0" encoding="UTF-8" ?>'}
|
{'<?xml version="1.0" encoding="UTF-8" ?>'}
|
||||||
|
|
||||||
<config autoescape="on" />
|
<config autoescape="on" />
|
||||||
<rss version="2.0">
|
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
|
||||||
<channel>
|
<channel>
|
||||||
<title>{$info->title}</title>
|
<title>{$info->title}</title>
|
||||||
<link>{$info->link}</link>
|
<link>{$info->link}</link>
|
||||||
<description>{$info->description}</description>
|
<description>{$info->description}</description>
|
||||||
|
<atom:link href="{$info->id}" rel="self" type="application/rss+xml" />
|
||||||
<language>{$info->language}</language>
|
<language>{$info->language}</language>
|
||||||
<pubDate>{$info->date}</pubDate>
|
<pubDate>{$info->dateGM}</pubDate>
|
||||||
<generator>Rhymix</generator>
|
<generator>Rhymix</generator>
|
||||||
<copyright cond="$info->feed_copyright">{$info->feed_copyright}</copyright>
|
<copyright cond="$info->feed_copyright">{$info->feed_copyright}</copyright>
|
||||||
<image cond="$info->image">
|
<image cond="$info->image">
|
||||||
|
|
@ -21,15 +22,15 @@
|
||||||
<!--@if($target_modules[$oDocument->get('module_srl')]->open_rss == 'Y')-->
|
<!--@if($target_modules[$oDocument->get('module_srl')]->open_rss == 'Y')-->
|
||||||
<description>{utf8_trim(utf8_normalize_spaces($oDocument->get('content')))|escape}</description>
|
<description>{utf8_trim(utf8_normalize_spaces($oDocument->get('content')))|escape}</description>
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
<description>{$oDocument->getSummary(400)}</description>
|
<description>{$oDocument->getSummary(400)|escape}</description>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<category cond="$oDocument->getModuleName()">{$oDocument->getModuleName()}</category>
|
<category cond="$oDocument->getModuleName()">{$oDocument->getModuleName()}</category>
|
||||||
<category cond="$oDocument->get('category_srl') && $category_name = $category_list[$oDocument->get('module_srl')][$oDocument->get('category_srl')]->title">{$category_name}</category>
|
<category cond="$oDocument->get('category_srl') && $category_name = $category_list[$oDocument->get('module_srl')][$oDocument->get('category_srl')]->title">{$category_name}</category>
|
||||||
<category loop="$oDocument->get('tag_list')=>$tag">{$tag}</category>
|
<category loop="$oDocument->get('tag_list')=>$tag">{$tag}</category>
|
||||||
<author>{$oDocument->getNickName()}</author>
|
<dc:creator>{$oDocument->getNickName()}</dc:creator>
|
||||||
<guid isPermaLink="true">{$oDocument->getPermanentUrl()}</guid>
|
<guid isPermaLink="true">{$oDocument->getPermanentUrl()}</guid>
|
||||||
<comments cond="$oDocument->allowComment()">{$oDocument->getPermanentUrl()}#comment</comments>
|
<comments cond="$oDocument->allowComment()">{$oDocument->getPermanentUrl()}#comment</comments>
|
||||||
<pubDate>{$oDocument->getRegdateDT()}</pubDate>
|
<pubDate>{$oDocument->getRegdateGM()}</pubDate>
|
||||||
</item>
|
</item>
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<link>{$info->link}</link>
|
<link>{$info->link}</link>
|
||||||
<description>{$info->description}</description>
|
<description>{$info->description}</description>
|
||||||
<language>{$info->language}</language>
|
<language>{$info->language}</language>
|
||||||
<pubDate>{$info->date}</pubDate>
|
<pubDate>{$info->dateGM}</pubDate>
|
||||||
<totalCount>{$info->total_count}</totalCount>
|
<totalCount>{$info->total_count}</totalCount>
|
||||||
<totalPage>{$info->total_page}</totalPage>
|
<totalPage>{$info->total_page}</totalPage>
|
||||||
<item loop="$document_list=>$oDocument">
|
<item loop="$document_list=>$oDocument">
|
||||||
|
|
@ -17,13 +17,13 @@
|
||||||
<!--@if($target_modules[$oDocument->get('module_srl')]->open_rss == 'Y')-->
|
<!--@if($target_modules[$oDocument->get('module_srl')]->open_rss == 'Y')-->
|
||||||
<description>{utf8_trim(utf8_normalize_spaces($oDocument->get('content')))|escape}</description>
|
<description>{utf8_trim(utf8_normalize_spaces($oDocument->get('content')))|escape}</description>
|
||||||
<!--@else-->
|
<!--@else-->
|
||||||
<description>{$oDocument->getSummary(400)}</description>
|
<description>{$oDocument->getSummary(400)|escape}</description>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
<tags>{$oDocument->get('tags')}</tags>
|
<tags>{$oDocument->get('tags')}</tags>
|
||||||
<comment_count>{$oDocument->getCommentCount()}</comment_count>
|
<comment_count>{$oDocument->getCommentCount()}</comment_count>
|
||||||
<trackback_count>{$oDocument->getTrackbackCount()}</trackback_count>
|
<trackback_count>{$oDocument->getTrackbackCount()}</trackback_count>
|
||||||
<pubDate>{$oDocument->getRegdateDT()}</pubDate>
|
<pubDate>{$oDocument->getRegdateGM()}</pubDate>
|
||||||
<upDate>{$oDocument->getUpdateDT()}</upDate>
|
<upDate>{$oDocument->getUpdateGM()}</upDate>
|
||||||
</item>
|
</item>
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue