Re: svn: /web/php/branches/PROTOTYPE_2010/ css/structure.css css/theme.css index.html js/common.js js/jquery.autocomplete.pack.js
js/search-index-en.js
| From: | Hannes Magnusson | Date: | Tue, 22 Dec 2009 13:51:48 +0000 |
| Subject: | Re: svn: /web/php/branches/PROTOTYPE_2010/ css/structure.css css/theme.css index.html js/common.js js/jquery.autocomplete.pack.js js/search-index-en.js |
||
| References: | 1 2 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-6814@lists.php.net to get a copy of this message | ||
I was looking at it yesterday, I didn't find a "elegant" way to
extending it with that kind of functionality so I gave up :P
-Hannes
On Tue, Dec 22, 2009 at 02:37, Stewart Lord <stewey@ambitious.ca> wrote:
> If anyone has any ideas how to elegantly add scoring and sorting to the
> jQuery autocomplete plugin, please let me know.
>
> With other JavaScript libraries, I've had success extending/overwriting
> existing functions, rather than actually editing the original source. With
> this plugin, I haven't had much luck clobbering existing functions with my
> own.
>
> Thanks!
> Stew
>
>
>
> On 19-Dec-09, at 11:57 AM, Stewart Lord wrote:
>
>> stewartlord Sat, 19 Dec 2009 19:57:58 +0000
>>
>> Revision:
>> http://svn.php.net/viewvc?view=revision&revision=292336
>>
>> Log:
>> Implemented search auto-complete.
>>
>> The auto-completing search feature uses the popular
>> jquery.autocomplete plugin:
>>
>> http://docs.jquery.com/Plugins/Autocomplete
>>
>> The auto-complete data set is held client-side. This
>> incurs one http request to load the search index when
>> the page is loaded (via jQuery.getScript()), thereby
>> avoiding additional requests as the user types in the
>> search field. This makes the auto-complete feature
>> very responsive.
>>
>> The search index file defines a 'searchIndex' array
>> containing the name and page (filename) of each entry
>> in the manual. The file is 382 KB uncompressed. Gzip
>> compression (via the cli) reduces this to 53 KB. Proper
>> configuration of server-side compression and expire
>> headers should make this download relatively painless.
>>
>> The search index file resides under the js folder
>> and is named: 'search-index-<lang>.js'. There is only
>> one index file at this time ('en') and it was manually
>> generated.
>>
>> The auto-complete feature has one major short-coming;
>> the results are not sorted/ranked by relevance. This
>> will required modification of the auto-complete
>> plugin or a server-side suggest script to overcome.
>>
>> Changed paths:
>> U web/php/branches/PROTOTYPE_2010/css/structure.css
>> U web/php/branches/PROTOTYPE_2010/css/theme.css
>> U web/php/branches/PROTOTYPE_2010/index.html
>> U web/php/branches/PROTOTYPE_2010/js/common.js
>> A web/php/branches/PROTOTYPE_2010/js/jquery.autocomplete.pack.js
>> A web/php/branches/PROTOTYPE_2010/js/search-index-en.js
>>
>> <diffs exceeded maximum size>
>> --
>> PHP Webmaster List Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> --
> PHP Webmaster List Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>