Re: phpweb documentation search
| From: | Stewart Lord | Date: | Sat, 11 Dec 2010 17:51:15 +0000 |
| Subject: | Re: phpweb documentation search | ||
| References: | 1 2 3 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-9687@lists.php.net to get a copy of this message | ||
On 2010-12-11, at 3:24 AM, Hannes Magnússon wrote:
> Do you still have the code for it somewhere?
> I can't remember why we didn't actually implemented into current phpweb..
Almost lost it, but I grabbed it from a backup yesterday. Here it is:
http://pastebin.com/QKnUZUW5
We didn't implement it because it was supposed to be part of the redesign and we started to go
down the path of a JS only version.
> Which also probably look into doing iterative upgrades of the website,
> this "all or nothing" approach isn't working out..
Agreed! Unfortunately people just don't have much spare time :(
> Hang on. Are you talking about the searchbox on prototype.php.net?
> It has a minor problem with method searching, and should probably
> prioritize hits that start with the same letters (i.e. 'strp' should
> rank strpbrk, strpos, and strptime before graphme_, mb_, and
> iconv_strpos).
Nope. That version used a purely client-side function index (300kb .js file loaded into the
browser) and did not have support for scoring due to limitations in the jQuery autocomplete plugin
at the time.
> Other then that, it seems to work great.. Should we merge it to trunk?
It would need a bit of work. If we go the purely JS route, someone needs to look at the latest
autocomplete to see if it can support arbitrary sorting/scoring. I'm still a bit leery of
sending 300kb of JS to the client.
Alternatively it could be revised to use XHR to call the script I posted above. The CSS would need
to be revised to suit the existing design of PHP.net.
Hope that helps!
Stew