Quicksearch submit button

Creating and modifying plugins.
Post Reply
txgal
Posts: 2
Joined: Wed Feb 08, 2006 3:46 pm

Quicksearch submit button

Post by txgal »

Is it possible to add a Go or Submit button to the default Quicksearch plugin? I know this is an option with the Google Plugin, but don't see the option with the default Quicksearch. It is something that I'd never even thought about, but we have received a couple of user comments about the "missing" button. Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Quicksearch submit button

Post by garvinhicking »

This would be possible, but at the current time I'm a bit short off time on that issue.

You can easily copy the HTML code of the quicksearch plugin and put it into a HTML nugget plugin, where you can add a submit button anyway you like...?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

I'm time-starved, too. But here's a couple of things you can try, to tide you over until someone can give it an in-depth look.

The QuickSearch plugin is in include/plugin_internal.inc.php. All these directions will apply to that file. Save a copy as plugin_internal.inc.php.orig before making any changes, so if we screw something up, you're not high and dry.

First try: edit the file, and somewhere around line 336 you should find the form with id="searchform". Remove the hidden input field called action, and add this input field just before the end of the div:

Code: Select all

<input type="submit" name="serendipity[action]" value="search"/>
I'm almost certain that'll get you the button you want. But maybe you'd like a different name. Or maybe I'm wrong, and it didn't work.

Second try: put the hidden field line back. Just before the end of the div, add this input field:

Code: Select all

<input type="submit" name="searchbutton" value="Go!"/>
If that works, and your blog is configured for the convenience of those who speak multiple languages (or, in fact, anything other than English), you can try this internationalized version:

Code: Select all

<?php echo '<input type="submit" name="searchbutton" value="'.GO.'"/>'; ?>
Good luck!
Judebert
---
Website | Wishlist | PayPal
Post Reply