Category: Code
I just finished up working on a website this week for a new client (Smile Photography), still a fair bit of placeholder copy about. The ingredients; XHTML/CSS, Bespoke Content Management, Auto Thumbnailing of Event Photos, all that kinda jazz.

I’m pretty happy with it, I’m in love with the simplicity and cleanliness and I think that’s just what’s required for a site which will primarily be used by visitors once only to browse and order prints.
I’ve been using Lightbox by Lokesh Dakar on a current project and needed to add a simple copyright message on hover just to remind those nice users that they really shouldn’t simply rip my client off by printing little snap shots directly from his website.

Obviosuly this won’t deter the determined, it’s by no means bulletproof, but perhaps will serve as a gentle reminder to others.
#lightbox {
background-image: url(/assets/copyright.gif);
background-position: center;
background-repeat: no-repeat;
}
#lightbox a:hover img#lightboxImage {
filter:alpha(opacity=50);
-moz-opacity: 0.50;
opacity: 0.50;
}
At first I was looking for an easy way to script the overlay of a PNG with a copyright text but in the end I just went with a nice little opacity effect on the photo in question, thus revealing a copyright message which had been set as the containing DIV background image. Keep it simple stupid.
Of course, if you know of a better method, let me know. :)
A while back the lads over at salted gave us a sneak peek at CSSVista, their standalone Windows application for web developers which allows you to edit raw CSS whilst live previewing the results in a tabbed IE and Firefox browser interface.
Well CSSVista is now available, even better, it’s free. Go grab yourself a copy and give it a whirl. I think this liitle application has some great potential! :)
I’m using textile on a project I’m currently working on and having come up against a bit of an issue I discovered a nifty little feature of textile which I’d never used before.
The problem I was having is as follows.
I’m pulling a field out of a database which is marked up using textile, I then call the ‘TextileThis’ function to render it back as XHTML. This is all good except for one thing. The text I’m pulling back is wrapped in an ‘href’ in order to link the entire body of text to another part of the site. When the textile ‘XHTML’s my text it’s auto wrapped in an opening and closing paragragh tag, that’s fine in most cases but in this situation it messes up the visual rendering of the link element:
<a href="http://ninefour.co.uk"><p>This is my sample text</p></a>
Obviously this isn’t ideal.
So, I took a poke about in the textile class file and discovered that ‘TextileThis’ accepts a number of arguments. Wow, never realised that before.
function TextileThis($text, $lite='', $encode='', $noimage='', $strict='')
Well I have no idea what ‘encode’ (URL encode maybe) and ‘strict’ do but ‘image’ will remove images and ‘lite’ prevents textile from wrapping it’s output in paragraph tags.
Success!
So, my mission should I choose to accept it, (which I have) is to have myself (or my domain name) appear on a Google Maps search for ‘nathan pitman berkshire’. Right now I’m listed... well, my work place is anyhow. But I want my house to be highlighted! That would be super neat.

So, here’s how I think I’m going to make it happen. The business look up is provided by yell, this is how google know what to display in the business list on the right, so I’m thinking I just need to be listed on yell right? Right!
I trot off to yell.co.uk thinking that this is going to cost me some £‘s but discover that you can actually apply for a free basic listing that appears not only on yell.co.uk but also in ‘the book’. Wow, how neat is that.
I enter my details, list my business as ‘nathanpitman.com’ select the relevant categorisation, enter my address… blah blah blah… eventually I get to complete my listing and then get my confirmation email. My listing is being ‘processed’!
All I can do now is wait, will I get listed, and when I do, will I show up on the Google Map… only time will tell!
Update: I’m listed on yell but still not showing up on the google map… :/