[pmwiki-users] broken GeminiSkin with beta29

Patrick R. Michaud pmichaud at pobox.com
Sat Feb 25 12:31:55 CST 2006


On Sat, Feb 25, 2006 at 04:04:10PM +0000, Hans wrote:
> > Beta 30 doesn't let $SearchBoxFmt take additional parameters -- I'll
> > add that for beta 31.  
> 
> I don't know how easy or difficult that is. To get the desired look
> and functionality I had to add to the Searchbox function.
> What I just did is to redefine the searchbox markup to call a
> redefined Searchbox function, in skin.php:
> [...]

This works.

> This adds onfocus and onblur to display a value like value="Search Site"
> inside the box, and by clicking on the box removing it.
> [...]
> Anyway, if you think this could be useful as default then I don't need
> to bother to redefine it in the skin, otherwise I could.

Unless there's high demand for it, I don't have any plans to support
onfocus/onblur in searchboxes, so you may want to keep the custom
function.  What I was planning to do is to add a substitution variable
to $SearchBoxFmt that would make it possible for the admin to specify
where the additional hidden input parameters should be placed.

Another possibility is to have (:searchbox:) generate its output
using form markup instead of straight HTML.  Then we could see about
adding a focus option to (:input text ...:) instead of just having
it available in the searchbox.  (Reuse of code is good, I hear.)

> One other thing:
> Pmwiki's SearchBox function should have a line changed to read
> 
>     class='inputbutton searchbutton' value='{$opt['label']}' />";

You're correct -- it's now fixed for the next beta.  Thanks.

> And one question:
> Why does it say:
>     'value' => str_replace("'", "'", $SearchQuery),
> and not
>     'value' => '',
> 
> The latter seems to work just as well.

$SearchQuery contains the value of any previous search query -- 
i.e., when I perform a search, the searchbox on the search results 
output should probably continue to hold the query I just entered.  
Defaulting value to '' means that the searchbox always ends up
being empty.

In other words, the initial search looks the same in both versions,
but the contents of the searchbox looks different after performing
a search.

Pm




More information about the pmwiki-users mailing list