David Preston

Musings of an old bloke.



Authors

David Preston

More about me here.

Posts 1 to 10 of 32

How to Insert a Space Character in HTML

A space, not a non-breaking space, just an ordinary space. Can't be that hard, can it? Well, you would think so. Or I'm rubbish at googling the right thing. I was working on a project at work, and adding schema.org markup which involved wrapping stuff in <span>s. Which in turn choked my HTML minifier and caused one particular space to disappear. Took me ages to find the solution; how… View More

Filetype Associations in FileZilla Portable

This is one of those posts that is more of an aide-mémoire for me than anything else, although I will be pleased if it helps anyone else. The background was that I was going to write another blog post (not this one), but before then I wanted to change the width of the .container div and make it a bit wider. But I couldn't remember my own ftp login (embarrassing). So, Pro Tip 1, hi thee along to… View More

ProcessWire & CloudFlare

Erudite (or nosy) visitors may have noticed that I run this blog through a free CloudFlare account. This is a Good Thing, however it was breaking my ProcessWire admin (not a Good Thing), with the default CloudFlare optimisations. It turns out that the trick is to create a CloudFlare 'Page Rule' for dpreston.com/processwire/* (the asterisk wildcard character is important), such… View More

A 'Wow' & Two 'wtf?'s - My Day Using Google

I use Google a lot - most people probably do. Usually nothing worth even a raised eyebrow comes of it but today has been significantly different. The big G has thrown me a series of curveballs all day. First off, some background - this morning I bought tickets to watch Chic at the Apollo in Manchester next month. The resulting emails arrived in my Gmail inbox and were duly… View More

From the Archives

I was clicking through some folders of old (very old, actually) stuff, and found and old website that I had at the beginning of the century. It was a blog in all but name, even though I referred to it at the time as my Angling Diary. The files I found ran from November 2000 to June 2001. I used to fish a lot around then! I thought it would be a bit of fun to reproduce it here, even with some of the tiny, horrible, pixelated photos,… View More

Southport Air Show 2014

I had a day out at the Southport Air Show a few weeks ago. It was held over a weekend, the Saturday suffering from pretty gloomy weather with low cloud. I went on the Sunday, when conditions were much more suitable. Here are a few… View More

dpreston.com Now Powered by ProcessWire

After years of neglect, during which time server upgrades and Wordpress awkwardness almost rendered this blog completely inoperable, I finally made the leap to change its backend to ProcessWire. I first discovered ProcessWire a couple of years ago, and have built several sites with it since, mostly small ones but the odd biggie. The following… View More

Prime Minister Follows Parody Darth Vader On Twitter

I’m not sure if this is good, bad, cool, uncool or just plain weird. The official Twitter account of the British Prime Minister follows a spoof Darth Vader account! Well, I suppose Cameron is something of a parody of a Prime Minister anyway, so why… View More

Tidying & Formatting Postal Addresses in PHP

A couple of times in the course of my job, I've needed to tidy-up user input of postal addresses, usually when importing from an external database into a web application or taking input from a web form. It looks horrible when everything is in upper or lower case. PHP has strtoupper(), strtolower() and ucasewords() functions, but none of these does just what I needed. Googling found a few attempts to solve the same problem, and I've probably… View More

A Developer’s CMS

I have used CMSs (Content Management Systems) for years, mainly Joomla, but also others. I don’t consider WordPress a CMS, but that’s just me. Anyhow, I came across a new (to me, anyway) one a few weeks ago that has very quickly become my favourite. It is called ProcessWire, and it is unusual because it has no front end. (The download comes with an example front end, but there is no requirement to use it.) So… View More