Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-08-20 15:14:33

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

[plugin] [ORPHAN] rss_auto_excerpt

Yes, another excerpt plugin. But hopefully this one is a bit different. I’ve used both the kgr_safe_excerpt plugin and the Beginning plugin but in both cases, those plugins didn’t do things I wanted to do. Thanks does go out to the authors of those plugins as I was able to use some ideas from them.

rss_auto_excerpt Features

The <code>rss_auto_excerpt</code> plugin automatically displays article excerpts even if an excerpt has not been saved with an article. If for some articles you have defined an excerpt, your own excerpt will be displayed rather than the auto-generated excerpt.

There are 3 different options for auto-generating the excerpt from the article body:

  • By Length – specify the number of characters to display from the article body
  • By Words – specify the number of words to display from the article body
  • By Paragraphs – specify the number of paragraphs to display from the article body

If auto-generating by length, the plugin will ensure that the excerpt does not cutoff in the middle of a word.

If based on the parameters passed into the plugin, the excerpt would not be shorter than the entire article body, the body will be shown instead.

The plugin will also automatically close any open HTML tags which allows for proper handling of lists, bolded or italicized text and other situations.

Get rss_auto_excerpt

Last edited by wilshire (2006-08-24 15:06:58)

Offline

#2 2006-08-20 18:25:52

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

Wow! This is an amazingly powerful plugin! Excellent! I will check this out immediately!

I would like to request for a feature if it’s possible. A tag which will strip out a certain number of characters or paragraphs or words from the body? Sometimes, I would like to continue the article from the second paragraph onwards OR style the first paragraph and the continuing paragraphs differently.

OR I can also make use of <a href=“http://www.mandarindesign.com/dropcaps.html”>drop caps</a> in articles. We can possibly use this to create dropcaps in the following way…

<code>
<p>
<span class=“dropcase”>
<txp:rss_auto_excerpt length=“1” />
</span>
<txp:rss_auto_excerpt striplength=“1” or stripletters=“1“or stripparagraph=“1” /></p>
</code>

note: the attribue “striplength” is fictional in the above tag. I’m sure its possible to achieve the same result in other ways. Suggestions are most welcome!!

I hope I was clear enough.

Edit
This plugin is working very well. Thank you!

Last edited by creativesplash (2006-08-21 01:03:05)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#3 2006-08-21 09:03:37

TNT
Member
From: Rotterdam, Netherlands
Registered: 2006-01-06
Posts: 256
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

Great plugin! Just what I was looking for after using Beginning and kgr_safe_expert and not being completely satisfied. Thanks!


Prrrrrrrr

Offline

#4 2006-08-22 14:36:53

hamba
Member
Registered: 2006-08-04
Posts: 22

Re: [plugin] [ORPHAN] rss_auto_excerpt

WOW this is a great plugin
Thanks it was exactly what I was looking for

I have one question is there a way to limit the number of excerpts?
I’m using this on my front page and only want to show a maximum of 3 excerpts

Thanks again
hamba

Offline

#5 2006-08-22 16:33:04

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

hamba – Limiting the number of articles that show on your home page is something that you would need to take care of in your article or article_custom tag by adding limit="3" to the tag. Its not something this plugin handles.

creativesplash – Those are good suggestions. Thanks.

Offline

#6 2006-08-24 14:38:56

stepney
New Member
Registered: 2006-08-24
Posts: 2

Re: [plugin] [ORPHAN] rss_auto_excerpt

Hello

This looks like a great plugin. Apologies for being a bit dim, but I’m not sure how to use it.

I’d like to have a ‘news’ page which lists excerpts of recent articles .. each with a ‘read more’ link to the full article.

Do I call the plugin like this:

< txp:rss_auto_excerpt length=“60” linktext=“read more” / >

.. and where do I do this from .. within an article, in an article form .. or on a page template?

Thanks for your help.

Stepney

Offline

#7 2006-08-24 15:08:02

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

stepny – Yes, that is a valid way of calling the plugin. That code should go in the article form you use for the recent article listing on your news page.

Offline

#8 2006-08-25 16:26:54

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,577
Website

Re: [plugin] [ORPHAN] rss_auto_excerpt

Your timing was impeccable! The latest version of kgr_safe_excerpt gave me some problems and this plug-in neatly solves everything. I just wanted to say thanks!

In my case I wanted to append the “readmore” directly after the excerpt or abbreviated inhalt. Setting linkwraptag="span" didn’t quite do it as it remains after and outside the p-tag of the excerpt.

For the moment I’ve set the css of the excerpt p tag to display:inline; to achieve this, but this was a common request in the kgr_safe_excerpt thread. Maybe it’s worth making this an attribute?


TXP Builders – finely-crafted code, design and txp

Offline

#9 2006-08-25 16:38:44

stepney
New Member
Registered: 2006-08-24
Posts: 2

Re: [plugin] [ORPHAN] rss_auto_excerpt

Thanks Wilshire it works a treat now.

For any other newish TxP-ers, here’s what I did:

1. Made a form called new-excerpt, containing:

< h3 >< txp:title / >< /h3 >
< txp:rss_auto_excerpt words=“20” linktext=“Read more” / >

2. Put this in my page template:

< txp:if_individual_article >
< txp:article / >
< p >Other news stories:
< txp:link_to_prev >< txp:prev_title / >< /txp:link_to_prev >
< txp:link_to_next >< txp:next_title / >< /txp:link_to_next >
< /p >
< /txp:if_individual_article >

< txp:if_article_list >
< txp:article_custom section=“news” form=“new-excerpt” / >
< /txp:if_article_list >

(Without the spaces obviously)

Thanks again,

Stepney

Offline

#10 2006-09-03 14:01:33

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

Re: [plugin] [ORPHAN] rss_auto_excerpt

(This comment was also posted on wilshire.com)

… Please include a tag to force creation of an automatic ecerpt even if excerpt exists.

Second I would like to add a feature request on top of that: Give an option list from which field(s) to create the auto excerpt from. I.e. first from excerpt, if not available from article. A more crazy version would include site parameters i.e. first date in brackets, second author in strong, third keywords or custom field or category1 followed by the excerpt. You get the picture :-)

I nearly always have excerpts with my articles. The excerpts are composed as a listed summary of the article headers (btw … that’s another feature request :).

I would use rss_auto_excerpt to only display the very first paragraph of my article which is always a h4 introduction.

I want my homepage (which is a W+W derivate btw) article list to look like: article title, 1st paragraph or line, date + section + category, keywords.

But this can only be achieved if rss_auto_excerpt would be able to create an excerpt even if a real excerpt already exists.


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

Offline

#11 2006-09-03 21:38:20

playpiggy
Member
From: Changchun, China
Registered: 2004-11-23
Posts: 55

Re: [plugin] [ORPHAN] rss_auto_excerpt

I found that the auto excerpt can’t stop at Chinese charactors. A Chinese article without English letters will output an empty content.


Welcome to the REAL World…

Offline

#12 2006-09-12 13:53:25

Brutal
Member
Registered: 2005-01-28
Posts: 14

Re: [plugin] [ORPHAN] rss_auto_excerpt

Great plugin! Any way to make it strip away images?

Offline

Board footer

Powered by FluxBB