MarLIN Recording Blog re-launched

The new version of the MarLIN Recording Blog has gone live today.

MarLIN, The Marine Life Information Network, has an activity community of recorders who submit sightings of marine life through the MarLIN website.

The blog, built on WordPress, will be updated with interesting and unusual sightings as well as information from MarLIN events.

The blog also updates the MarLIN Twitter account when a new post is added or edited.

Lilly & Day launched

Based in London Lilly & Day provide garden and landscape design.

Working with designer Random Badger the site is built on WordPress allowing the client to make updates to text or upload new portfolio images.

The portfolio gallery uses a jQuery plugin Galleria to improve the user experience progressively for those that are able to use javascript.

JC Surf launched

John Copley has been part of the surf scene since the sixties and now works as an agent for a large number of worldwide surf brands.

Working with Random Badger I created a site to showcase the companies and products that JC can provide for you. The site is aimed at getting the user interested and encouraging them to get in touch.

The site also contains a small profile about the man himself.

URBANE Project launched

The URBANE project is a study of urban coastal defences. The website provides information about the project and those involved. The partners page has a Google map linked to an unordered list that acts as dual functionality to view more details on the partners.

The overlay effect that I wrote for the partners list is utilised again in the image galleries.

The site is built on HTML5 with some subtle use of CSS3.

Blue Sound launched

The Blue Sound project aims to encourage people in the Plymouth area to use the ‘blue space’ around them.

The website aims to involve local youth groups to participate in work groups with myself and the Blue Sound project officer to enable us to provide the users with a site that they can truly feel is theirs.

The site uses HTML5 and CSS3, including CSS drop shadows, rounded corners and transitions.

I got my hands on a Mac

I’ve done work on Macs before and always enjoyed it but I’ve managed to get my hands on a MacBook Pro which I’ll be doing lots of my work with.

Having read a couple of iPhone developer books I’m very keen to get stuck into a bit of app development and see what I can come up with.

The first evening was pretty much spent installing programs and typing into Google “mac short cut for ……” but after a few days of working on it I can highly recommend it. It’s lightning fast and opening up new programs is almost seamless. This really helps my workflow as I’m not getting distracted whilst the new program opens up.

Not to mention the excellent battery life, it’s really nice to have a laptop that can be used as one and not have to look for a power supply before even thinking about getting into some work.

Drupal 6 num_rows

I’ve been working on a site powered by Drupal and needed to find the number of rows a database query returned. Simple enough and quite common procedure. But, the Drupal database API no longer offers the db_num_rows() function.

I had a quick Google around and the answered seemed to be to run the query twice but the second time using a count query. Two calls to the database when only one is necessary? Not on my watch. The piece of code is to appear on the home page so it will be called upon frequently.

My solution was too loop through the results set and add the formatted HTML to an array. Then check if there are any items in the array, if so loop through it an output them if not display the message that there are currently no results.

I know it’s still doubling up but I think it is a slightly more elegant solution than the double database call.

Destroying CodeIgniter Sessions when closing the browser

I’m really enjoying using CodeIgniter, it’s an excellent framework and has a side benefit of helping to structure your files neatly.

I’ve been working on my first login form using it, and whilst there are lots of tutorials going through this common process I encountered a “problem” with the CodeIgniter sessions persisting when the user closed their browser.

A bit of searching around and I came up with a few recommendations.

The first is to set the $config[‘sess_expiration’] to 0

This however has the effect of creating a cookie which actually lasts 2 years due to code in the system/libraries/Session.php file

The next was to set the $config[‘sess_expiration’] to -1

This just didn’t work for me full stop. When I logged in it saved the session variable then when I went to the next page it had disappeared.

The solution I have used came from this page.

http://codeigniter.com/forums/viewthread/70036

It’s pretty quick to implement the code and you can have control over the expiration time as well as choosing whether your cookie should be persistent.

And now it’s implemented I intend to copy the Session.php file into every project I create that requires sessions. I can handle having to paste in one line of code to the config file.