Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-23 17:44:39

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

jnm_feed_custom_item

This plugin let you customize the format of your feeds items.

The “body” of the item is parsed from the “feed_item_body” form. You need to create a form with this name!

Some examples and Ideas

You can use this plugin to:

Include the article image

Use this feed_item_body:

<txp:article_image />
<txp:body/>

Include a custom field after the body:

<txp:body/>
<p>Color: <txp:custom_field name="color"/></p>

Include the article original link (anti splogs)

<txp:body/>
<p>Original article: <txp:permlink><txp:title /></txp:permlink></p>

Info and download

Version: 0.1

History:

  • 0.1: Initial release

Last edited by juanjonavarro (2014-03-25 19:07:15)

Offline

#2 2008-05-27 18:00:42

hurty
Member
Registered: 2004-07-17
Posts: 26

Re: jnm_feed_custom_item

This is a neat plugin, but it doesn’t seem to work for articles that have an excerpt. Articles without an excerpt can be customized and augmented, but articles with an excerpt do not seem to be affected at all by the plugin.

Mark

Offline

#3 2008-05-27 20:54:52

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: jnm_feed_custom_item

Set Syndicate article excerpt in Admin -> Preferences -> Advanced -> Feeds to no and do your own excerpt handling using <txp:if_excerpt /> in the feed_item_body form.

That should make it all play nice.


Shoving is the answer – pusher robot

Offline

#4 2008-05-28 08:21:38

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: jnm_feed_custom_item

Exactly, hakjoon.

Hurtly, just deactivate the textpattern automatic management of excerpts in the feed, and do it manually with this plugin.

Offline

#5 2008-06-26 14:58:54

ricetxp
Member
From: London, UK
Registered: 2005-05-24
Posts: 89
Website

Re: jnm_feed_custom_item

Sorry to ask,
but how exactly do I use this plugin?

Do I need to place <txp:jnm_feed_custom_item /> somewhere?

Offline

#6 2008-06-26 15:03:14

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: jnm_feed_custom_item

ricetxp, this plugin modifies the format of your feed. Install it, create the feed_item_body and that’s all. No tag necessary. Just access your atom or rss feed to see the results.

Last edited by juanjonavarro (2008-06-26 15:04:07)

Offline

#7 2008-06-26 15:20:51

ricetxp
Member
From: London, UK
Registered: 2005-05-24
Posts: 89
Website

Re: jnm_feed_custom_item

I’m using excerpts for my blog. And of course I want the full article to appear in feeds. But making Syndicate article excerpt only = no has no effect on feeds. It always outputs excerpts. So I want to use your plugin to output the body. Here’s where I’m getting a bit confused. I have created a form called feed_item_body and put the <txp:body /> tag in there… Just not sure what to do next.

Offline

#8 2008-06-26 16:35:26

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: jnm_feed_custom_item

I think what you want is supported by Textpattern itself. If you put “Syndicate article excerpt” to “no”, your feeds will always show the body, and not the excerpt. Be carefull with the navigator cache when accessing your feed.

Offline

#9 2008-08-17 11:29:55

brendstrup
Member
From: Århus, Denmark
Registered: 2007-05-05
Posts: 15

Re: jnm_feed_custom_item

Great plugin, Juanjo.

Is there any way it could be expanded to also make it possible to change the handling of the permalink?

My weblog includes both regular blogposts, for which I’d like standard permalinks back to the blog, but it also includes short linkposts, where I’d like the title in the feed to link directly to the page I’m linking to, rather than back to my own blog. See Daring Fireball for an example. This is easy to do on the blog itself, but can’t be done in the feed, as far as I can see.

That level of customization would be great to have!

Offline

#10 2008-08-17 16:04:35

juanjonavarro
Plugin Author
From: Valencia, Spain
Registered: 2005-05-16
Posts: 485
Website

Re: jnm_feed_custom_item

brendstrup, I think that level of customization is not possible with a plugin. But you can just generate the complete feed with a txp section as described here (this example is to create an iTunes feed, but you can use it to create an standard feed)

Offline

#11 2008-08-18 07:11:33

brendstrup
Member
From: Århus, Denmark
Registered: 2007-05-05
Posts: 15

Re: jnm_feed_custom_item

Thanks for your reply, Juanjo. I was worried that you were going to say something like that :)

I’ve seen that tutorial before, but I was kind of dreading having to go through all of the trouble to create my own xml-feeds. I think perhaps I’ll start by using your plugin to add an extra link above the article body that links directly to the original article. And if that doesn’t work well enough I guess I’ll have to jump into creating my own feed.

Offline

#12 2008-08-19 12:21:36

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: jnm_feed_custom_item

brendstrup: If you store the external link in a custom field then you are able to use if_custom_field in the form. More complex is smd_if, just check it out. And if you are using tru_tags then you also have the possibility to append a form to the chosen standard feed.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

Board footer

Powered by FluxBB