Mobile CWD v0.0000001 alpha

So after much messing around we’ve finally got a semi-decent mobile stylesheet for CWD web sites. For the moment we’ve only worked on getting mobile Safari to look right however now we’ve got a platform on which we can hack in support for other popular mobile browsers such as Opera Mobile.

Here are a few examples:

Print From My PC mobile edition
Print From My PC mobile edition
Gateway mobile editon
Gateway mobile editon

Only a few sites are working correctly at the moment, and there are a few other bugs that we need to iron out such as a flash that appears when some sites are loaded and some other funky quirks however we’ll do our best to fix these and ensure that future sites all work as expected from now on.

If anything is breaking monumentally please let me know, abilbie@lincoln.ac.uk. Thanks.

Some geo love

Mashing up single sign on and the CWD wasn’t enough. I’ve added to our Nucleus ‘location’ service some new geo APIs that will allow us to make location aware websites and applications.

There is both a server side version which can be called via cURL/file_get_contents/etc:

http://nucleus.online.lincoln.ac.uk/locations/geo/format/xml (your IP address)
http://nucleus.online.lincoln.ac.uk/locations/geo/format/xml?ip=86.6.170.144 (my current IP address)

(if you want JSON/JSONP/CSV then replace the format/xml with format/your choice)

and a JavaScript client side version:

http://nucleus.online.lincoln.ac.uk/locations/geojs (your IP address)
http://nucleus.online.lincoln.ac.uk/locations/geojs?ip=86.6.170.144 (my current IP address)

Both services return the following information:

  • which campus network the IP address is associated with (or ‘non’ if they aren’t using a campus network)
  • which campus they’re on (e.g. Brayford or Hull or ‘non’ if they aren’t on a campus)
  • the building (we can only do this currently for wired networks and some wireless networks)
  • the postcode of the building (where possible)
  • latitude and longitude (if the IP address isn’t on a University network then it uses the Maxmind GeoCity database)
  • the closest library to the library (GCW, Holbeach, Hull, or if they’re on a campus network, the Theology Reading Room)

So how does it work?

I’ve collected a huge list of IP ranges for the wired and wireless networks at the University and then I use the this function to loop over these ranges until it returns TRUE that an IP is in a range, or that it isn’t (i.e. they aren’t on a University network).

The ranges look like this:

$zones = array(
    'HBW'    => array(
        'network'=>'Holbeach wireless',
        'campus'=>'Holbeach',
        'postcode'=>'PE12 7PT',
        'building'=>'Minerva House',
        'latitude'=>'52.810004',
        'longitude'=>'0.01696'
    ),

If it results that an IP address is from a network then I’ve a simple multidimensional array for each network that contains the meta:

$zones = array(
'HBW'	=> array(
	'network'=>'Holbeach wireless',
	'campus'=>'Holbeach',
	'postcode'=>'PE12 7PT',
	'building'=>'Minerva House',
	'latitude'=>'52.810004',
	'longitude'=>'0.01696'
),
...

Finally it outputs in the required format (i.e. json/xml (server) or JavaScript (client)).

When mashed up with another Nucleus location API we could easily make a FourSquare like app that finds buildings around a location:

http://nucleus.online.lincoln.ac.uk/locations/buildings_near/format/xml?lat=53.228482&long=-0.547847&distance=0.5&limit=10

I’ll make sure that all of these location APIs are properly documented soon so people can go have fun with them. Also, none of these location APIs require any sort of authentication (though we are rate limiting so don’t try and kill our servers please!).

How to get Exchange 2003 and OS X Snow Leopard to play nice

At the University of Lincoln we are using Exchange 2003 without IMAP enabled for our email and calendar server.

Snow Leopard has fantastic Exchange integration…if you’re using Exchange 2007+ and until recently there hasn’t been a way (short of using Microsoft Entourage – yuck!) to get your email and calendars in a native program.

Until now!

Enter DavMail.

DavMail is a POP/IMAP/SMTP/Caldav/Carddav/LDAP exchange gateway allowing users to use any mail/calendar client (e.g. Thunderbird with Lightning or Apple iCal) with an Exchange server, even from the internet or behind a firewall through Outlook Web Access

Here are some instructions on how to get it setup for staff at University of Lincoln. For students, come September you’ll access your email through Google Mail which is already Snow Leopard friendly. Note these instructions will be similar for Linux users.

First download DavMail for OS X from http://sourceforge.net/projects/davmail/files/

Install the program and setup your settings like this:

DavMail settings

Note: the OWA (Exchange) URL should be: https://email.lincoln.ac.uk/exchange/

Email

Download and install Mozilla Thunderbird from http://www.mozillamessaging.com/en-US/thunderbird/

Setup a manual account with the following settings (click for larger images):

Obviously replace my credentials with yours.

Calendars

Open iCal Preferences, click accounts, then the + to create a new CalDav account.

Ensure the settings look like so:

Again replace my credentials with yours

The server path should read /principals/users/YOUR-NAME@lincoln.ac.uk

Address Book

I’ve not got address book set up yet but when I have I’ll post instructions here