Andornot Consulting Inc.
Home Page
Home Page
 |  | 

Wednesday, April 30, 2008

Empty the inbox faster in Outlook

Some great tips for getting things done faster in Outlook, from Lifehacker: http://lifehacker.com/381966/tweak-microsoft-outlook-to-empty-your-inbox-faster.

image

I implemented (and love) the Alt+2 keyboard shortcut to file inbox messages to other folders. I'm recouping valuable seconds per day here!

Tuesday, April 29, 2008

Creating Inmagic iGoogle Gadgets

Last week Google announced a developer sandbox for iGoogle and an updated website to help developers build and distribute gadgets.

According to Google there are now tens of millions of iGoogle accounts worldwide. I have used one for a while now as it allows me to login to my account from any PC and get access to my bookmarks, and the latest postings from selected news and professional blogs.iGoogle

I'd already been experimenting with creating an iGoogle gadget to search Inmagic databases, and the updated developer site provided just the push we needed to get a prototype working. The page above shows two search box gadiGoogle2gets on one of my iGoogle pages.You can test adding one to your own iGoogle page from our WebPublisher Links search screen. 

We already have our first client who wants to have this implemented on their site. Many of their users have iGoogle accounts and this is a great way of making searches easy and convenient rather than expecting the user to navigate to the library OPAC each time. 

The iGoogle Gadget Editor is not as obvious as it could be, so we still have to work out the best way to publish gadgets and make them accessible through the iGoogle  directory. I believe the trend to personalized pages will continue, whether it be through iGoogle, or gadgets or widgets for other services. Therefore this is definitely functionality we will be working on more as time permits.  It's also fun and exciting to be able to create these gadgets to work with Inmagic software!

Tuesday, April 22, 2008

Webpublisher search within search

I made a working search-within-search for Inmagic Webpublisher a few months back, with the help of the wonderful mootools javascript framework, which makes object-oriented javascript easy. And fun!

Overview

The results page has a 'search within results' textbox. Search text entered there is combined with the initial search to create a brand new query.

The initial search form is serialized to a cookie, or, if the user came to the results via a GET request (canned query), the query string is parsed.

The script in action

The method which serializes a search form looks like this. Four lines: nice and neat.

   1: function SaveQuery(formObject)
   2: {
   3:     var oForm = formObject;
   4:     if (!oForm)
   5:     {
   6:         oForm = document.forms[0];
   7:     }
   8:     var formQuery = decodeURIComponent($(oForm).toQueryString());
   9:     var oQuery = new WebPublisherQuery(formQuery);
  10:     oQuery.saveToCookie(oQuery.cookieName(), {path: "/"});
  11: }

The method that handles the 'search within results' on the results page goes like this. It's a little longer to handle cookie/no-cookie, but still pretty easy to follow.

   1: function Subsearch(searchText, textbase)
   2: {
   3:     var oQuery = new WebPublisherQuery();
   4:     var isCookie = oQuery.loadFromCookie(textbase + "QueryTracker");
   5:     if (isCookie == false)
   6:     {
   7:         if (window.location.search == "")
   8:         {
   9:             return false;    
  10:         }
  11:         var windowQuery = decodeURIComponent(window.location.search.substr(1));
  12:         oQuery.loadFromQuery(windowQuery);
  13:     }
  14:     var subquery = new WebPublisherQueryGroup(searchText, {fields: oQuery.getFields()});
  15:     oQuery.addSubquery(subquery);
  16:     oQuery.saveToCookie(oQuery.cookieName(), {path: "/"});
  17:     
  18:     var query = oQuery.toQueryString();
  19:     var rawUrl = window.location.href.indexOf("?") == -1 ? window.location.href : window.location.href.substring(0, window.location.href.indexOf("?")); 
  20:     window.location.href = rawUrl + query;
  21: }

Of course the real power is in the WebpublisherQuery object, which is a javascript class that does all the heavy lifting.

As with all our Webpublisher scripts, this one is released under an open source MIT license. No documentation. The mootools framework is included in the file.

Download the beta: AndornotUtilities_Subquery_0_2.js

I appreciate any feedback, bug reports, etc. We can also assist with implementation if required; contact us at: info@andornot.com.

Tuesday, April 15, 2008

Adding "Google Book Search" information to catalog records

A couple of weeks ago Google released a Book Viewability API for Google Book Search. I'm always looking for ways to enhance the usefulness of library catalogs so of course I had to give it a try! Google offers 3 ways to set this up. I looked at Sample 1: Using a Callback to Determine Viewability and figured that would be pretty easy to implement using raw HTML in the Inmagic DB/TextWorks form designer and wrapping the ISBN with the supplied code. First I pasted the script code from the Google site into the Head tag under Form Properties. I wrapped the ISBN field with beginning and ending text as instructed. Then I added a box to initiate the search by adding the ISBN again and wrapping it again with different beginning and ending text to send the request to the Google Books search server. I was delighted that in 10 minutes I had created a form that checked Google Book Search as the page loaded and if a match was found, it displayed the link to Preview in Google Book Search. Unfortunately after announcing my success to my colleagues I was disappointed to find that this does not work in IE6 and is unreliable in IE7 and Firefox. As Peter puts it: "IE6 is having trouble parsing things synchronously. The API returns a JSON (Javascript Object Notation) object which calls the function ProcessGBSBookInfo() when it is written into the page. The browser is supposed to wait until the external script resource is loaded before parsing said contents and moving on past the closing script tag. IE6 is not doing this consistently. Notice sometimes you can refresh the page and the preview link will appear. Such is life with older browsers and synchronous javascript-driven page updates. Although the sample you chose to implement seems the most straightforward, you can see now why there are reasons for going with more complicated options: AJAX options would be asynchronous and would avoid this type of issue, for instance, but at the cost of more up-front scripting." You can check out my test page. Click on the link for Google Book Search which is a canned search of records in this test database with ISBN's - hopefully you will see some links to Preview in Google from the full displays. These can include the cover image, table of contents and chapter excerpts and would be very useful for users evaluating a title. Anyone wanting more background might want to listen to the Library 2.0 Gang podcast. I guess we'll have to wait till we have time to test the AJAX methodology before we suggest clients implement this. In the meantime if anyone would like us to push this higher on our development schedule, please let us know!

Monday, April 14, 2008

Notepad++ replacement for Notepad

I've always been a fan of Notepad2 as a replacement for Notepad. I spend a fair bit of time editing Inmagic Genie XML config files and the features like line numbers and XML syntax highlighting make this so much easier. However I've just switched to Notepad++ which allows multiple documents to be open in tabs. As I usually have at least 3 or 4 config files open at once, this in itself is a great time saver. Notepad++ also includes plug-ins for tools like HTML Tidy with an option to clean up the junk that Microsoft embeds when saving a Word doc to HTML. There is a file compare option - useful when reviewing Genie config files from a client to see what they have changed, plus there are a stack of other options that I haven't even looked at yet! Notepad++ is open source software and is available for download from Sourceforge.net. There is also a version available that runs from a USB stick at PortableApps.com.