[pmwiki-users] Thanks for the searchbox fix!

Hans design5 at softflow.co.uk
Mon Nov 27 12:36:43 CST 2006


Monday, November 27, 2006, 6:15:03 PM, JB wrote:

 >> I did not realise that you put the searchbox into the sidebarfooter!

> Yes, I wanted to move it to a different location so I read the
> help pages about it and found that you can use display a searchbox
> anywhere using (:searchbox:) and that you can hide the original by
> setting $EnableSidebarSearchbox = 0;   Is there is a better way
> to do this?

No, this is the correct way. I just wanted a default searchbox
included in the skin, but also an option to disable it, in case
someone wants to have it somewhere else.

Using display:none to hide the default skin searchbox is probably not
the smartest way, since the HTML code still gets added. I may revise
that.

 >> The first searchbox HTML is inserted by default, but not shown,
 >> through #sidebarsearch {display:none}
 >>
 >> The second one is from markup you put into SideBarfooter, and you need
 >> to add focus=1 as a parameter:
 >>
 >> (:searchbox group=Main value=Search size=25 label=Go focus=1:)


> Excellent!  A small point though, I set "focus=true".  This searchbox
> could/should be a recipe itself!  If you do not make this a recipe,
> perhaps I will (and give you credit of course).  It could modify the
> original searchbox to do the focus thing.  I do have a long long long
> todo list and it might take me some time.

It should not matter if you add focus=1 or focus=true.
This custom searchbox ships with FixFlow, Gemini and Triad skins, and
it is just a small modification of the default pmwiki searchbox, by
adding the "onblur" and "onfocus" javascript, and a button label, so
one can have the "Search" as value inside, and a small "Go" button.

Otherwise the behaviour is just the same as pmwiki's default, which is
documented under PmWiki.PageLists, i.e. you can do with searchbox just
the same as with pagelist, use the same parameters etc.

So the searchbox script does not modify the original searchbox, it
replaces it, by redefining the (:searchbox :) markup to call its own
custom searchbox function.

Hans





More information about the pmwiki-users mailing list