Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#205 2011-01-12 08:00:39

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

Re: [plugin] [ORPHAN] rss_auto_excerpt

Hicks, the logic which comes to my mind is to publish/copy such short ‘bodies’ also inside the TXP excerpt field and to not override the TXP excerpt.

Last edited by merz1 (2011-01-12 08:03:28)


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

Offline

#206 2011-01-12 18:45:02

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

Markus,

Good idea, thanks. Trouble is, I have been using the excerpt field for each posting’s footnotes. I was hoping I could do this thing automatically, but my only option might be to add a custom field called “no auto-excerpt” and have an if_custom_field.... set up in the article form to hit the RSS plug-in or else a bog-standard body tag.

If only there were a <txp:xxx_if_article_length characters="500"> or the like… I have the illustrious Stef Dawson’s smd_article_stats that can return the number of words, but there’s no way to get an “if” in there.

hicks.

Last edited by hicks (2011-01-12 18:55:20)

Offline

#207 2011-01-12 19:15:15

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

Re: [plugin] [ORPHAN] rss_auto_excerpt

What about using smd_article_stats inside of a txp:variable? Adding an appropriate if/else comes to my mind (II.)…

Edit: What about asking for a category like ‘short’?

Edit 2: I am sure plain PHP str_word_count can help too to define a variable (PHP count_chars won’t help).

Last edited by merz1 (2011-01-12 19:33:37)


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

Offline

#208 2011-01-12 19:25:50

johnstephens
Plugin Author
From: Woodbridge, VA
Registered: 2008-06-01
Posts: 997
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

Textile 2.2 supports footnotes, without requiring an extra field:

From the Textile 2.2 Reference Guide

Auto-numbered notes

When referencing or citing sources in body text you can employ footnotes. But these are explicitly numbered and if you therefore alter the order of the references (by inserting one or deleting/moving others) you must manually renumber all the footnotes in the article.

Using notes you can label references in your body text, set up a definition for each of those labels, and then display the list of references at a suitable place in your body text. Crucially, the numbers will be automatically assigned when you save the article and recalculated if necessary as you alter the document.

Also:

1. References from the main body may be hyperlinked to the references section or not — either globally or on a note-by-note basis
2. Notes listed in the references section can optionally backlink to the place(s) they were used. Again, you can globally control whether backrefs are employed and, if so, whether the backref is just the first occurrence of the reference or all cited references. You may also override the backrefs on a note-by-note basis

If you’re already running Textpattern 4.3.0, then Textile 2.2 is already included. You can also upgrade Textile independently by replacing classTextile.php with the new one in Textpattern’s lib/ directory.

If you absolutely require a separate field for footnotes— say, to present the footnotes without the body text in another context —it would be best to use a custom field rather than appropriating a purposeful native field in Textpattern. There’s nothing wrong with using the native Excerpt field for whatever data you want, but it might mean you run into situations like this where a kludge is required for functionality that assumes the native field is used for it’s intended purpose.

Edit: Fix a typo. Dang.

Last edited by johnstephens (2011-01-12 19:28:04)

Offline

#209 2011-01-12 19:41:04

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

I can’t see a way of using the if_variable with a _morethan_-type condition. That would be nice, though.

glz_custom_fields could be a neat manual answer, but as I only want one little checkbox, given the fee demanded by glz I might look elsewhere.

hicks.

Offline

#210 2011-01-12 19:48:21

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

Re: [plugin] [ORPHAN] rss_auto_excerpt

Well, then you have to dive into Blokes smd_if: Generic multiple if condition tests. You have been warned :)


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

Offline

#211 2011-01-12 19:48:54

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

John,

Thanks for that info, it’s new to me. But my footnotes are not numbered footnotes. They’re more like additional info, hyperlinks (I don’t do links in my body), dates of events, that sort of thing.
I would have used a custom field for my footnotes if the input box wasn’t microscopic; the excerpt box is perfect.

hicks.

Offline

#212 2011-05-02 19:28:49

hicks
Member
From: Portland, OR, USA (ex-UK)
Registered: 2009-05-08
Posts: 106
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

I wonder, could there be a way to override the automation of the excerpt length, say with a specified character sequence in the article body, say “+++”? Or is there another plugin that does that?

Hmmm.

Ta.

Offline

#213 2011-05-03 00:14:09

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,279

Re: [plugin] [ORPHAN] rss_auto_excerpt

According to what I tried you can treat the body of an article as if it were a custom field. So you possibly can use <txp:if_custom_field name="body" value="+++" match="any">has pluses<txp:else />has no pluses</txp:if_custom_field>.

But why not set a variable in the body or use a custom field?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#214 2011-05-03 12:43:35

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

Re: [plugin] [ORPHAN] rss_auto_excerpt

Why not simply use the original excerpt field and if_excerpt logic?


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

Offline

#215 2011-05-03 12:57:32

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,851
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

What the… ‽ Jon, you live in Portland, OR now?

Man, I leave the PNW and everybody moves there. :)

Offline

#216 2011-05-03 13:38:54

Alweb
Member
Registered: 2010-10-08
Posts: 25

Re: [plugin] [ORPHAN] rss_auto_excerpt

Hello Everyone,

I have used “rss_auto_excerpt” as follow:

<txp:rss_auto_excerpt showlinkwithexcerpt=“0” words=“15” />

but the text that is generated comes between <p> tag. Can someone help me to remove the paragraph element? I want that the generated text doesn’t come between <p>?

Hope someone can help me.. :)

Offline

Board footer

Powered by FluxBB