Skip to content

Commit

Permalink
Merge pull request timothystone#6 from timothystone/itunes-rss-flavor
Browse files Browse the repository at this point in the history
Itunes rss flavor
  • Loading branch information
timothystone authored Sep 25, 2016
2 parents cc4b826 + 96d77ee commit 704c64a
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,55 +58,58 @@
}

</style>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/animation/animation-min.js"></script>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/element/element-min.js"></script>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/utilities/utilities.js"></script>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/button/button-min.js"></script>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/container/container-min.js"></script>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/cookie/cookie-min.js"></script>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/menu/menu-min.js"></script>
<script type="text/javascript" src="#BlogBaseAdminURL()/administration/javascript/yui/editor/editor-min.js"></script>
<script type="text/javascript">
var Y = YAHOO, E = YAHOO.util.Event, Dom = YAHOO.util.Dom, Button = YAHOO.widget.Button;
Y.namespace("blojsom");

E.onContentReady("entry-options", function() {
var pingBlogURLsCheckbox = new Button("ping-blog-urls", {label:"#adminResource('blog.entry.pingURLs.text' 'Ping blog notification URLs?')"});
var sendPingbacksCheckbox = new Button("send-pingbacks", {label:"#adminResource('blog.entry.send.pingbacks.text' 'Send pingbacks to URLs?')"});
var disableComments = new Button("blog-entry-comments-disabled", {label:"#adminResource('blog.disable.comments.text' 'Disable comments?')"});
var disableTrackbacks = new Button("blog-entry-trackbacks-disabled", {label:"#adminResource('blog.disable.trackbacks.text' 'Disable trackbacks?')"});
var disablePingbacks = new Button("blog-entry-pingbacks-disabled", {label:"#adminResource('blog.disable.pingbacks.text' 'Disable pingbacks?')"});
#if($!params.action.get(0) != "new-blog-entry")
#if (!$!BLOJSOM_PLUGIN_EDIT_BLOG_ENTRIES_ENTRY.allowsComments())
disableComments.set("checked", true, true);
#end
#if (!$!BLOJSOM_PLUGIN_EDIT_BLOG_ENTRIES_ENTRY.allowsTrackbacks())
disableTrackbacks.set("checked", true, true);
#end
#if (!$!BLOJSOM_PLUGIN_EDIT_BLOG_ENTRIES_ENTRY.allowsPingbacks())
disablePingbacks.set("checked", true, true);
#end
#end
});

Y.blojsom.init = function() {
var navmenu = new Y.widget.MenuBar("navmenu", { autosubmenudisplay: true, shadow:false });
navmenu.render();

var login = new Button("submit-login");
var editEntriesInCategory = new Button("editEntriesInCategory");
var addEntryToCategory = new Button("addEntryToCategory");

var entryEditor = new YAHOO.widget.Editor('blog-entry-description', {
height: '300px',
width: '522px',
dompath: true,
animate: true,
handleSubmit: true
<script type="text/javascript">
(function(Y) {
var E = Y.util.Event,
Dom = Y.util.Dom,
Button = Y.widget.Button;

Y.namespace("blojsom");

E.onContentReady("entry-options", function() {
var pingBlogURLsCheckbox = new Button("ping-blog-urls", {label:"#adminResource('blog.entry.pingURLs.text' 'Ping blog notification URLs?')"});
var sendPingbacksCheckbox = new Button("send-pingbacks", {label:"#adminResource('blog.entry.send.pingbacks.text' 'Send pingbacks to URLs?')"});
var disableComments = new Button("blog-entry-comments-disabled", {label:"#adminResource('blog.disable.comments.text' 'Disable comments?')"});
var disableTrackbacks = new Button("blog-entry-trackbacks-disabled", {label:"#adminResource('blog.disable.trackbacks.text' 'Disable trackbacks?')"});
var disablePingbacks = new Button("blog-entry-pingbacks-disabled", {label:"#adminResource('blog.disable.pingbacks.text' 'Disable pingbacks?')"});
#if($!params.action.get(0) != "new-blog-entry")
#if (!$!BLOJSOM_PLUGIN_EDIT_BLOG_ENTRIES_ENTRY.allowsComments())
disableComments.set("checked", true, true);
#end
#if (!$!BLOJSOM_PLUGIN_EDIT_BLOG_ENTRIES_ENTRY.allowsTrackbacks())
disableTrackbacks.set("checked", true, true);
#end
#if (!$!BLOJSOM_PLUGIN_EDIT_BLOG_ENTRIES_ENTRY.allowsPingbacks())
disablePingbacks.set("checked", true, true);
#end
#end
});
entryEditor.render();
};
E.onDOMReady(Y.blojsom.init);

Y.blojsom.init = function() {
var navmenu = new Y.widget.MenuBar("navmenu", { autosubmenudisplay: true, shadow:false });
navmenu.render();

var login = new Button("submit-login");
var editEntriesInCategory = new Button("editEntriesInCategory");
var addEntryToCategory = new Button("addEntryToCategory");

var entryEditor = new YAHOO.widget.Editor('blog-entry-description', {
height: '300px',
width: '522px',
dompath: true,
animate: true,
ptags: true,
handleSubmit: true
});
entryEditor.render();
};
E.onDOMReady(Y.blojsom.init);
})(YAHOO);

</script>
</head>
60 changes: 60 additions & 0 deletions blojsom/src/main/resources/templates/irss2.vm
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" >
<channel>
<title>#EscapedBlogName()</title>
<itunes:subtitle>#EscapedBlogDescription()</itunes:subtitle>
<itunes:summary></itunes:summary>
<itunes:author></itunes:author>
<itunes:complete>false</itunes:complete>
<link>#BlogURL()</link>
<description>#EscapedBlogDescription()</description>
<language>#BlogLanguage()</language>
<copyright>&#x2117; &amp; &#xA9; #EscapedBlogName()</copyright>
<image>
<url>#BlogBaseURL()/favicon.ico</url>
<title>#EscapedBlogName()</title>
<link>#BlogURL()</link>
</image>
<itunes:category text="">
<itunes:category text=""/>
</itunes:category>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>$BLOJSOM_VERSION</generator>
<managingEditor>#BlogOwnerEmail()</managingEditor>
<webMaster>#BlogOwnerEmail()</webMaster>
<itunes:owner>
<itunes:name>#BlogOwnerEmail()</itunes:name>
<itunes:email>#BlogOwnerEmail()</itunes:email>
</itunes:owner>
<itunes:explicit>explicit</itunes:explicit>

<itunes:image href="#BlogBaseURL()/rss/podcast_art.png"/>
<pubDate>$BLOJSOM_DATE</pubDate>

#foreach ($entry in $BLOJSOM_ENTRIES)
#SimpleFriendlyPermalink($entry)
<item>
<title>$entry.getEscapedTitle()</title>
<itunes:subtitle></itunes:subtitle>
<link>$entryLink</link>
<description>$entry.getEscapedDescription()</description>
<itunes:summary>$entry.getEscapedDescription()</itunes:summary>
<guid>$entryLink</guid>
<pubDate>$entry.getRFC822Date()</pubDate>
<category>$entry.getEncodedCategory()</category>
<itunes:block>No</itunes:block>
<itunes:duration></itunes:duration>
<itunes:isClosedCaptioned></itunes:isClosedCaptioned>
<itunes:order>$entry.getRFC822Date()</itunes:order>

#if ($entry.allowsComments())
#XMLRPCLink($entry 'commentapi')
<wfw:comment>$xmlrpcLink</wfw:comment>
<wfw:commentRss>$entryLink?page=comments&amp;flavor=rss2</wfw:commentRss>
#end
#RSSEnclosure($entry)
</item>
#end
</channel>
</rss>

0 comments on commit 704c64a

Please sign in to comment.