Andornot Blog

Wednesday, April 30, 2008 9:59 AM

Empty the inbox faster in Outlook

by Peter Tyrrell

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 10:36 PM

Creating Inmagic iGoogle Gadgets

by Administrator

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 9:46 AM

Webpublisher search within search

by Peter Tyrrell

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.

 

Monday, April 21, 2008 3:15 PM

Andornot releases selected Inmagic WebPublisher PRO enhancement scripts under open source license

by Peter Tyrrell

Andornot is pleased to announce that many of our scripts for use with Inmagic WebPublisher PRO are now available under an MIT open source license. Anyone is now free to use reuse, redistribute, modify etc. these scripts as long as the following license text is retained.

Copyright (c) 2003-2008, Peter Tyrrell and Andornot Consulting Inc.

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

Neither the name "Peter Tyrrell" nor "Andornot Consulting Inc."
may be used to endorse or promote products derived from this software
without specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

Check out our demo site at http://ask.andornot.com and view source to get the path to these scripts for enhancing search and display pages. Calls to these scripts will need to be made from forms using either the Inmagic DB/Text or CS/Text Form Designer.

If you need assistance implementing these scripts, this can be arranged through a consulting contract with Andornot. Contact us for more information and pricing. Alternatively, many of our add-on products such as our Starter Kits include sample query screens and forms with the scripts already incorporated.

Tuesday, April 15, 2008 9:15 AM

Adding "Google Book Search" information to catalog records

by Administrator
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!

Month List