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: Date: Wed, 23 Dec 2009 20:30:38 +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 3 4 5 6 7  Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-6829@lists.php.net to get a copy of this message
On Wed, Dec 23, 2009 at 5:24 PM, Stewart Lord <stewey@ambitious.ca> wrote: > On 23-Dec-09, at 2:51 AM, Paul Dragoonis wrote: > > Hi Stewart. >> >> Your solution would be to do the following. >> >> jQuery.getScript("js/search-index-" + getLanguage() + ".js", >> function(){ >> $('#headsearch-keywords').autocomplete(searchIndex, { >> matchContains: true, >> scrollHeight: 240, >> formatItem: function(item) { >> return item.name; >> } >> }).result( >> function(event, item){ >> $.post('score.php', {itemid: item.id, itemname: item.name >> }); >> } >> ); >> }); >> >> This will be stored in the database. That means when you're obtaining >> your information via javascript (initially) - You perform a "ORDER BY >> score DESC" so that the most popular scored results come first in the >> list. >> > > > Hi Paul, > > Thanks for your suggestion. Actually, what I am trying to do is implement > scoring (entirely) client-side. The scoring itself isn't too hard to do. I'm > having trouble hooking into the autocomplete plugin without modifying its > source. Not sure if that's going to be possible though. > > Stew > Hi Stew. I see that you're now trying to do it client-side. I thought we were doing some server side stuff too. Can you show me your source code, or point me to the file/line in the repository code that performs the client-side scoring. If you have existing source, I can see more thoroughly what you're trying to do and then modify the jquery plugins API. Cheers. Paul Dragoonis

« previous php.webmaster (#6829) next »