Neatening up the RSS Feed Page
I was setting up my new wiki and when I passworded it, I noticed that on the RSS feed page (the Feeds link above) it still had 2 bullets, but only one of them had anything next to it (in Internet Explorer), so I opened it up in Firefox to see what was going on. Behold, Firefox only showed one bullet. So I did some snooping and figured out the reason was that when the wiki is passworded, you can’t have full header RSS feeds. Well, that made sense, so I decided to clean up the template for this case (especially in Internet Explorer). It’s an easy hack if you’re running passworded pages. Note that if you don’t care if full pages are sent via your RSS feed, you’ll have to dig deeper into the code to enable that.
<% @title = "Feeds" %>
<p>You can subscribe to this wiki by RSS and get either just the headlines of the pages that change or the entire page (unless the site is password protected).</p>
<ul id="feedsList">
<% if @rss_with_content_allowed %>
<li>
<%= link_to 'Full content (RSS 2.0)', :web => @web.address, :action => :rss_with_content %>
</li>
<% end %>
<li>
<%= link_to 'Headlines (RSS 2.0)', :web => @web.address, :action => :rss_with_headlines %>
</li>
</ul>The changes are simple, add ” (unless the site is password protected)” at the end of the text line and move the if statement “if rss_with_content_allowed” so that it’s around the <li> and </li> statements so that a bullet doesn’t show up if you’re passworded.