Archives for January 2006

Toolbar Beta 4

Google has just opened the beta test of Toolbar version 4. Here’s my take on it:

– Suggestions as you type. You’ll either love this or it will leave you cold. As far as I can tell, it’s just some deep personality test, like whether you’re an Elvis person or a Beatles person. Personally, showing suggestions as you type tends to distract me. But then, I get distracted by shiny metal objects from time to time. 🙂

– Send web pages via email (or blog, or SMS). This is very useful. I often find myself wanted to email a snapshot of a whole web page, pictures and all, to someone. I even installed a third-party extension in Firefox to do something similar a while back. It didn’t work though.

– Server-side bookmarks. This is really handy. You can have the same set of bookmarks on your work computer, laptop, and home computer.

– Custom buttons. I have to admit, this is my favorite feature. It’s almost enough to pull me back to Internet Explorer.

So what’s a custom button? It’s a little piece of easy-to-write XML code that lets you quickly add a custom button to your toolbar. Imagine that you want a whois button, for example, that lets you select a domain name and click to run a Whois search on whois.sc.

Damn! Those fiends on the toolbar team have made it even easier to use! I was all excited reading through the API and dreaming about writing the definitive post on how to craft the XML for a toolbar button. But there’s a trick that makes it so you don’t even have to write any code!

Let’s take building a custom whois button for whois.sc as an example. Go to http://www.whois.sc and right-click on the search box, then select “Generate Custom Search…” Here’s what it looks like:

Generate Custom Search...

That’s all you have to do–no XML or code required! The toolbar will even grab the favicon from the site so you can tell your buttons apart. Now let’s see how easy it is to use. Suppose I do a search for [flowers] and I want to run a whois query on a domain that I see. I use the mouse to select ftd.com or www.ftd.com and just click my new Whois button. Here’s what it looks like just before I click my whois button (it’s the red square two icons to the right of the search box):

Selecting www.ftd.com

And when I click the button, I get delivered to a page showing whois info for FTD on whois.sc.

I’m sorry, but I have to say that as a geek, that’s just a lot of fun. Here’s a few questions and answers about making buttons.

Q: I’m assuming that there’s some code or XML I could edit myself?
A: Ah, now we’re into the fun stuff. On the toolbar, click on “Settings”, then the “Buttons” tab. Click on “whois” and then “Edit…” and then finally “Use the advanced editor…” to see the button in all its XML glory. It’s only a few lines and the syntax is pretty clear, but you can also find out more info about how to make a custom button from the Google Toolbar button API page. There’s also a toolbar button gallery with lots of examples.

Q: I’m a whois expert and I noticed that you selected the text “www.ftd.com” instead of “ftd.com”. Why did it still work?
A: The custom button did a search for “www.ftd.com” on whois.sc. Luckily, whois.sc is smart enough to just pull out the domain name ftd.com and use that for a search.

Q: If I selected the text “www.ftd.com/” would it still work?
A: It all depends on what the destination site supports with its search box. whois.sc doesn’t like if you include a ‘/’ in your query. I’m sure the smart folks over at whois.sc will make it so that their search will support queries with ‘/’ though. Hint, hint. 😉

Q: But what if I wanted to get whois for whatever domain my browser is currently on? I’m much too lazy to click and select text with my mouse!!
A: I’m lazy too. Let me help. If you edit your button, there’s a syntax called “<site>” which says where the button should go if there is no new text in the search box. By default after using the right-click method to create my whois button, the value for <site> looked like this:

<site>http://www.whois.sc/</site>

which means that if you click the whois button with no text selected, it just goes to the root page of whois.sc. After digging through the API documentation for 3-4 minutes, I changed it to

<site>http://www.whois.sc/name-spinner/?q={url.host}</site>

Now imagine my browser is on www.ftd.com without any text selected or any text in the search box. When I click my whois button, it goes to the url found in <site> and at the same time fills in url.host with the host that the browser is on, namely “www.ftd.com”. As we’ve seen, whois.sc is smart enough to handle that. The net result is that if you don’t select any text, our whois button will fall back to doing a whois search for whatever host your browser is currently on. Neat, huh?

Q: Can I have your whois button? I’d like to look at the source code and play with it.
A: It’s just XML, but sure! The button is at http://www.mattcutts.com/files/whois-button.xml . I would quote it on the blog, but WordPress does some funky escaping of quotes and such, so I’d rather just point you to the raw file. If you would like to install my little whois button in your own Google Toolbar, clicking on this url should add install my whois button: http://toolbar.google.com/buttons/add?url=http://www.mattcutts.com/files/whois-button.xml .

You can also do some really neat things with RSS feeds. You can create drop-downs. You can send POSTs instead of GETs. You can send the browser’s current url (escaped or unescaped). You can modify your button’s icon or tooltips dynamically. There’s also an intriguing <option> field that lets users specify their own parameters (e.g. a zip code), which can then be sent to any url when the button is clicked. And if you’re going to make a professional button, there’s fields like <update> that you can set so that your button will update, and you can use <locale> to provide text in different languages.

But I gotta catch some sleep, so that’s enough for now. I’m sure other people will check out the shared bookmarks or the ability to email a page to friends, but I’m all about the custom buttons. Feast your brain on the button documentation, and I hope that people will post links to some neat buttons in the comments!

Update: I picked whois.sc as an example in the first place because it lets you throw in a hostname and it will do the intelligent thing and run a whois for that domain. Looks like the smart folks at whois.sc are changing their search to let you throw just about anything in, which makes my whois button work better without any work on my part. 🙂

Ask getting more international

(Throwing up an old post. Why don’t I throw them out when they’re hot off the pixel presses? I dunno. Sometimes I forget to post stuff.)

This post on the Ask Jeeves blog mentions some neat new translation and definition features on Ask. The post is interesting to me because Ask mentions that previously they didn’t have as many international pages. When I’d compared results in the past, I’d noticed that Ask had fewer international results. Sounds like they’re going to tackle the “ümläüt market” more in 2006. It’s good that Äsk is adding more international pages and plans to grow its staff by 20% next year.

The thing that I like about the search engine market today is that there are so many smart people working on different ideas. That bodes well for users in 2006.

(By the way, Åsk just rolled out a German version of their search. Good for you, Ask.)

css.php