[pmwiki-users] CountGlyphs recipe doesn't work

Pico pmwiki at ben-amotz.com
Fri May 19 09:03:32 CDT 2006


> From: Audun Myhra Bergwitz <bergwitz at gmail.com>
> Pico skrev:
> > Ben Wilson wrote:
> >> On 5/18/06, Pico <pmwiki at ben-amotz.com> wrote:
> >>> I just tried installing it on my wiki and it didn't work.
> >>>
> >>> A search on PmWiki.org reveals that this has been posted as PITS/00710,
> >>> which notes that it was working, but appears to have stopped working
> >>> with version 2.1
> >>
> >> I fixed it.[1] I also updated the cookbook page.[2] Would you mind
> >> independently checking and closing the PITS if it works?[3]  
[snip]
> >
> > Ok, now the markups report numbers, but they do not seem to be 
> > correct. When I copied and pasted this entire page onto my site, the 
> > markup reported "This page contains 50 glyphs and 8 words." When I 
> > edited the page and added three words, the numbers did not change.
[snip]
> It works nicely on most of my page, except if I copy the exact markup 
> used on the Cookbook page. Compare these two:
> <http://magasin.adbusters.no/pmwiki/index.php/Main/CountGlyphs>
> and
> <http://magasin.adbusters.no/pmwiki/index.php/Main/WorkingExamplePage>
> 
> Weird. Seems like there's some conflicting markup or something.
> 

Ok, I narrowed down what is happening: when the markups are inside of a (:markup:) directive/division then the numbers they report are limited to that division.  For example:

(:markup:) [=
This page contains {$Glyphs} glyphs and {$Words} words.
=]

Reports 50 Gylphs and 8 words. If I add a word within the (:markup:) division, the counts go up.  If I add a word outside of the (:markup:) division, the counts remain unchanged.

Pico




More information about the pmwiki-users mailing list