Sunday, May 31, 2009

Widget tweaks

As you might have noticed, we've recently pushed out a new version of the widget. Notable changes:
  1. Improved sound feature.
  2. New default English text for online widgets.
  3. Widget is 30% of its original size, so it downloads even faster now.
  4. Widget has real-time presence, except in older versions of IE.
  5. Port 5280 no longer required for presence (good for restricted network environments).
To run these down in more detail...

1) Sound. The previous sound solution behaved a little sloppily if you wanted to have sound on by default, and the patron's browser did not have Flash installed. It displayed an error message in that case, and that looked cosmetically untidy in narrow widgets. The new sound solution is backed by jPlayer, a jQuery plugin, and doesn't display any error messages if Flash is not installed.

Sound-on-by-default is an option now in the Design Public Services wizard. If you prefer to do things by hand, it's explained here, in the widget customization section of our docs.

2) New default English text for online widgets. Formerly, this was, "Type here to chat." Now it is, "Type here to chat. Press ENTER to send." This change was made in response to usability tests done at a library testing LibraryH3lp a few months ago. They found that in their older demographic, pressing enter to send a message wasn't obvious to everyone. We hope this will help.

We'd love to expand this change to the non-English translations as well. So, if you know how to say, "Press enter to send" in Czech, French, Chinese, Spanish (Europe), Spanish (Puerto Rico), or Russian, drop us a line.

Now, this does mean that there is suddenly more text in that area. If your widget is really narrow and it doesn't look tidy, you can change the font size using CSS. The easiest way to do this is in the Design Public Services wizard area of the admin interface. Find the saved skin you're using for the widget in question, and paste something like the below in the Wicked CSS Hack area:

#msg {
font-size: 12px;
}

As long as we're talking about CSS tweaks, here is boilerplate CSS for changing font style attributes overall:
#recv, #msg {
font-family: tahoma, verdana;
font-size: 12px;
}
#header h1 {
font-size: 15 px;
font-family: tahoma, verdana;
}
3) Widget is about 1/3rd of its original download size, thanks in part to new libraries, such as the new sound library and Strophe, a BOSH library.

4) Widget has real-time presence in many browsers. This means that if a queue changes online/offline status while a patron is looking at its widget, the change will be immediate, rather than delayed by polling. (Note that polling is still required for the presence API -- we're only talking about presence on actual widgets here.)

Alas, despite heroic efforts, we could not make real-time widget presence work in IE6 or IE7. Well, we could make it work, but not without unintended consequences that outweighed the benefits.

5) All presence calls are now on port 80 (standard HTTP port). Previously, port 5280 was also in use, and this didn't work in a few circumstances, such as some locked-down public wireless networks.

Saturday, May 23, 2009

Server Migration Status Update

We're about 90% done with the migration to the new server platform now. Everything is installed and running except for some "minor" parts of the admin interface (like reports... because, well, you don't need to be running reports on a Saturday anyway). Chat, webchat, queues, gateways, and all the features you need to staff a service are all good.

But, we felt that we should post to explain some strangeness you might be seeing. It's possible to be logged in and see your gateways online, but a user visiting your web page might not see your widget, or might get notice that you're offline.

You see, what is going on right now is that there are two distinct libraryh3lp servers, the old and the new. Both are working, but they are not talking to each other. (The old server will not be part of the cluster, it's just going away.) So, if you're logged into one server and your user is on another, you'll miss each other. Which server you are logged into is just an accident of DNS caching. If you logged in early this morning before we threw the switch, your machine is talking to the old server, and no amount of logging out and in again will get it to talk to the new server, because of caching.

The way to fix this is to just log out of libraryh3lp at the end of your shift, forget about it, go home, and your computer will load the new values from the DNS servers tomorrow morning. It's that easy, it's just not immediate.

So that's where we stand right now. Because the new server is looking good, we'll be shutting down the old one sometime tonight, and once the DNS changes have had time to propagate throughout the internet, we'll all be running on the new server.

Wednesday, May 20, 2009

The time has come...

As many of you know, LibraryH3lp has been growing rapidly. This is great! It also means that we've fairly well outgrown our current single-server architecture.

Since the early planning stages, we knew that if LibraryH3lp became heavily-used, it would be best served by a multi-server setup, with clustering and load balancing. You can read all about it in our Code4Lib article. All of this planning means that we're ready to move, and we don't have to radically change too much code.

Now that it's summer, and with a US holiday weekend on the horizon, we feel that the stars are aligned. We'll begin the migration in earnest this weekend. This will represent the initial conversion to the new platform.

We always aim for minimal down-time around upgrades and maintenance windows, but this is a pretty big deal. We'll update our Twitter feed along the way to keep y'all posted. We apologize in advance for any outages along the way, and we'll do our best to keep them brief.

Saturday, May 9, 2009

Read-only permissions done

As mentioned in this post from last month, we've been working on read-only permissions for your users who aren't admins.

Often, in the course of running a service, your librarians might need to locate an earlier transcript. Or, maybe you want to give other people the ability to run reports and read transcripts for quality control and training purposes without also giving them the ability to delete things or to mess around with your queues and user assignments.

Your users now have read-only access to transcripts (Monitor Activity tab, Calendar page) and can run reports on ALL queues to which they are assigned. They can login at the regular admin page to do this work.

Enjoy!

Tuesday, May 5, 2009

Facebook App

We just completed our Facebook Application, with help from Cliff Landis from Valdosta State University (thanks, Cliff!).

As many of you know, the LibraryH3lp widget is composed mostly of JavaScript and runs in an iframe. Facebook does not allow iframes on Wall pages, and the space allocated to applications on Wall pages is pretty narrow to begin with. It's hard to follow a chat in a widget that is too small.

So, our application shows the Facebook user your library's online or offline status, using images you provide. If you're online, clicking the image takes the user to your widget. Your widget is on a Facebook Canvas page, where iframes are A-OK, and where the widget is nice and roomy.

Detailed documentation (larger view here), with abundant screen shots:



Brief instructions, for those that don't want to watch the detailed version above:
  1. Visit the app page.
  2. Click "Add to Page" button.
  3. Navigate to the Page in question.
  4. Click "Edit Page."
  5. Find "LibraryH3lp" app and click little pencil icon in top right
    corner. Pick Edit and then Allow.
  6. Provide queue URL for your widget (it can be fully customized) and
    online/offline images.
  7. Click to Allow Constant Authorization.
  8. App should be in your Boxes section now.
  9. Move to Wall tab if desired.
Now, if you really want your chat widget to be directly on your Wall page, you can still use a Meebo Me widget, but the user won't be able to tell if you're online or offline until they click. Meebo Me widgets are Flash applications. My wonderful colleague Chad Haefele long ago documented how to put Meebo Me widgets in Facebook. You can gateway Meebo Me widgets into LibraryH3lp queues.

With either approach, chat is one click away. Summary:
  1. With the LibraryH3lp app, the user can tell if you're online or offline with no clicking. If you're online, a click takes them to a separate page containing a nice big widget.
  2. With the Meebo Me widget, the user has to click to see if you're online or offline, but then they chat directly from the Wall tab. Caveat: requires Flash, and widgets on the Wall tab will be very narrow, which can make the chat harder to follow. It is also possible to place a Meebo Me widget in its own tab, such as "IM Your Library," where space is not so tight.
One more thing. Because the Facebook platform is really very locked down, we can only show visitors your presence on page load (no polling for presence changes). If you were online at their page load, and you go offline in the meantime, they'll see your newly-offline status on the widget page. If they try to chat anyway, they'll get "chat is offline" in response.

Enjoy!