https://bugzilla.wikimedia.org/show_bug.cgi?id=19956

--- Comment #3 from Ross <ross.bend...@gmail.com> 2011-09-29 23:48:50 UTC ---
Created attachment 9128
  --> https://bugzilla.wikimedia.org/attachment.cgi?id=9128
The source code for a working example

This is a problem made easy by Wikipedia's existing API. I have a working
example (modified after mobile.wikipedia.org) at
http://rossbender.com/temp/testwiki/ - try it on your mobile phone! See also my
personal site's example (a stripped down version):
http://rossbender.com/random/wikipedia/

The changes attached are minimal to the already existing page at
mobile.wikipedia.org. I'm using that as comparison instead of
en.m.wikipedia.org for simplicity's sake only--the changes would be similar
there. If you compare the HTML source from mobile.wikipedia.org with the source
attached that you will see I have only added 4 lines in the <head> (meta tag
for mobile compatibility, 1 link to an external stylesheet, and 2 links to
external Javascript files) and 1 line in the <body> (results div).

(Note that the wikiapi.php file is only necessary on my server because I cannot
do cross-domain XML requests in Javascript. So the wikiapi.php file simply
returns the results of the Wikipedia API results.)

I personally prefer the results being displayed as part of the page, but adding
the same effect to a dropdown box is not difficult using
http://jqueryui.com/demos/autocomplete/. For my own personal site I had
actually started with that but preferred to opt for the more simplistic
version.

I would be happy to help out with this where necessary. Autocomplete for search
engines nowadays is basically a must (read more on my thoughts here:
http://rossbender.com/2011/09/25/mobile-wikipedia-search/).

Let me know if there's anything more I can do to help. Thanks!

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to