Blog

Site Upgraded to Drupal 7

As the vast majority of the Drupal websites that I currently work on are built on Drupal 7, I thought that it was time that I upgraded this site. Following the core upgrade process and the CCK migration process, everything was upgraded smoothly without any issues.

How to Install and Configure Subversion (SVN) Server on Ubuntu

Recently, I needed to set up a Subversion (SVN) server on a Ubuntu Linux server. This post is going to outline the steps taken, and the commands used, to install and configure the service.

Note: As I was using Ubuntu, I was using the 'apt-get' command to download and install the software packages. If you're using a different distribution of Linux, then this command may be different. I'm also assuming that Apache is already installed. 

Firstly, I'm going to ensure that all of my installed packages are up to date, and install any available updates. 

Create Multigroups in Drupal 7 using Field Collections

One of my favourite things lately in Drupal 6 has been CCK 3, and more specifically, the Content Multigroups sub-module. Basically this allows you to create a fieldset of various CCK fields, and then repeat that multiple times. For example, I use it on this site whist creating invoices for clients. I have a fieldset called 'Line Item', containing 'Description', 'Quantity' and 'Price' fields. With a standard fieldset, I could only have one instance of each field - however, using a multigroup, I can create multiple groups of line items which I then use within the invoice.

Imagefield Import Archive

I've finally uploaded my first module onto Drupal.org!

Proctors Hosting the next Drupal Meetup

Proctor & Stevenson are going to be hosting the next Bristol & South West Drupal meetup on the 25th May at our offices. You can view more details here, or register via the form on the Proctors website.

Proctor & Stevenson

Image: Screenshot of the Proctor & Stevenson website

2 weeks ago, I handed in my notice of resignation to Horse & Country TV because I've been offered a new role at Proctor & Stevenson - a Marketing Design and Communications agency in Bristol.

Tags:

One Year Blogiversary

One year ago today, I added my first blog post onto this website. Since then, I've added a total of 34 posts and received 9,947 visits, as well as adding my website development portfolio and testimonials.

Many thanks to everyone who's readed and commented on my blog posts during the last 12 months. Hopefully, this time next year, I'll be reporting back with some even better figures.

Tags:

Display the Number of Facebook fans in PHP

Replace the $page_id value with your Page ID number (unless you want to show the number of fans for this site).You can find your Page ID by logging into your Facebook account, going to 'Adverts and Pages', clicking 'Edit page', and looking at the URL.

For example, mine is https://www.facebook.com/pages/edit/?id=143394365692197&sk=basic.

I've also wrapped the output in a number_format() function so that it properly formatted with commas etc - like where I've used it within the Gold Event listing on the Horse & Country TV website.

Easily Embed TypeKit Fonts into your Drupal Website

To begin with, you will need a TypeKit account. You can register for one here - there is a free version if you just want to try it out.

Next, you'll need to create a kit that contains the fonts that you want to use on your website. I've used FF Tisa Web Pro.

Image: Screenshot of the TypeKit editor

Optimise your Drupal Theme for an iPhone or iPod

To begin with, enter the following code at the top of your page.tpl.php file:

 

{syntaxhighlighter brush: php;fontsize: 100; first-line: 1; }<?php
if (ereg('iPhone',$_SERVER['HTTP_USER_AGENT'])) {
$iphone = 1;
} elseif (ereg('iPod',$_SERVER['HTTP_USER_AGENT'])) {
$iphone = 1;
} else {
$iphone = 0;
}
?>{/syntaxhighlighter}

This creates an 'iPhone' variable, and sets its value to 1 if the an iPhone is being used. The value of the variable can then be used in an 'if' statement to create content that's only shown if an iPhone is being used.

Pages