I am a bit amazed I never thought of this earlier… the primary use for CogDogBlog is pure selfish- tracking things or projects so I can have a record I can find later. More often than not, i am trying to remember a site or reference from a few months/years back, and the only way to look for it is go to my, ahem, overloaded main page, and using the search form.

But in the last 15 minutes, I wrote a quick little JavaScript that allows me to do a quick search and bypass the main page. Actually I ripped it pretty much from the Google Browser Buttons, which does a quick Google search on any highlighted text for a page in view, or if no text is selected, provides a pop up box to type in the search words. A dull beam of light said tonight– “hey, I could do that for my MovableType Blog!”

So here it is, just drag the link to your browser toolbar, and you have direct search to CDB:

Want to roll your own? You just need to create an empty bookmark/favorite, copy the code below, and make appropriate edits to personalize it.

with 3 edits needed shown in bold:

[1] Customize the name of your blog for the pop up keyword entry
[2] Customize the URL for your MT search script
[3} Customize the database ID number for your blog for the value of IncludeBlogs

If you are unsure of the values for [2] and [3]. just look at the URL produced by any search performed from the normal MT search form.

Your mileage may vary, but this will save me a few steps from searching my own blog.

For that matter, you can also exploit knowledge of the URL produced by search results to create links within your blogs to key words that are not necessarily your predefined categories. For example, I can easily add links if I wished to, say a collection to mythical entities (there is a poor joke in this):

Knowing how to pick apart search URLs opens up all kinds of doors…. never be afraid to dissect a URL.

The post "MT Blog Search Bookmarklet" was originally scraped from the bottom of the pickel barrel at CogDogBlog (http://cogdogblog.com/2004/12/mt-blog/) on December 5, 2004.

Comments are closed.