mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
parent
22b16ecc73
commit
b667808d95
6 changed files with 27 additions and 19 deletions
|
|
@ -47,6 +47,7 @@ class rssView extends rss
|
|||
$obj = new stdClass;
|
||||
}
|
||||
|
||||
$act = Context::get('act');
|
||||
$page = $obj->page ?: Context::get('page');
|
||||
$start = $obj->start_date ?: Context::get('start_date');
|
||||
$end = $obj->end_date ?: Context::get('end_date');
|
||||
|
|
@ -71,7 +72,6 @@ class rssView extends rss
|
|||
break;
|
||||
// RSS 2.0 (default)
|
||||
default:
|
||||
$format = '';
|
||||
$template = 'rss20';
|
||||
break;
|
||||
}
|
||||
|
|
@ -81,6 +81,12 @@ class rssView extends rss
|
|||
$module_config = $oRssModel->getRssModuleConfig($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)
|
||||
{
|
||||
Context::set('target_modules', array());
|
||||
|
|
@ -167,13 +173,14 @@ class rssView extends rss
|
|||
$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->feed_title = $config->feed_title;
|
||||
$info->description = $obj->description ?: $info->description;
|
||||
$info->language = Context::getLangType();
|
||||
$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 : '';
|
||||
getController('module')->replaceDefinedLangCode($info->title);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
<subtitle cond="$info->description">{$info->description}</subtitle>
|
||||
<link rel="alternate" type="text/html" hreflang="{$info->language}" href="{$info->link}"/>
|
||||
<link rel="self" type="application/atom+xml" href="{$info->id}"/>
|
||||
<updated>{$info->date}</updated>
|
||||
<updated>{$info->dateDT}</updated>
|
||||
<id>{$info->id}</id>
|
||||
<generator>Rhymix</generator>
|
||||
<rights cond="$info->feed_copyright">{$info->feed_copyright}</rights>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<link>{$info->link}</link>
|
||||
<description>{$info->description}</description>
|
||||
<dc:language>{$info->language}</dc:language>
|
||||
<dc:date>{$info->date}</dc:date>
|
||||
<dc:date>{$info->dateDT}</dc:date>
|
||||
<!--@if($info->feed_copyright)-->
|
||||
<dc:rights>{$info->feed_copyright}</dc:rights>
|
||||
<!--@end-->
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
<item loop="$document_list=>$oDocument" rdf:about="{$oDocument->getPermanentUrl()}">
|
||||
<title>{$oDocument->getTitleText()}</title>
|
||||
<link>{$oDocument->getPermanentUrl()}</link>
|
||||
<description>{$oDocument->getSummary(400)}</description>
|
||||
<description>{$oDocument->getSummary(400)|escape}</description>
|
||||
<dc:creator>{$oDocument->getNickName()}</dc:creator>
|
||||
<dc:date>{$oDocument->getRegdateDT()}</dc:date>
|
||||
</item>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,14 @@
|
|||
{'<?xml version="1.0" encoding="UTF-8" ?>'}
|
||||
|
||||
<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>
|
||||
<title>{$info->title}</title>
|
||||
<link>{$info->link}</link>
|
||||
<description>{$info->description}</description>
|
||||
<atom:link href="{$info->id}" rel="self" type="application/rss+xml" />
|
||||
<language>{$info->language}</language>
|
||||
<pubDate>{$info->date}</pubDate>
|
||||
<pubDate>{$info->dateGM}</pubDate>
|
||||
<generator>Rhymix</generator>
|
||||
<copyright cond="$info->feed_copyright">{$info->feed_copyright}</copyright>
|
||||
<image cond="$info->image">
|
||||
|
|
@ -21,15 +22,15 @@
|
|||
<!--@if($target_modules[$oDocument->get('module_srl')]->open_rss == 'Y')-->
|
||||
<description>{utf8_trim(utf8_normalize_spaces($oDocument->get('content')))|escape}</description>
|
||||
<!--@else-->
|
||||
<description>{$oDocument->getSummary(400)}</description>
|
||||
<description>{$oDocument->getSummary(400)|escape}</description>
|
||||
<!--@end-->
|
||||
<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 loop="$oDocument->get('tag_list')=>$tag">{$tag}</category>
|
||||
<author>{$oDocument->getNickName()}</author>
|
||||
<dc:creator>{$oDocument->getNickName()}</dc:creator>
|
||||
<guid isPermaLink="true">{$oDocument->getPermanentUrl()}</guid>
|
||||
<comments cond="$oDocument->allowComment()">{$oDocument->getPermanentUrl()}#comment</comments>
|
||||
<pubDate>{$oDocument->getRegdateDT()}</pubDate>
|
||||
<pubDate>{$oDocument->getRegdateGM()}</pubDate>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<link>{$info->link}</link>
|
||||
<description>{$info->description}</description>
|
||||
<language>{$info->language}</language>
|
||||
<pubDate>{$info->date}</pubDate>
|
||||
<pubDate>{$info->dateGM}</pubDate>
|
||||
<totalCount>{$info->total_count}</totalCount>
|
||||
<totalPage>{$info->total_page}</totalPage>
|
||||
<item loop="$document_list=>$oDocument">
|
||||
|
|
@ -17,13 +17,13 @@
|
|||
<!--@if($target_modules[$oDocument->get('module_srl')]->open_rss == 'Y')-->
|
||||
<description>{utf8_trim(utf8_normalize_spaces($oDocument->get('content')))|escape}</description>
|
||||
<!--@else-->
|
||||
<description>{$oDocument->getSummary(400)}</description>
|
||||
<description>{$oDocument->getSummary(400)|escape}</description>
|
||||
<!--@end-->
|
||||
<tags>{$oDocument->get('tags')}</tags>
|
||||
<comment_count>{$oDocument->getCommentCount()}</comment_count>
|
||||
<trackback_count>{$oDocument->getTrackbackCount()}</trackback_count>
|
||||
<pubDate>{$oDocument->getRegdateDT()}</pubDate>
|
||||
<upDate>{$oDocument->getUpdateDT()}</upDate>
|
||||
<pubDate>{$oDocument->getRegdateGM()}</pubDate>
|
||||
<upDate>{$oDocument->getUpdateGM()}</upDate>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue