[pmwiki-users] skin design and the searchbox

Patrick R. Michaud pmichaud at pobox.com
Sat Mar 26 13:04:56 CST 2005


On Sat, Mar 26, 2005 at 06:38:16PM +0000, Hans wrote:
> >    (:if enabled smallsearchbox:)
> >    (:if enabled rightmenu:)
> >    (:if enabled jumpbox:)
> > [...]
> > Skins and other modules can then set variables to indicate
> > available capabilities.  We could make the variables either global or
> > entries in an array of some sort, or a combination of the two.
> > Personally I prefer the array approach, as it's easier to set multiple
> > values.
> 
> How would this work with an array?

$CondEnabled['smallsearchbox'] = 1;
$CondEnabled['rightmenu'] = 1;

> At present some conditionals are defined in pmwiki.php, others can be
> added as localisations in config.php. Why are the definitions in the
> core? Could they equally well be in stdmarkup.php, where (:if ...:)
> markup is defined? This would keep the core leaner.

Yes, they could be defined in stdmarkup.php, and that may be where
new definitions get placed.  I put the $Conditionals array in pmwiki.php
simply because that is also where the CondText() function is defined.
It probably doesn't make much difference either way, since stdmarkup.php
is nearly always loaded by sites.

Pm



More information about the pmwiki-users mailing list