Moveable Type Google Hack

|

I've added a little hack onto the list of links beneath each post on this site: the "Google!" link will take you to a Google search of vaguely related items (depending on how well I composed the query for that entry.) Even if I didn't compose a specific query, it will attempt one based on the title of the post (as is the case with this one.)

It's not an original concept, but since it's neat and my particular implementation might be useful to other PHP/MT users, here's the relevant code:

| <a href="http://www.google.com/search?hl=en&q=<? if("<MTEntryExcerpt
encode_php="qq">") {
echo urlencode("<MTEntryExcerpt encode_php="qq">") ;
} else {
echo urlencode("<MTEntryTitle encode_php="qq">");
}; ?>">Google!</a>

Archives

About this Entry

This page contains a single entry by Tom published on April 20, 2002 3:30 PM.

At Harvard, an A means "Average" was the previous entry in this blog.

New York Earthquake is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.