implemented RSS feeds for topics (and days) by simply wrapping the site.rss_action
This commit is contained in:
parent
518a568053
commit
c1952c0138
2 changed files with 21 additions and 5 deletions
|
@ -147,10 +147,16 @@ function rss_action() {
|
|||
var sdf = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
sdf.setTimeZone(new java.util.SimpleTimeZone(0, "UTC"));
|
||||
|
||||
var collection = this.allstories;
|
||||
if (req.data.show == "all")
|
||||
collection = this.allcontent;
|
||||
var size = collection.size();
|
||||
if (req.data.show == "all") {
|
||||
var collection = this.allcontent;
|
||||
} else if (req.data.show == "day") {
|
||||
var collection = this.get(req.data.day);
|
||||
} else if (req.data.show == "topic") {
|
||||
var collection = this.topics.get(req.data.topic);
|
||||
} else {
|
||||
var collection = this.allstories;
|
||||
}
|
||||
var size = (collection != null) ? collection.size() : 0;
|
||||
var max = req.data.max ? parseInt(req.data.max) : 7;
|
||||
max = Math.min(max, size);
|
||||
max = Math.min(max, 10);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue