Textpattern Plugin : ajw_clean_feed

15 November 2005 @ evening time | Comments (8)

Plugin Details

Download:
ajw_clean_feed
Version:
0.2
Forum:
Read discussion
Status on this site:
Active

Please use forum for all bug reports and questions

Summary

This plugin extends Textpattern’s default Atom & RSS functionality to allow for /clean/feed/urls. Included with this plugin is the template tag ajw_clean_feed_link (detailed below), which is used for displaying feed links in your page templates.

Setup

All that needs to be done to enable clean feed urls on your site is install & activate this plugin. RSS and Atom should then be accessible at any /clean/rss/ or /clean/atom/ url.

Example URLs

  • Articles
    • http://example.com/rss/ (default)
    • http://example.com/foo/rss/ (articles in section ‘foo’)
    • http://example.com/category/bar/rss/ (articles under category ‘bar’)
  • Links
    • http://example.com/link/rss/ (links feed)
    • http://example.com/link/foo/rss/ (links feed for links category ‘foo’)
  • Comments 1
    • http://example.com/comments/rss/ (sitewide comments)
    • http://example.com/yyyy/mm/dd/url-title/rss/ (article comments)
    • http://example.com/section/id/url-title/rss/ (article comments)

1 Requires ajw_comments_feed. URL will depend on your permlink mode.

Template tag: ajw_clean_feed_link

Now that you have clean feeds working, you will need to use the template tag ajw_clean_feed_link in order to output links to sitewide, per-section, per-category, comments, or links feeds. This template tag works identically to feed_link and link_feed_link, with a few additional attribute options:

Standard attributes:

  • flavor
  • label
  • title
  • wraptag
  • category
  • section

Non-standard attributes:

  • sitewide
    • (y|n) Setting this to ‘y’ will always output a “sitewide” feed link in the format http://example.com/rss/ or http://example.com/atom/, regardless of the context of the template tag.
  • area
    • Using area="link" will output a clean feed link to your site’s links log
    • Using area="comments" will output a link to a comments feed, either sitewide (see above attribute) or per-article.
  • url_only
    • (y|n) Setting this to ‘y’ will output only the feed url, for use in autodiscovery <link> tags in the head of your webpage.

Revision History

  • v0.2
    • Fixed sitewide comments feed & feed link
    • Added default feed link text

8 comments

1

Fantastic, Andrew. Thanks very much.

Destry → wion.com
2

Hi Andrew,

in February, you posted a forum entry about a bug resulting in ajw_clean_feed_link listing sitewide articles even if the attribute “sitewide” is set to “n”.

I experience this myself after having installed the plugin yesterday.

Is there a fix available?

Best regards,

Jochen
Geewiz → blog.jochen-lillich.de
3

Andrew, plugin generates feed links only like: site.com/rss/ regardless of section or category (or sitewide attribute too) we currently surfing in (normally should be site.com/section/rss/)

mercury
4

This plugin doesn’t work for me. I installed and activated it and when I go to mysite/rss/ i get an error 404 page. You can see it here: http://avarice.oneeightseven.org/rss/
Any ideas?

John → avarice.oneeightseven.org
5

What version of Textpattern are you using? (Please forward communication to the associated forum thread)

Andrew → compooter.org
6

Wait… all the links on your site are broken. Looks like you have mod_rewrite problems. Perhaps the mod_rewrite extension is not enabled or AllowOverride is set to ‘off’ (it should be ‘on’ to allow for .htaccess control).

Andrew → compooter.org
7

I found out that it was a mod_rewrite issue. We just moved the server from FreeBSD to Gentoo and they handle Apache configuration differently. Plugin works perfectly.

John → avarice.oneeightseven.org
8

Fantastic plugin, Andrew. Great job!

Eric F → walkableneighborhoods.com

Comments are closed for this article.

Previously