[pmwiki-users] wildcards in conditional markup

Patrick R. Michaud pmichaud at pobox.com
Thu Mar 9 08:01:02 CST 2006

On Thu, Mar 09, 2006 at 09:49:07AM +0000, Hans wrote:
> Am I correct in thinking that I can use wildcards for markup like
> (:if group Forum* :) but not like (:if group *Forum :) ?

No, you're not correct.  (:if group *Forum:) works also -- at
least, it's supposed to work.  
See http://www.pmwiki.org/wiki/Test/Wildcards .

> $DefaultPageTextFmt = '(:if !group Forum* :)(:include $[{$SiteGroup}.PageNotFound]:)
>     (:if group Forum* :)Compose message, add author name, and click post !!!(:if:)';
> How can I do it for groups called ChessForum, TennisForum etc?

(:if !group *Forum:)(:include $[{$SiteGroup}.PageNotFound]:)
(:if group *Forum:)Compose message, add author name, and post(:if:)

> And is the above code resulting in slower performance than using a
> conditional statement in php (which I don't have at the moment)?

Yes, it's slower, but since the amount of markup to be processed
is so small it's not significantly slower.


More information about the pmwiki-users mailing list