Bibliolinks explained

In an earlier post I presented bibliolinks, a new blogger tool based on Google AJAX Search API. Now it’s time to explain how to install it in your Blogger blogs. You’ll have to modify your template in obscure and contorted ways, so be prepared and backup it before it’s too late! One more thing: this procedure works with my own template, on Firefox 2. I will not be held responsible of anything if you are not me, fiddling with my own template on my own setup. Even if you were me (and I am me, unless…) I wouldn’t bet on any accountability.

Aren’t you scared yet? Ready? There we go. First of all, you have to register for a Google AJAX Search API key here. Got it? Save it somewhere! (You can always regenerate it later; the key is calculated from the URL you input, in this case, you blog’s address.)

Now, edit your template and add this snippet just before your closing </head> tag:

<link href='http://www.google.com/uds/css/gsearch.css' rel='stylesheet' type='text/css'/>

We are not even close to finish yet! Save your template, click on the Expand Widget Templates box and look for some place to drop this code snippet:

<a class='bibliolink' expr:name='"bibliolink" + data:post.id' style='display:none;cursor:pointer;'>Bibliolink <span>&#9658;</span></a>

This should be located somewhere inside your post footer container (on my template, it’s a <div class='post-footer'> tag). I decided to put it inside an empty element denoting a third line of content for post footers, exactly here:

<p class='post-footer-line post-footer-line-3'/>

YMMV, of course. Now, only one more step: you have to provide a link for two scripts. The best place to do so is just before the closing </body> tag. This is the first script, for Google AJAX Search functions:

<script src='http://www.google.com/uds/api?file=uds.js&amp;v=1.0&key=YOUR_KEY_HERE' type='text/javascript'/>

Don’t forget to substitute YOUR_KEY_HERE by your own API key. Immediately next to that script, add this one:

<script language='Javascript' src='http://brucknerite.googlepages.com/bibliolinks.js' type='text/javascript'/>

Here you should use your own hosting for the code, since I’m using my own Google Page. Here is a link to an uncompressed (and, for now, uncommented) version of the code.

And that’s all for now!

Publicado por

Iván Rivera

Another instance of Homo sapiens.