[pmwiki-users] CountGlyphs

Stirling Westrup sti at pooq.com
Wed Aug 30 15:01:28 CDT 2006

I was recently hoping to use the CountGlyphs recipe to annotate the
sizes of stories on my index page. It doesn't seem to work though and a
quick look at countglyphs.php gives me little hope of knowing how to fix it.

It should be trivial to write something that counts words and glyphs and
caches them in the page attributes during a save, but I'm not sure how
to integrate that with the Page variable system. In particular, I would
like to know how to define a page variable (such as $Words) in such a
way that it will:

a) Work using the {Group.Page$Words} notation.
b) Be accessible inside a pagelist format as {=$Words}?

I had been naively assuming that a) and b) would simply work for
anything defined in FmtPV, but that doesn't seem to be the case.

More information about the pmwiki-users mailing list