Notices


Reply
Thread Tools
evad's Avatar
Posts: 354 | Thanked: 151 times | Joined on Mar 2008 @ London (UK) / Zielona Góra (PL)
#11
Originally Posted by Viqsi View Post
Well, my webserver's upstream is being a PITA, and I was feeling especially perverse earlier today, so I ended up making a Javascript version of this concept. The advantage is that this is local to the n900, so you can still search Google even if these other services are down.
That's very neat solution. Thanks for sharing!
__________________
Dawid 'evad' Lorenz * http://dawid.lorenz.co
_______________________________________________
 
TomJ's Avatar
Posts: 505 | Thanked: 665 times | Joined on Oct 2009
#12
Originally Posted by Viqsi View Post
Getting the necessary URLs for said keywords is left as an exercise for the reader... unless you ask really really nicely.

Hope this helps!
It does indeed help. However, I wonder whether you casn help with a specific site. The excellent traintimes.org.uk has a very simple, bookmarkable query system of the format http://traintimes.org.uk /london /leeds /10:00 /next-tuesday /16:00 /next-wednesday

However, using the url string http://traintimes.org.uk/%s in search.htm doesn't work terribly well, as putting, f'rinstance, london/leeds in as the search string passes http://traintimes.org.uk/london%F2leeds, and the site returns a 404 error. Anyone know how to work around that?
__________________
Want to know how to add public holidays to your device calendar? See the instructions wiki page.

Want to improve the location bar's search capabilities? there's a wiki page for that too...
 
Posts: 124 | Thanked: 10 times | Joined on Jan 2007 @ Italy
#13
thanks that's really usefull!!!

i've post this on my blog...
and here u can find more keywords as:

urls['qcic']='http://www.quellicheilcell.it/blog/?s=%s';
urls['wikiit']='http://it.wikipedia.org/wiki/Special:Search?search=%s';
urls['y']='http://it.search.yahoo.com/search?p=%s';
urls['fl']='http://www.flickr.com/search/?q=%s';
urls['yt']='http://www.youtube.com/results?search_query=%s';
urls['fb']='http://www.facebook.com/search/?q=%s';
urls['tw']='http://twitter.com/#search?q=%s';
urls['gim']='http://images.google.it/images?q=%s';
 
TomJ's Avatar
Posts: 505 | Thanked: 665 times | Joined on Oct 2009
#14
Originally Posted by TomJ View Post
It does indeed help. However, I wonder whether you casn help with a specific site. The excellent traintimes.org.uk has a very simple, bookmarkable query system of the format http://traintimes.org.uk /london /leeds /10:00 /next-tuesday /16:00 /next-wednesday

However, using the url string http://traintimes.org.uk/%s in search.htm doesn't work terribly well, as putting, f'rinstance, london/leeds in as the search string passes http://traintimes.org.uk/london%F2leeds, and the site returns a 404 error. Anyone know how to work around that?
Right, I've sorted it by simple expedient of inserting the line
Code:
redirUrl = redirUrl.replace(%2F","\/");
before the document location replace line.
__________________
Want to know how to add public holidays to your device calendar? See the instructions wiki page.

Want to improve the location bar's search capabilities? there's a wiki page for that too...
 
TomJ's Avatar
Posts: 505 | Thanked: 665 times | Joined on Oct 2009
#15
A little more testing shows I was only replacing the first slash. This:

Code:
redirUrl = redirUrl.replace(/%2F/g,"\/");
does the trick though.
__________________
Want to know how to add public holidays to your device calendar? See the instructions wiki page.

Want to improve the location bar's search capabilities? there's a wiki page for that too...
 
Posts: 124 | Thanked: 10 times | Joined on Jan 2007 @ Italy
#16
this trick can be also used to share links on any social network
try to add this command:

Code:
command['2fb']=’http://www.facebook.com/share.php?u=%s’;
then write on address bar: "2fb http://www.yourlink2share.ecc..." and voilà! :P

more command here!!
 
Viqsi's Avatar
Posts: 115 | Thanked: 136 times | Joined on Mar 2008 @ Central Ohio
#17
Since folks seem inclined to share search engine info, here's mine, adapted from the ones that I use with Opera on the desktop, plus one or two extras (I have a shortcut to the HTML file I use as a least-common-denominator bookmarks repository, for example).

Note that I vastly prefer single-character searches when possible, unless I'm experimenting with something new (such as the airport flight info search towards the bottom, which was added literally last night...). Also, there's probably a nicer, more polite way to do the eBay search, but I haven't experimented.

PHP Code:
// Google
urls['g']='http://www.google.com/search?hl=en&q=%s&btnG=Google+Search';
// eBay
urls['e']='http://search.ebay.com/search/search.dll?cgiurl=http%3A%2F%2Fcgi.ebay.com%2Fws%2F&krd=1&from=R8&MfcISAPICommand=GetResult&ht=1&SortProperty=MetaEndSort&query=%s';
// Internet Archive Wayback Machine (so you can prefix any given broken link with a "w " in the address bar...)
urls['w']='http://web.archive.org/archive_request_ng?collection=web&url=%s&Submit=Take+Me+Back';
// W3C Website Validator (same principle as the Wayback Machine)
urls['v']='http://validator.w3.org/check?uri=%s';
// Froogle
urls['f']='http://froogle.google.com/froogle?q=%s&sourceid=opera&num=%i&ie=utf-8&oe=utf-8';
// English Wikipedia
urls['p']='http://en.wikipedia.org/wiki/Special:Search?search=%s&go=Go';
// Internet Movie Database
urls['m']='http://www.imdb.com/find?s=all&q=%s';
// Google Image
urls['i']='http://images.google.com/images?q=%s&hl=en&btnG=Search+Images';
// GameFAQs.com
urls['q']='http://www.gamefaqs.com/search/index.html?game=%s&searchplatform=All+Platforms';
// Google "I'm Feeling Lucky"
urls['l']='http://www.google.com/search?hl=en&q=%s&btnI=Feeling+Lucky';
// hockeysfuture.com search
urls['hf']='http://hockeysfuture.craveonline.com/search.php?q=%s&imagefield.x=0&imagefield.y=0';
// Internet Hockey Database
urls['h']='http://www.hockeydb.com/ihdb/stats/findplayer.php?full_name=%s';
// Port Columbus International Airport Flight Number search (sometimes buggy - their website needs work)
urls['pcia']='http://www.port-columbus.com/flight/flight/search2.asp?filterby=number&info=%s&adi=A';
// shortcut to my personal bookmarks file - yes, the redirect works just fine without search parameters ;)
urls['hh']='file:///home/user/MyDocs/.bookmarks/index.html'
(Note: Despite the label at the top, this isn't actually PHP code; it's still JavaScript - but the PHP code bbcode tag makes it look a lot nicer.)
 
Viqsi's Avatar
Posts: 115 | Thanked: 136 times | Joined on Mar 2008 @ Central Ohio
#18
It always bothered me that this little script idea couldn't handle searches that require POST and won't listen to GET (see: forecaster.ca). In about two and a half years, though, I never got around to doing anything about that.

...UNTIL NOW.
(see attached)

(I'm actually using this setup on more than just the n900 now - my next step is to try to get it functioning as a "search provider" on my jailbroken iPad, which will no doubt drive me completely insane. Wish me luck! )


EDIT: Accidentally attached the wrong zip originally. This should be the right one. I blame the time of "day".
Attached Files
File Type: zip search-v2.zip (2.2 KB, 80 views)

Last edited by Viqsi; 2012-07-22 at 09:20.
 

The Following User Says Thank You to Viqsi For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:29.