[pmwiki-users] powertools bug?

adam overton a at plus1plus1plus.org
Thu Jul 31 03:12:47 CDT 2008


that's the one-liner i was lookin' for
thnx


On 31 Jul 2008, at 1:07 AM, Hans wrote:

> Thursday, July 31, 2008, 7:46:17 AM, adam overton wrote:
>
>> i don't have the best php style/experience, but this seems to do the
>> trick for what i'm looking for. (perhaps someone knows a one-liner
>> that's better than this?)
>
> perhaps this:
>
> $MarkupExpr['pagecount'] = 'PageCount($pagename, @$args[0])';
> function PageCount($pn, $arg='') {
>         if ($arg=='') return 0;
>         return count(explode(",", $arg));
> }
>
>
>
>   ~Hans
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080731/085b9281/attachment-0001.html 


More information about the pmwiki-users mailing list