Commit 9ffd6c26 authored by Dave Cridland's avatar Dave Cridland Committed by GitHub

Merge pull request #640 from wrooot/master

OF-1182 remove Release News, expand Blog
parents bd4d07bc 3836c3c0
...@@ -69,9 +69,7 @@ ...@@ -69,9 +69,7 @@
<%! long lastRSSFetch = 0; <%! long lastRSSFetch = 0;
SyndFeed lastBlogFeed = null; SyndFeed lastBlogFeed = null;
SyndFeed lastReleaseFeed = null;
String blogFeedRSS = "https://community.igniterealtime.org/blogs/ignite/feeds/posts"; String blogFeedRSS = "https://community.igniterealtime.org/blogs/ignite/feeds/posts";
String releaseFeedRSS = "https://community.igniterealtime.org/community/feeds/messages?community=2017";
%> %>
<% // Get parameters // <% // Get parameters //
...@@ -375,14 +373,13 @@ ...@@ -375,14 +373,13 @@
<a href="<%= blogFeedRSS %>" class="jive-feed-icon"><img src="images/feed-icon-16x16.gif" alt="" style="border:0;" /></a> <a href="<%= blogFeedRSS %>" class="jive-feed-icon"><img src="images/feed-icon-16x16.gif" alt="" style="border:0;" /></a>
<h4><fmt:message key="index.cs_blog" /></h4> <h4><fmt:message key="index.cs_blog" /></h4>
<% long nowTime = System.currentTimeMillis(); <% long nowTime = System.currentTimeMillis();
if (lastBlogFeed == null || lastReleaseFeed == null || nowTime - lastRSSFetch > 21600000) { if (lastBlogFeed == null || nowTime - lastRSSFetch > 21600000) {
FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance(); FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
FeedFetcher feedFetcher = new HttpClientWithTimeoutFeedFetcher(feedInfoCache); FeedFetcher feedFetcher = new HttpClientWithTimeoutFeedFetcher(feedInfoCache);
try { try {
lastBlogFeed = feedFetcher.retrieveFeed(new URL(blogFeedRSS)); lastBlogFeed = feedFetcher.retrieveFeed(new URL(blogFeedRSS));
lastReleaseFeed = feedFetcher.retrieveFeed(new URL(releaseFeedRSS));
lastRSSFetch = nowTime; lastRSSFetch = nowTime;
} }
...@@ -395,7 +392,7 @@ ...@@ -395,7 +392,7 @@
if (lastBlogFeed != null && !lastBlogFeed.getEntries().isEmpty()) { if (lastBlogFeed != null && !lastBlogFeed.getEntries().isEmpty()) {
List entries = lastBlogFeed.getEntries(); List entries = lastBlogFeed.getEntries();
for (int i = 0; i < entries.size() && i < 3; i++) { for (int i = 0; i < entries.size() && i < 7; i++) {
SyndEntry entry = (SyndEntry) entries.get(i); %> SyndEntry entry = (SyndEntry) entries.get(i); %>
<h5><a href="<%= entry.getLink() %>" target="_blank"><%= entry.getTitle()%></a>, <h5><a href="<%= entry.getLink() %>" target="_blank"><%= entry.getTitle()%></a>,
<span class="jive-blog-date"><%= JiveGlobals.formatDate(entry.getPublishedDate())%></span></h5> <span class="jive-blog-date"><%= JiveGlobals.formatDate(entry.getPublishedDate())%></span></h5>
...@@ -405,19 +402,6 @@ ...@@ -405,19 +402,6 @@
<fmt:message key="index.cs_blog.unavailable" /> <fmt:message key="index.cs_blog.unavailable" />
<% } <% }
%><div class="jive-bottom-line"></div><%
if (lastReleaseFeed != null && !lastReleaseFeed.getEntries().isEmpty()) {
List entries = lastReleaseFeed.getEntries();
for (int i = 0; i < entries.size() && i < 3; i++) {
SyndEntry entry = (SyndEntry) entries.get(i); %>
<h5><a href="<%= entry.getLink() %>" target="_blank"><%= entry.getTitle()%></a>,
<span class="jive-blog-date"><%= JiveGlobals.formatDate(entry.getPublishedDate())%></span></h5>
<% }
} else { %>
<fmt:message key="index.cs_blog.unavailable" />
<% }
%> %>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment