Uncategorized

Google Module: WordPress Search

After I made up the terms “inward/outward aggregating”, Tim Lauer expounded on possibilities for his school to use Google Personalized Home page.

After looking at the ever-expanding collection of Google Modules, seeing they are just little (or not so little) chunks of XML, I began getting the urge to tinker, to see how complicated it would be to write my own GM.

I started with a scan of Google’s thorough Homepage API – Developer Docs, which showed that a Hello World example was easy, and things grew incrementally, then geometrically more complex form there. But not so bad.

So thinking about what might be semi-useful, I aimed for a module that would allow me to quickly do a keyword search on any WordPress blog, but most likely my own. This is pretty easy to do, and I have already created a tool for doing this via a browser bookmarklet.

The concept is pretty simple, if you are searching for the keywords moon cheese on Wallace’s WP blog at (this is a fake URL) http://www.wallace.co.uk/blog/, the correct URL to construct to create this search is simple http://www.wallace.co.uk/blog/index.php?s=moon+cheese.

It took a bit more tinkering than I thought, and the visual display is plain, but in use the Module looks like:

Gm Wp1

The default settings are to search this blog (handy for me, eh?). So from this module, I would click “go” and get the same results as a search from my blog sidebar.

But wait, there is more. If I click “edit”, I can change the preferences to ones where I can make it search another WP blog, for example, Alec Courous’s blog:

Gm Wp3

And once I save it, my Google home page is a quick search for Alec’s blog:

Gm Wp4

You can find my new Google Module at:
http://cogdogblog.com/alan/wp_search.xml

and it is as simple as:

 

   
  
   
 
 
     



     ]]>
   

This is just a quick dip into the coding pool. It is dependent on getting the blog URL correct (must end in the trailing “/”) of the blog home. It failed to work on D’Arcy Norman’ site (maybe something to do with his Livesearch query method). It would be even better to have it allow me to create a list of WP blogs that I could choose one with a radio button to direct the search.

Again, this was a project born of Idle Curiosity. It has some use, as I prefer to search my blog without having to load the entire home page juts to get to a single form.

But this is pretty simple (way below “rocket science”, it is as complex as “jello science” or “top ramen science”), and there is a rich amount of complexity built into this system that could allow creation of some fascinating tools, and truly is Small Technologies Loosely Joined (by XML), and pulled together by some Googly AJAX. It’s something I will keep in my hat as I think of other ways to provide these plug and play web tool-ets.

If this kind of stuff has value, please support me by tossing a one time PayPal kibble or monthly on Patreon
Become a patron at Patreon!
Profile Picture for CogDog The Blog
An early 90s builder of web stuff and blogging Alan Levine barks at CogDogBlog.com on web storytelling (#ds106 #4life), photography, bending WordPress, and serendipity in the infinite internet river. He thinks it's weird to write about himself in the third person. And he is 100% into the Fediverse (or tells himself so) Tooting as @cogdog@cosocial.ca

Comments

  1. Sounds oddly like Scott’s OPML search gizmo… Feed it an OPML and let you search any of the blogs listed?

    I’ve got no idea why my search failed – you’re probably right that it’s part of the AJAXish search, but that shouldn’t bork the plain vanilla search though…

Comments are closed.