Overriding concrete 5.7 Core Service

concrete 5.7 replaces helpers with services. It's a little tricky to override these, but not when you know how.

I had occassion recently to use concrete5's mail helper to sent a message with an attachment. Although there is an addAttachment() method, it expects a file object to be passed to it. Unfortunately that means that the file has to exist within the file manager. In my case, I was wanting to send the invoice I'd just pushed into Xero, something that Xero cannot do with its API. Writing the file to disk and importing it into the file manager seemed like far too much overhead, not to mention clagging up the file manager with extraneous files. Here's how I got around it without modifying the concrete5 core.

Posted 28/12/16 Read more... »

Scrubbing Away Microsoft Smart Quotes

Microsoft "smart" quotes can be anything but. Let's scrub them clean with a little Vim.

I tend to do a lot of data mangling. Occasionally I trip over text that has been tainted with Microsoft Office and is infested with their so-called "Smart" quotes. These little nasties tend not to play nice with some importers. Fortunately, they can be scrubbed clean with a little Vim

Posted 04/05/16 Read more... »

Bootstrap Affix Plugin

The Bootstrap Affix plugin is pretty cool, but using it properly isn't particularly obvious.

We've been using Bootstrap 3 for a number of projects recently, and one plugin that we make use of is the Affix plugin. This plugin is especially handy on mobile devices, because it can be used to nail the nav menu to the top of the page and have it stay there when the page is scrolled. Since mobile pages tend to be a lot longer, having the nav menu "always on" makes a lot of sense. Unfortunately, the Bootstrap documentation doesn't quite articulate exactly what you need to do.

Posted 31/03/16 Read more... »

Compiling PHP7 on Ubuntu

PHP7 - Faster Than a Fast Thing That's Really Fast

PHP7 was released in December 2015, and promises a massive increase in speed. Some benchmarks have claimed it to be at least twice as fast as PHP 5.x.

Posted 19/01/16 Read more... »

Configuring PHP-FPM For Ubuntu 14.04 & Apache 2.4

There are numerous web pages telling you how to set up PHP-FPM but there's always room for one more. These notes refer to Ubuntu 14.04 which ships with PHP 5.5 and Apache 2.4

Posted 28/06/15 Read more... »