Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#61 2012-07-09 15:50:46
- spyke584
- New Member
- Registered: 2012-07-01
- Posts: 2
Re: [plugin] [ORPHAN] ajw_comments_feed
yes, but this is 0.5 version and i want latest version (0.6)
Offline
#62 2012-09-09 13:22:56
- quicknquiet
- Member
- From: Moscow
- Registered: 2012-07-02
- Posts: 11
Re: [plugin] [ORPHAN] ajw_comments_feed
Anybody has the code?
Offline
Re: [plugin] [ORPHAN] ajw_comments_feed
Maybe that’s what you’re looking for:
# ajw_comments_feed v0.6 # Extends RSS & Atom to allow for comments feeds. # http://compooter.org/ # ...................................................................... # This is a plugin for Textpattern - http://textpattern.com/ # To install: textpattern > admin > plugins # Paste the following text into the 'Install plugin' box: # ...................................................................... YToxMTp7czo0OiJuYW1lIjtzOjE3OiJhandfY29tbWVudHNfZmVlZCI7czo3OiJ2ZXJzaW9u IjtzOjM6IjAuNiI7czo2OiJhdXRob3IiO3M6MTE6IkFuZHJldyBXYWVyIjtzOjEwOiJhdXRo b3JfdXJpIjtzOjIxOiJodHRwOi8vY29tcG9vdGVyLm9yZy8iO3M6MTE6ImRlc2NyaXB0aW9u IjtzOjQ3OiJFeHRlbmRzIFJTUyAmIEF0b20gdG8gYWxsb3cgZm9yIGNvbW1lbnRzIGZlZWRz LiI7czo0OiJ0eXBlIjtpOjA7czo0OiJoZWxwIjtzOjE0NDQ6Igk8aDI+U3VtbWFyeTwvaDI+ Cgk8cD5FeHRlbmRzIFJTUyAmIzM4OyBBdG9tIGZ1bmN0aW9uYWxpdHkgdG8gYWxsb3cgZm9y IHNpdGV3aWRlLCBwZXItc2VjdGlvbiwgcGVyLWNhdGVnb3J5LCBvciBwZXItYXJ0aWNsZSBj b21tZW50cyBmZWVkcy4gIEl0IHdvcmtzIGV4YWN0bHkgbGlrZSBub3JtYWwgZmVlZCB1cmxz LCBidXQgbGlzdGVucyBmb3IgPGNvZGU+JyYjMzg7YXJlYT1jb21tZW50cyc8L2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6Ly93d3cudzMub3JnLzIwMDUvQXRvbSI+Jy5qb2luKG4sJG91dCkuJzwvZmVlZD4nOw0KCX0NCg0KIjtzOjQ6InR5cGUiO3M6MToiMCI7czozOiJtZDUiO3M6MzI6ImVlYzJlODY3YzA0MGUzOTg0NmNhODMzMzYyZjliOTE4Ijt9
Perhaps you’ll need this one too: http://textpattern.net/wiki/images/Ajw_clean_feed-0.2.txt
Last edited by Pat64 (2012-09-09 16:05:56)
Patrick.
Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.
Offline
#64 2013-11-23 13:28:22
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: [plugin] [ORPHAN] ajw_comments_feed
Before including a comment feed in the quote for our client: Does this plugin work with a 4.5 version of TXP?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#65 2013-11-25 15:01:50
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: [plugin] [ORPHAN] ajw_comments_feed
Can anyone confirm this is still functional, please?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [plugin] [ORPHAN] ajw_comments_feed
Hi Uli,
no idea if it works, but you can easily create the feed with the following rah_external_output
snippet, accessible at ?rah_external_output=your_comments_rss
:
; Content-type: text/xml
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<generator>http://textpattern.com/</generator>
<title><txp:site_name /></title>
<description><txp:site_name /> - comments</description>
<link><txp:site_url /></link>
<atom:link href="<txp:site_url />?rah_external_output=your_comments_rss" rel="self" type="application/rss+xml" />
<pubDate><txp:php>echo safe_strftime('rfc822', get_lastmod());</txp:php></pubDate>
<txp:recent_comments break="item">
<title>Comment on <txp:title no_widow="0" /> by <txp:comment_name link="0" /></title>
<link><txp:comment_permlink /></link>
<guid><txp:comment_permlink /></guid>
<pubDate><txp:comment_time format="rfc822" /></pubDate>
<description><![CDATA[<txp:comment_message />]]></description>
<content:encoded><![CDATA[<txp:comment_message />]]></content:encoded>
<dc:creator><txp:comment_name /></dc:creator>
</txp:recent_comments>
</channel>
</rss>
Offline
#67 2013-11-25 16:50:34
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: [plugin] [ORPHAN] ajw_comments_feed
Thanks, Oleg, nice! :)
For changing the home base of such a feed link, e.g. for subscribing to articles or categories, the crucial points will be these two lines:
<link><txp:site_url /></link>
<atom:link href="<txp:site_url />?rah_external_output=your_comments_rss" rel="self" type="application/rss+xml" />
The rest could remain, I guess?
[Edit: typo]
Last edited by uli (2013-11-25 16:51:05)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [plugin] [ORPHAN] ajw_comments_feed
uli wrote:
For changing the home base of such a feed link, e.g. for subscribing to articles or categories, the crucial points will be these two lines: … The rest could remain, I guess?
No idea, I have done it few years ago and forgot about it, maybe it’s nonsense nowadays… go for some trial and error? :)
You can also add the following link to <head>
:
<link rel="alternate" type="application/rss+xml" title="Comments" href='<txp:site_url />?rah_external_output=your_comments_rss' />
Offline
#69 2013-11-26 20:32:39
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: [plugin] [ORPHAN] ajw_comments_feed
etc wrote:
You can also add the following link to <head>
Thanks, something seemed incomplete, but I couldn’t check.
go for some trial and error? :)
That’s what I usually do. And I will do once we have the job.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: [plugin] [ORPHAN] ajw_comments_feed
Apologies for resurrecting this old thread …
etc wrote #276924:
… but you can easily create the feed with the following
rah_external_output
snippet, accessible at?rah_external_output=your_comments_rss
:
; Content-type: text/xml...
The above code is a general rss feed for recent comments to an entire site.
If I want to provide a comments feed for a specific article – which is what the original plugin did, I believe – am I right in assuming I could do something like this:
1. Replace txp:recent_comments
in the above with txp:comments
and wrap the entire code block in txp:article
.
2. Adjust <atom:link href="<txp:permlink />?feed=rss" rel="self" type="application/rss+xml" />
.
3. Adjust pubDate
entry as the last_mod will be the comment time of the newest comment of that article, not of the entire site? Perhaps:
<txp:comments sort="posted desc" limit="1"><txp:comment_time format="rfc822" /></txp:comments>
4. Add a detection mechanism for the url variable in my page template for an article. Perhaps:
<txp:evaluate query='<txp:page_url type="feed" /> = "rss"'>
<txp:output_form form="article_comment_feed" />
<txp:else />
... regular page template ...
</txp:evaluate>
(BTW: Have I got the syntax of txp:evaluate correct or does page_url also have to be in quotes? Or is that done better with variable / if_variable
?)
And then in the form article_comment_feed
, put the entire code block above with the modifications, starting with:
<txp:header value="text_xml" />
Will that use txp:header
work at all? i.e. can processing of the urlvar begin before the page header is set?
5. Reference the feed via a link in my article to <txp:permlink />?feed=rss
.
Or is there perhaps a better way altogether? Thanks for any feedback!
TXP Builders – finely-crafted code, design and txp
Offline
Re: [plugin] [ORPHAN] ajw_comments_feed
jakob wrote #319847:
<txp:evaluate query='<txp:page_url type="feed" /> = "rss"'>...
(BTW: Have I got the syntax of txp:evaluate correct or does page_url also have to be in quotes? Or is that done better with
variable / if_variable
?)
You have to enclose it in quotes, either directly or via escape="quote"
attribute.
And then in the form
article_comment_feed
, put the entire code block above with the modifications, starting with:
<txp:header value="text_xml" />...
Will that use
txp:header
work at all? i.e. can processing of the urlvar begin before the page header is set?
It would work if the parser had a chance to get there. But, afair, feed
requests are handled by atom.php / rss.php
scripts. Not sure they parse any page by default, you have to use a callback.
Offline
Re: [plugin] [ORPHAN] ajw_comments_feed
etc wrote #319851:
You have to enclose it in quotes, either directly or via
escape="quote"
attribute.It would work if the parser had a chance to get there. But, afair,
feed
requests are handled byatom.php / rss.php
scripts. Not sure they parse any page by default, you have to use a callback.
Had to read that a few times but I think I have it: I made an unfortunate choice by proposing feed
as the url parameter when that’s already used by txp itself.
I think I have it working now with a different url parameter as follows:
A misc form called article_comment_feed
:
<txp:header value="text_xml" /><txp:article escape="trim">
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<generator>http://textpattern.com/</generator>
<title><txp:site_name /> – <txp:title no_widow="0" /></title>
<description><txp:title no_widow="0" /> - comments</description>
<link><txp:permlink /></link>
<atom:link href="<txp:permlink />?comment-feed=rss" rel="self" type="application/rss+xml" />
<pubDate><txp:comments break="" sort="posted desc" limit="1" escape="trim"><txp:comment_time format="rfc822" /></txp:comments></pubDate>
<txp:comments break="item">
<title>Comment on <txp:title no_widow="0" /> by <txp:comment_name link="0" /></title>
<link><txp:comment_permlink /></link>
<guid><txp:comment_permlink /></guid>
<pubDate><txp:comment_time format="rfc822" /></pubDate>
<description><![CDATA[<txp:comment_message />]]></description>
<content:encoded><![CDATA[<txp:comment_message />]]></content:encoded>
<dc:creator><txp:comment_name /></dc:creator>
</txp:comments>
</channel>
</rss>
</txp:article>
and then this in my page template:
<txp:evaluate query='<txp:page_url type="comment-feed" escape="quote" /> = "rss"'>
<txp:output_form form="article_comment_feed" />
<txp:else />
... the regular page template ...
</txp:evaluate>
(It seems that both escape="quote"
like above or <txp:evaluate query='"<txp:page_url type="comment-feed" />" = "rss"'>
both work. I was expecting the latter to cause it to stumble over the double quotes in the double quotes in the single quotes.)
And then in the article form:
<a href="<txp:permlink />?comment-feed=rss">Comment feed for this article</a>
to link to the feed.
Can that be improved on, especially the evaluate around the page template?
TXP Builders – finely-crafted code, design and txp
Offline