[pmwiki-users] skin design and the searchbox

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 21 08:46:15 CST 2005


On Mon, Mar 21, 2005 at 01:58:47PM +0000, Hans wrote:
> Monday, March 21, 2005, 1:49:33 PM, Patrick wrote:
> > It *should* work from skin.php.  Did you remember to do...?
> 
> >    global $Conditions;
> 
> Yes, and it does not work.
> This in skin.php, nothing in config.php:
> 
> global $Conditions;
> $Conditions['skin'] = "\$GLOBALS['Skin']==\$condparm";

Oh, yeah.  In general placing this code in skin.php isn't going to
do what you want, because a skin.php file is loaded only if it's the
active skin.  Thus, other skins which don't have the above code
won't recognize the 'skin' condition.

More generally, it seems to me that testing for specific skins isn't
the best way to do this, or else we end up with long lists of skins in
our conditions.  Instead we should be asking if the current skin 
supports a desired capability.  Thus something like:

   (:if sidebarsearchok:) 

Maybe we want a generic 'markup' condition that processes
text only if a certain markup has been defined

   (:if markup searchbox:)

or if a certain style has been defined in $HTMLStylesFmt

   (:if style searchbox:)

Pm



More information about the pmwiki-users mailing list