Hi All,
I'm a little bit confused...
What this extension is doing other than $wgAjaxSearch=true in localsetting.php is doing?
I think if we put that in localsetting.php, it does the same thing as of this extension.. Or am I mistaken?
Regards,
Jack Eapen ---------------------------------------------------------------- "May He protect us both. May He cause us both to enjoy.May we exert together. May our studies become brilliant. May we not hate each other"
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Adam Meyer Sent: Sunday, March 02, 2008 6:21 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Ajax Search Suggest (my first extension)
I just updated the code. it should work out of the box now.
I added configuration to it in the php file. You can select the number of results that come back. You can select to search in the entire article name (default), or just in the beginning of the name.
The results are now links to the articles, so you can just click on them.
As for the Javascript. I trimmed it down, and: Required 2 characters before search is done. (max 10 incase something leans on the keyboard) Enables a memory system so it will not search if the last search was the same.
-Adam
On Mar 1, 2008, at 5:02 PM, Adam Meyer wrote:
Thank you for the changes! I added some more functionality to it this morning. Im going to change
the code around and upload it later today.
On Mar 1, 2008, at 11:31 AM, Jim Hu wrote:
I made the changes on the code at mediawiki.org.
In general, I might wait to trigger the search until more characters have been entered. 1 seems like overkill; how useful will the suggestions be when you type 'e'?
In Firefox, the browser's autocomplete tries to run, and sits on top of what the extension is doing. I wonder if that can be suppressed.
Jim
On Mar 1, 2008, at 10:22 AM, Jim Hu wrote:
function wfAjaxSetSearchSuggestHeaders($outputPage) {
global $wgJsMimeType, $wgStylePath,$wgScriptPath;
$outputPage->addLink( array( 'rel' => 'stylesheet', 'type' => 'text/css',
'href' => $wgScriptPath.'/extensions/
searchsuggest/style.css' ) );
$outputPage->addScript( "<script type=\"{$wgJsMimeType}\"
src="$wgScriptPath/extensions/searchsuggest/searchsuggest.js ">"."</ script>\n"); $outputPage->addScript( "<script type="{$wgJsMimeType} ">hookEvent("load", ss_ajax_onload);</script>\n" ); }
On Mar 1, 2008, at 10:10 AM, Jim Hu wrote:
I'm having similar problems. I think there's a path problem in setting the header, and the js file isn't loading. Playing with it now.
Jim
On Mar 1, 2008, at 9:53 AM, Adam Meyer wrote:
Hmmm... Im not sure why that is. In the javascript file, do you see the ss_ajax_onload function??
-Adam
On Mar 1, 2008, at 10:30 AM, Grietinus Koops wrote:
Adam, Excellent! I only don't get it working for some reason... There's an error "ss_ajax_onload is not defined" if I look in the
script errors... Any idea? I use MW1.10 Grietinus
2008/3/1, Adam Meyer meyer7@mindspring.com: > > I just finished my first extension. It needs work I know, but > perhaps anyone looking for something like this can use it and > let me know what it needs. > > It is a very lightweight search suggestion. (under 5k). When > typing into the search box, articles containing those letters or
> word will be displayed under the search bar. > > http://www.mediawiki.org/wiki/Extension:Search_Suggest > > Thank you to everyone who helped make this work. > If you would like to help make this better, I would really love > any help. > I would like to be able to select what you want to choose using > the arrow keys. > > Also, I could easily make the suggestions links so anyone could > just click on them. > > _______________________________________________ > MediaWiki-l mailing list > MediaWiki-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l > _______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
_______________________________________________ MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
This electronic mail (including any attachment thereto) may be confidential and privileged and is intended only for the individual or entity named above. Any unauthorized use, printing, copying, disclosure or dissemination of this communication may be subject to legal restriction or sanction. Accordingly, if you are not the intended recipient, please notify the sender by replying to this email immediately and delete this email (and any attachment thereto) from your computer system...Thank You
It is very close. Except, the built in wgAjaxSearch wipes out the entire content of a page when you start to type. The page content does not come back until you actually do a complete search, and reload the page.
This extension does the same search, except it places the results in a non obtrusive place, IE below the the search. The search also searches the entire name of articles, not just the beginning. So... searching for foam will return both foam-core and working with foam-core.
Other places have a very similar search, but it uses Yahoo's javascript library and is 200k of code.
-Adam
On Mar 3, 2008, at 3:41 AM, Jack Eapen C wrote:
Hi All,
I'm a little bit confused...
What this extension is doing other than $wgAjaxSearch=true in localsetting.php is doing?
I think if we put that in localsetting.php, it does the same thing as of this extension.. Or am I mistaken?
Regards,
Jack Eapen
"May He protect us both. May He cause us both to enjoy.May we exert together. May our studies become brilliant. May we not hate each other"
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Adam Meyer Sent: Sunday, March 02, 2008 6:21 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Ajax Search Suggest (my first extension)
I just updated the code. it should work out of the box now.
I added configuration to it in the php file. You can select the number of results that come back. You can select to search in the entire article name (default), or just in the beginning of the name.
The results are now links to the articles, so you can just click on them.
As for the Javascript. I trimmed it down, and: Required 2 characters before search is done. (max 10 incase something leans on the keyboard) Enables a memory system so it will not search if the last search was the same.
-Adam
On Mar 1, 2008, at 5:02 PM, Adam Meyer wrote:
Thank you for the changes! I added some more functionality to it this morning. Im going to change
the code around and upload it later today.
On Mar 1, 2008, at 11:31 AM, Jim Hu wrote:
I made the changes on the code at mediawiki.org.
In general, I might wait to trigger the search until more characters have been entered. 1 seems like overkill; how useful will the suggestions be when you type 'e'?
In Firefox, the browser's autocomplete tries to run, and sits on top of what the extension is doing. I wonder if that can be suppressed.
Jim
On Mar 1, 2008, at 10:22 AM, Jim Hu wrote:
function wfAjaxSetSearchSuggestHeaders($outputPage) {
global $wgJsMimeType, $wgStylePath,$wgScriptPath;
$outputPage->addLink( array( 'rel' => 'stylesheet', 'type' => 'text/css',
'href' => $wgScriptPath.'/extensions/
searchsuggest/style.css' ) );
$outputPage->addScript( "<script type="{$wgJsMimeType}"
src="$wgScriptPath/extensions/searchsuggest/searchsuggest.js ">"."</ script>\n"); $outputPage->addScript( "<script type="{$wgJsMimeType} ">hookEvent("load", ss_ajax_onload);</script>\n" ); }
On Mar 1, 2008, at 10:10 AM, Jim Hu wrote:
I'm having similar problems. I think there's a path problem in setting the header, and the js file isn't loading. Playing with it now.
Jim
On Mar 1, 2008, at 9:53 AM, Adam Meyer wrote:
Hmmm... Im not sure why that is. In the javascript file, do you see the ss_ajax_onload function??
-Adam
On Mar 1, 2008, at 10:30 AM, Grietinus Koops wrote:
> Adam, > Excellent! I only don't get it working for some reason... > There's an error "ss_ajax_onload is not defined" if I look in > the
> script errors... Any idea? I use MW1.10 Grietinus > > 2008/3/1, Adam Meyer meyer7@mindspring.com: >> >> I just finished my first extension. It needs work I know, but >> perhaps anyone looking for something like this can use it and >> let me know what it needs. >> >> It is a very lightweight search suggestion. (under 5k). When >> typing into the search box, articles containing those letters >> or
>> word will be displayed under the search bar. >> >> http://www.mediawiki.org/wiki/Extension:Search_Suggest >> >> Thank you to everyone who helped make this work. >> If you would like to help make this better, I would really love >> any help. >> I would like to be able to select what you want to choose using >> the arrow keys. >> >> Also, I could easily make the suggestions links so anyone could >> just click on them. >> >> _______________________________________________ >> MediaWiki-l mailing list >> MediaWiki-l@lists.wikimedia.org >> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l >> > _______________________________________________ > MediaWiki-l mailing list > MediaWiki-l@lists.wikimedia.org > https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
===================================== Jim Hu Associate Professor Dept. of Biochemistry and Biophysics 2128 TAMU Texas A&M Univ. College Station, TX 77843-2128 979-862-4054
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
This electronic mail (including any attachment thereto) may be confidential and privileged and is intended only for the individual or entity named above. Any unauthorized use, printing, copying, disclosure or dissemination of this communication may be subject to legal restriction or sanction. Accordingly, if you are not the intended recipient, please notify the sender by replying to this email immediately and delete this email (and any attachment thereto) from your computer system...Thank You
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Although the search from $wgAjaxSearch = true is prettier at this stage, I like where Adam puts the hits, and I like the more complete search (and that's working from his first version... I haven't recopied his code yet). What I'd like even better is one that works like the autocomplete at http://wormbase.org, where the results create a dropdown menu over the search box, and you can arrow-key down to select the one you want. I was at there when the wormbase programmers implemented this, and IIRC they had to tinker with the yahoo libraries to get it to act more like the google suggest. I'm not completely sure whether that's what they did in the end. I know they started with some open source js libraries and tweaked them. An important thing was to not have the autocomplete actually fill the search box unless the user actively selected the suggestion. They didn't do that initially and had a major revolt from their users, which is why they have the checkbox to provide an option to turn it off.
I'm bad a js, so I don't know if you can extract the relevant code from the website in a way that's useful.
Jim
On Mar 3, 2008, at 6:43 PM, Adam Meyer wrote:
It is very close. Except, the built in wgAjaxSearch wipes out the entire content of a page when you start to type. The page content does not come back until you actually do a complete search, and reload the page.
This extension does the same search, except it places the results in a non obtrusive place, IE below the the search. The search also searches the entire name of articles, not just the beginning. So... searching for foam will return both foam-core and working with foam-core.
Other places have a very similar search, but it uses Yahoo's javascript library and is 200k of code.
-Adam
On Mar 3, 2008, at 3:41 AM, Jack Eapen C wrote:
Hi All,
I'm a little bit confused...
What this extension is doing other than $wgAjaxSearch=true in localsetting.php is doing?
I think if we put that in localsetting.php, it does the same thing as of this extension.. Or am I mistaken?
Regards,
Jack Eapen
"May He protect us both. May He cause us both to enjoy.May we exert together. May our studies become brilliant. May we not hate each
<snip>
Sorry about the long threads, I sometimes forget some people use the digest.
I had something very similar to that on my site before I made this extension. The reason I made this guy was because what I had before was 200K. That was just too much for me. I noticed it really slowed down my site load times. I can try to make it more like that one.
I also do not know JS. But I didn't know php before this summer. I just look at my projects as what I want to do, then i learn how to do it. Give me a few months, I may have it down.
But that said, anyone who is interested in helping with this I would love it, -Adam
On Mar 4, 2008, at 11:03 AM, Jim Hu wrote:
... recopied his code yet). What I'd like even better is one that works like the autocomplete at http://wormbase.org, where the results create a dropdown menu over the search box, and you can arrow-key down to select the one you want. I was at there when the wormbase programmers implemented this, and IIRC they had to tinker with the yahoo libraries to get it to act more like the google suggest. I'm not completely sure whether that's what they did in the end. I know they started with some open source js libraries and tweaked them. An important thing was to not have the autocomplete actually fill the search box unless the user actively selected the suggestion. They didn't do that initially and had a major revolt from their users, which is why they have the checkbox to provide an option to turn it off.
I'm bad a js, so I don't know if you can extract the relevant code from the website in a way that's useful.
Jim
On Mar 3, 2008, at 6:43 PM, Adam Meyer wrote:
mediawiki-l@lists.wikimedia.org