Textpattern Plugin : ajw_comments_feed
10 November 2005 @ late morning | Comments (4)
Plugin Details
- Download:
- ajw_comments_feed
- Version:
- 0.6
- Forum:
- Read discussion
- Status on this site:
- Active
Please use forum for all bug reports and questions
Summary
This plugin extends Textpattern’s RSS & Atom functionality to allow for sitewide, section, category, or article comments feeds. It works exactly like normal feed urls and utilizes the “area” querystring variable, i.e. area=comments. The usage of other modifiers, such as section=foo or category=bar, is also possible.
Requires Textpattern v4.0.4
Setup
No setup needed. Simply install & activate the plugin and — voila! — comments will be served up from feed urls using area=comments in the querystring. To output a custom link to a comment feed, use the ajw_comment_feed_link template tag.
Template tag: ajw_comments_feed_link
This will be used in your templates or forms in order to output a dynamic link to your comments feed, based on the attributes you give it and what page is being viewed. This is the only template tag you will ever use with this plugin.
The ajw_comments_feed_link template tag will allow you to display a permanent link to your comments feed from within page templates or forms. This tag functions exactly like <txp:feed_link />. Acceptable attributes include: sitewide, wraptag, limit, flavor, label, & title.
The sitewide attribute allows you to use a comments feed link in a template that always refers to a sitewide feed link, rather than article-specific. For instance, sitewide="y" will cause an RSS feed link url to become http://site.tld/?rss=1&area=comments (no id variable).
Usage
Example template tags:
<txp:ajw_comments_feed_link /><txp:ajw_comments_feed_link sitewide="y" /><txp:ajw_comments_feed_link flavor="atom" /><txp:ajw_comments_feed_link limit="25" label="RSS Comments Feed" />
Example comments feed urls:
http://site.tld/?rss=1&area=commentshttp://site.tld/?atom=1&area=commentshttp://site.tld/?rss=1&area=comments&id=123http://site.tld/?rss=1&area=comments§ion=foo
Disclaimer
This plugin utilizes the feed formatting code-base from Textpattern v4.0.3 r1228, thus any problems or bugs that exist in Textpattern’s RSS/Atom output will be contained within this plugin.
If you have a problem or bug relating to Textpattern’s RSS/Atom output that has already been reported in the Textpattern forum, please do not reply to the plugin discussion thread, but rather report it to the development team or lend a hand.
FAQ
- The Atom comments feed gives me a warning during validation. Why?
- This is due to the unpredictable and flexible format of the feed url. Please refer to this Textpattern forum thread for more explanation.
Revision History
- v0.6
- Updated for Textpattern v4.0.4
- v0.5
- Fixed bug with clean comments feeds
- v0.4
- Fixed broken Atom feed when an article has no comments.
- v0.3
- Added
sitewideattribute to signal whether you want ajw_comments_feed_link to always output a sitewide link, rather than an article-specific link.
- Added
- v0.2
- Atom encoding tweak
4 comments