Plugins : excerpt_words 2.0 Dec 31 2002 | # | C:10

excerpt_words 2.0

December 31, 2002 - updated February 8, 2006 (Download)

Global filter that creates an excerpt consisting of the first n words in the tag, followed by ” …” if the tag was truncated.
Specify a negative n to use the blog’s “words in excerpt” setting.
You can optionally specify a different continuation text (…) by appending it to the number of words like so: excerpt_words=”n|continuation”.

Example: Limit the number of words displayed in a comment entry to 10 words:

<$MTCommentBody excerpt_words="10"$>

Example: Limit the number of words displayed in a comment entry to 10 words and use ” [etc.]” as continuation text:

<$MTCommentBody excerpt_words="10| [etc.]"$>

Example: Limit the number of words displayed in a comment entry to the blog’s “words in excerpt” setting and don’t use any continuation text:

<$MTCommentBody excerpt_words="-1|"$>

Example: Display the six most recent comments with a short excerpt using the default continuation text ” …”:

<MTComments lastn="6" sort_order="descend">
<p>
    <b><a href="<$MTCommentEntryID pad="1"$>.htm"><$MTCommentAuthor$> said</a>:</b>
    <$MTCommentExcerpt excerpt_words="10"$>
</p>
</MTComments>
Version History

  • Version 2.0 December 15, 2003

    Added support for specifying continuation text. Don’t display continuation text if the excerpt displays all words in the tag.
  • Version 1.0 December 31, 2002

    Initial relase.
The site database appears to be down.