[pmwiki-users] Tooltips

Waylan Limberg waylan at gmail.com
Wed Dec 21 16:21:35 CST 2005


On 12/21/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>
> In the next release of PmWiki, one will be able to get at the
> excerpt and description values by using {$excerpt} and {$description}
> page variables.  It's not clear to me yet if {$excerpt} will also
> strip the HTML -- I'm still working out the details for that.
>
> But the more I think about it, the more I think that PmWiki may choose
> to store a "plaintext" attribute that contains the rendered text w/o
> any HTML in it.  Then we could have an {$Excerpt} or {$Description}
> page variable that programmatically strips out just the first
> paragraph or so from the plaintext, or uses the description if it's
> available for a page.
>
I see {$Description} as a plain text description of the page that the
author can type into a textarea. Whether this textarea is part of the
edit form or elsewhere isn't clear to me. Anyway, if {$Description} is
blank, it would then default to {$Excerpt} , or perhaps to something
else defined within config.php

However, an {$Excerpt} is the first x amount of a page. If that
includes links, I prefer them to remain as links etc. I've seen some
excerpts in blogging systems (and rss feeds)  that strip the
formatting, and sometimes things just don't make sense. And if I don't
want formatting, then I can retype/copy the content into the
description textarea and remove formatting manually; ensuring that is
looks right.

Assuming this behavior, in use I would most likely always use the
{$Description} variable and just leave the description blank when I
wanted {$Excerpt} behavior. However, in those instances where I needed
a description to display in one place, but the excerpt in another, I
can still do so by defining the description and using {$Excerpt} where
needed. Flexibility!

Further, I say the {$Excerpt} should be the first paragraph (or 2
paragraphs etc - again set in config), not x number of characters.
Suppose the first five words are five external links with explicit
labels. With all the markup (whether wiki markup of html), the number
of chars displayed and those in the source is quite different. And I
never liked ending these things mid sentence (or worse, mid link). I
supose one could use x number of sentences, but paragraphs just make
more sense to me. Perhaps if excerpts were by paragraph, with a very
high character (or sentence - but don't forget about long runons)
limit (again configurable) on the paragraph for those occasions when
the first paragraph is unusually long.

That's my 2cents

--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list