keyword searching
A lot of people have been creating bookmarklets and toolbars and that's great, but they usually only work in IE only. So here's a technique for Mozilla users: Custom keyword searches. It's best to illustrate with an example, so if i want to search "guns n roses lyrics" on Google, I just type:
gg guns n roses lyrics
in the location bar. Simple. And it doesn't use any toolbar real estate that custom toolbars or bookmarklet links would. It's a great feature for power users and you linux dudes who love command line interfaces.
To create these custom keywords, from the bookmark manager, create a new bookmark and enter the name and location. See the list below for samples. Unfortunately, when you create a new bookmark, it doesn't let you enter a keyword. To associate the keyword, choose Edit | Properties and add it there. Here's a screenshot of what my Google bookmark properties looks like. This should give you an idea if you're confused or haven't explained it properly.
Keywords I've got setup as well as examples of use:
Name: Google
Location: http://www.google.com/search?q=%s
Keyword: gg
Example: gg guns n roses lyrics
Name: Google Groups
Location: http://groups.google.com/groups?q=%s
Keyword: gs
Example: gs mozilla performance
Name: Amazon.com
Location: http://www.amazon.com/exec/obidos/external-search/?index=blended&keyword=%s
Keyword: az
Example: az lateralus
Name: Domain WHOIS
Location: http://www.netsol.com/cgi-bin/whois/whois?SearchType=do&STRING=%s
Keyword: whois
Example: whois microsoft.com
Name: IMDB
Location: http://us.imdb.com/Find?for=%s
Keyword: imdb
Example: imdb ben kingsley
Name: SNPP
Location: http://www.snpp.com/cgi-bin/AT-Simpsons_Archivesearch.cgi?search=%s
Keyword: snpp
Example: snpp i found a moon rock in my nose
(i quote a lot of Simpsons)
Name: Dictionary.com
Location: http://www.dictionary.com/cgi-bin/dict.pl?term=%s
Keyword: dc
Example: dc vapid
Name: Roget's Thesaurus
Location: http://www.thesaurus.com/cgi-bin/search?config=roget&words=%s
Keyword: ts
Example: ts obsequious
Name: w3 Validator
Location: http://validator.w3.org/check?uri=%s
Keyword: w3
Example: w3 http://www.deftone.com/blogzilla/
So to create your own, you just have to lookup how the search/lookup works and replace your search term with %s in the bookmark. As you can tell, this is very customizable and you can create one for whatever site you use most. Hope this was helpful.
Comments
Great post, thanks for the info, i alwayse love getting to noe all those hidden functions in mozilla, they make it better and better!
Funny...I wrote some bookmarklets but they only work in Mozilla for some reason...IE kept erroring on "getElementByTagName()". Oh well....:-)
There is no such thing as getElementByTagName(). However, there is getElementsByTagName() which creates an array from desired elements. :-P
I know it's not mozilla related, but thought I'd mention that galeon (http://galeon.sf.net) 1.1.x has the ability to add these types of bookmarks automatically by just bookmarking a (special) link. Hit http://galeon.sourceforge.net/bookmarks/ for info and smartbookmarks to download/install.
For those who don't know, galeon is a mozilla based browser for GNOME under Linux.
another one I forgot to mention:
Name: php.net
Location: http://www.php.net/manual-lookup.php?pattern=%s
Keyword: php
Example: php xslt
Are you kidding me? The link for the popup screenshot works in IE but not the build of Mozilla I'm running!
the popup screenshot works fine for me. i only have onload popups disabled, not all. have you disabled all popups?
if your user prefs file (prefs.js) has the line:
user_pref("capability.policy.default.Window.open", "noAccess");
that means all popups are disabled. but if you have the line:
user_pref("dom.disable_open_during_load", true);
then no onload popups/popunders will open. although if you want to disable popups, it's recommended you go Edit|Preferences|Advanced|Scripts & Windows and uncheck "Open unrequested windows" instead of hacking the prefs.js file.
One problem I've had with bookmarklets is that they keep getting truncated if they're long (I think 255 characters is the longest allowed). My Movable Type bookmarklets are among those affected by this annoyance. Does the same thing happen with these keywords?
I'm running 0.9.8+ (Mac) right now, and it doesn't seem to have gotten any better.
In any case, this looks quite tasty, and I can't wait to try it out.
Google Image Search:
http://images.google.com/images?q=%s
how do I work do I work out the search string for a site? i.e. www.encyclopedia.com ?
Name: encyclopedia.com
URL: http://www.encyclopedia.com/searchpool.asp?target=%s
Keyword: enc (or whatever you would like)
www.zvab.com (biggest German seller for used books).
www.abebooks.de (another seller of used books).
www.ebay.de (you can easily change it to ebay.com)
Internet Explorer also has this ability, granted it needs an undocumented, unsupported utility to do so.
http://www.microsoft.com/windows/ie/previous/webaccess/ie5wa.asp
It says it only works for ie5, but I migrated up to six, and everythings kosher. I even added a gg for google when I stumbled across this page, although I usually use the toolbar.
Name: www.abebooks.de
URL:http://cgi.zvab.com/SESS143819253611071665381100017/cgi-bin/search.cgi?lo=gr2&lang=de&term=%s
Name: www.zvab.com
URL:http://cgi.zvab.com/SESS143819253611071665381100017/cgi-bin/search.cgi?lo=gr2&lang=de&term=%s
Name: www.ebay.de (can easily be changed to ebay.com)
URL:http://search.ebay.de/search/search.dll?MfcISAPICommand=GetResult&ht=1&shortcut=4&SortProperty=MetaEndSort&maxRecordsPerPage=50&st=2&query=%s
To search for rpms on rpmfind.net:
http://www.rpmfind.net/linux/rpm2html/search.php?query=%s
Hello,
I noticed that you point out good resources to your users at http://www.deftone.com/blogzilla/archives/keyword_searching.html that talk about checking whois results and domain names. I would appreciate if you would point out www.WhoisReport.com. This domain name search engine is a great research tool. There are some cool new few features on the site that can't be found anywhere else. So I think it is worth your time to take a look at it and let your readers know about it.
Thanks!
Name: Altavista
Location: http://www.altavista.com/sites/search/web?q=%s
Keyword: av
Example: av mame emulator
Is there any way to use Keyword search to make a shortcut for a word or phrase that is not part of a URL? For instance, I'd like to have a keyword 'dl' for download so that I can type 'dl program_name' and get a search using my default search engine (Google) of 'download program_name'. I admit, I'm bone-lazy.
Use something like this for w3 validator (to check a page you're on): "javascript:window.document.location='http://validator.w3.org/check?uri='+window.document.location;"
To Ed Biow, try this:
http://www.google.com/search?q=download+%s
Save that as a bookmark, and bind it to 'dl', then you can just type 'dl open office' and it will query Google with the query 'download open office.' hth...
Merriam-Webster:
http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=%s
http://www.m-w.com/cgi-bin/dictionary?book=Thesaurus&va=%s
For some sites, like MapQuest, you need multivariable queries like
http://www.mapquest.com/maps/map.adp?country=&address=%s1&city=%s2&state=%s3&zipcode=%s4
For those, you can use grayrest's javascript function at
http://grayrest.com/moz/resources/bookmarks.shtml
I tried to figure out how to do an artist search on www.allmusic.com but no luck. Can anyone help me out with this one?
maps.yahoo.com via google:
name: maps
URL: http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=%s&btnI=I'm+Feeling+Lucky
keyword: mm
example: mm 20 Oxford St Cambridge MA
to mr_cleen:
Here are the bookmarks:
name: allmusic artists
location: http://www.allmusic.com/cg/amg.dll?P=amg&sql=%s&x=16&y=12&opt1=1
keyword: ar
example: ar stewart
name: allmusic albums
location: http://www.allmusic.com/cg/amg.dll?P=amg&sql=%s&x=16&y=12&opt1=2
keyword: al
example: al beatles
name: allmusic songs
location: http://www.allmusic.com/cg/amg.dll?P=amg&sql=%s&x=16&y=12&opt1=3
keyword: so
example: so roses
name: allmusic styles
location: http://www.allmusic.com/cg/amg.dll?P=amg&sql=%s&x=16&y=12&opt1=5
keyword: st
example: st hip
name: allmusic labels
location: http://www.allmusic.com/cg/amg.dll?P=amg&sql=%s&x=16&y=12&opt1=4
keyword: la
example: la hip
DOM inspector is very useful, lets bow to mozilla :)
Cheers
I use two keywords that are quite helpful over at the MozillaZine Forums. The first is a search for all posts since last visit (keyword: mz new). The second is a search for your posts, or mine as it were (keyword: mz ego).
have you seen this keywords optimization site:
http://www.discoverkeywords.com
I found a tool that creates mispellings for you!
This helps you target Google searchers who have typos!
http://www.keywordsfinder.com
I put all the keywords that I use on my wiki at http://www.wormus.com/leakytap/Internet/CustomKeywords.
I'm trying to put as many references to Custom Keywords there to provide plenty of reference material for visitors.
Feel free to contribute!
How about quick translations using Google? Here's Spanish to English:
http://translate.google.com/translate?u=%s&langpair=es%7Cen&hl=en&ie=UTF-8&oe=UTF-8&prev=%2Flanguage_tools
Change langpair=XX to your desired source language:
fr French
es Spanish
it Italian
ge German
Reverse langpair=XX and hl=XX to change the direction.
Oops - forgot to mention that for this to work, you need to modify the source site's url a bit:
a) leave off the http://
b) ignore the trailing /, if any
Post a Comment
This discussion has been closed.