Extension talk:Search Suggest

Last letter of search term is ignored
For some reason the content of the $term parameter of wfAjaxSearchSuggest is missing the last letter. For example if I enter 'wiki' in the search box, all articles containing 'wik' are returned. You can quickly confirm this by changing the last line of that function from return $html; to return $term; and then entering some search term.

Roberthaenel 18:18, 9 March 2008 (UTC)

This is fixed now TheDevilOnLine 08:47, 20 March 2008 (UTC)

Works only with MW 1.10 ?
Hi, I wonder if this extension just works with MediaWiki 1.10 ? I'm using MW 1.11.1 and this extension works not.

Any idea?

--84.115.73.42 23:25, 10 March 2008 (UTC)

Im using it in 1.11 right now. Are you using monobook as your skin?
 * if not
 * If you know where you want the results to go, you can change this in the javascript


 * var searchdiv = document.getElementById("searchBody");

Change searchBody to the id of the div you want the results to go into --Noverflow 12:37, 15 March 2008 (UTC)

^Can somebody please elaborate on the above suggestions? Thanks. ~neonsox 1525 5 May 08

Spaces vs Underscores

 * I noticed that articles that have spaces in their names will require the underscore character. Without it the search is broken.

Bkazdan 17:24, 12 March 2008 (UTC)

Fix
Just add a little bit of code to this line:

A little replace tag makes the replace as you type work with spaces.

Bkazdan 17:26, 13 March 2008 (UTC)

Thought I took care of that
Sorry, I thought I had taken care of that on the php level. Ill fix it. --Noverflow 12:39, 15 March 2008 (UTC)

Suggestion: Autocomplete Replacement

 * It would be great if browser autocomplete could be disabled and traded for an overlaying version of your search tool.
 * Example: Google Suggest

Bkazdan 17:28, 12 March 2008 (UTC)

Response 84.115.73.42
Hi! Have you been able to disable the browsers autocomplete feature? If so - how?

I have just tested your new code (below) and it works nearly perfect - but the search tool do not overlay the browsers autocomplete feature ... I'm not a programer and have no idea how to get rid this problem, but maybe this instructions - Disabling AutoComplete on forms - could mybe helpful.

A further "problem" is that if the search box starts to drop down below the search input field, the drop down box do not overlay the toolbar below (moves the toolbox and everything below down). Any idea how to get rid of this problem?

--84.115.73.42 21:19, 25 March 2008 (UTC)

Further Response - Neverflow
If you want, you can add autocomplete=”off” to the input box, but I think it is useful. As for the second "problem", that was actually my intention. Below someone has posted some code to have the results hover above. --Noverflow 16:33, 28 March 2008 (UTC)

Reply - Bkazdan
Neverflow is correct.

I think that adding the attribute autocomplete with the value of "off" will work. However I think it may need be added on the form element. Unfortunately it is not standard HTML. IE/Firefox both support it though.

I have been very busy integrating a vBulletin interface at the same time I am working on a new wiki. Unfortunately I haven't had that much energy to invest into this.

Ideally I would want to inject the autocomplete attribute on the fly via javascript so that the extension doesn't require any extra work. If Noverflow knows how to do this via PHP it may be a better solution.

I will try to work on this a little more in the next week.

Bkazdan 22:01, 30 March 2008 (UTC)

Changes to .js & .css for overlay
On my installation I made a few changes to the .js file and .css for an overlay effect.

Original searchsuggest.js:

Modified searchsuggest.js:

Original style.css

Modified style.css

Bkazdan 18:58, 12 March 2008 (UTC)

Current Code
This is the current code I am using right now. It has been further modified beyond the examples above.

Current searchsuggest.js

Current Style.css

Bkazdan 18:02, 13 March 2008 (UTC)

Shouldn't wfAjaxSearchSuggestHeaders return true?
Shouldn't wfAjaxSearchSuggestHeaders return true, so other OutputPageBeforeHTML hooks get a chance to run? Jlerner 20:08, 25 April 2008 (UTC)

See, this is where it becomes obvious Im a designer, not a programer.

--Noverflow 12:08, 26 April 2008 (UTC)

How do we make the div disapear off focus
What needs to be changed to hide the div if the user clicks outside of the text field / searchSuggest div?

TIA,

--Theothertom 23:38, 6 May 2008 (UTC)