Author Archives: Steve

Convict Records of Australia

Are you the descendant of a convict?

Utilising just released data from the State Library of Queensland, I have put together a searchable database of the British Convict transportation register. Over 123,000 of the 160,000 convicts transported to Australia are in this database – check out your families Convict Records!

I have already found some interesting facts – Did You Know: 603 convicts carried the name John Smith – the most common name in the records?

Don’t miss the convict facts for all sorts of weird and interesting things.  Over time I will be adding information about the First Fleet, Second Fleet and Third Fleet, the lifestyle of convicts and more.

Did I mention its free?… Read more

Posted in Announcements | 5 Comments

jQuery Datepicker Ajax Request to Highlight Days from MySQL

With a bit of fiddling you can retrieve a bunch of dates in a given timespan from the database (or elsewhere) and make your jQuery UI Datepicker a bit more practical and informative.

A method within the Datepicker plugin called beforeShowDay can do the following magic:

  1. disable a given day from selection
  2. add a CSS class to a given day
  3. add a tooltip to a given day

Whilst it is probably a bit easier to make the ajax request itself using the beforeShowDay method, that puts us in the uncomfortable position of making 30+ ajax requests, one for every day displayed. If we are showing 2 months or the page has more than one datepicker, thats 60+ requests!

The better option is to make a single request onload, and an additional request whenever the month or year is changed.

The purpose of my implementation is to highlight days which have no due items in my Studiotime time management web software. This allows me to select a due date without worrying about whether I have other items already due on that day. You can just as easily check for other parameters relevant to your application – you need only adjust the sql query.

Lets start with the freeDays array and the onload javascript on the datepicker input.

So now we have a working method of requesting a php page on every page load and again every time the month or year selectors are changed. Lets have a look at how the PHP and MySQL script looks:

The CSS rule is as follows:

Disclaimer: I am no jQuery ninja and produced this tutorial by combining various other resources that I have linked to below. If you have any suggestions or improvements let everybody benefit by contributing to the comments below!

Notes:

  • I’m

Read more

Posted in jQuery | 18 Comments

Notes for Installing Symphony CMS on Ubuntu

Symphony CMS is relatively easy to install on a Ubuntu server.

Here are a couple of commands I issued on a clean Ubuntu install to get everthing I needed for Symphony CMS, including cloning the git archive.

Important notes:

  • I chose to make a symbolic link from /var/www to my user directory, to skip writing a new apache site-available file, however for production purposes I would suggest to write a new proper apache2 site configuration file
  • The default apache2 site-enabled file has “AllowOverride None” – this needs to be changed to “AllowOverride All” for mod_rewrite to work
  • The php5-xsl package is vital for XSLT to work!


sudo apt-get install git-core apache2 php5 mysql-server php5-mysql php5-xsl
## now that mysql is installed, create a database and database user and GRANT PRIVILEGES ##
sudo a2enmod rewrite
sudo vi /etc/apache2/sites-enabled/000-default (change AllowOverride None to AllowOverride All)
sudo /etc/init.d/apache2 restart
cd /home/steve
mkdir symphony-cms
cd symphony-cms
git clone git://github.com/symphonycms/symphony-2.git
cd symphony-2
git submodule update --init
git clone git://github.com/symphonycms/workspace.git
ln -s /home/steve/symphony-cms/symphony-2 /var/www/symphony
chmod -R 777 /home/steve/symphony-cms/symphony-2/workspace
chmod 777 /home/steve/symphony-cms/symphony-2
## run web configuration now at yourwebsite.com/install.php ##
chmod -R 755 workspace
rm install.php install.sql workspace/install.sql update.php

See the git documentation for further reading.

If you need any clarifications, ask away in the comments section.… Read more

Posted in Notes | Leave a comment