Blog posts

[HTML] Make YouTube embed code XHTML valid without Javascript

When you embed a video on to your website from YouTube you will find that your site will no longer successfully validate on the W3C validator.

This is because the embed tag is not supported, although it works on most browsers.

The code you get from YouTube is something similar to this:

[HTML] Stop embeded YouTube videos autoplaying

When embedding YouTube videos on to your website, the video will play back automatically as soon as the page has loaded. To stop this, follow this quick edit.

When you embed a video from YouTube you get some code like this:

[PHP] Operators

There are a few different types of operators in PHP and I will cover the most commonly used ones.

Arithmetic Operators

These are list basic maths. The 4 most common are:

Addition

Sum of $a and $b.

[PHP] Introduction

Syntax

When writing PHP code it is best to use the following opening and closing statements:

<?php
?>

On some websites and scripts you may see it written like this:

?>

This is not good practice as not all servers will be set up to allow this shorthand tag.

[Drupal] Get a list of other nodes that are related by taxonomy terms

Building on this snippet from Drupal to get related node items sharing the same taxonomy terms for 4.7, I have made it work for multiple terms.  This snippet is for Drupal 5 and has been tested to work on 5.10.

The code will return a list view of 5 (changeable with $num_nodes) in an unordered list in a random format.

If you want to order the items you can edit the code to order the data in the SQL statement and take out lines 18 and 19.

[Drupal] Installation

You will need to have set up an IIS or Apache webserver with PHP 5.2 or greater and a Mysql/PostgreSQL database before you can work on Drupal. For more requirements see [Drupal] Overview.

Set up your PC as a test environment using Apache, PHP and MySQL

You can approach the set up of a test environment in 2 seperate ways. You can manually set up Apache/IIS, PHP and MySQL seperately then configure them to work together or you can use a package such as WAMP (Apache, MySQL, PHP) or XAMPP (Apache, MySQL, PHP, Perl).

There are benefits to manually setting up each bit of software for the purpose of the test server we will just use Xampp.

[Drupal] Overview

What is Drupal?

Drupal is an open source CMF (Content Management Framework) created by Dries Buytaert.

What is the difference between a CMS and a CMF?

Not a lot but Drupal is refered to as a CMF due to is configurability and customisation that you are able to do through it's excellent back end and through the use of third party contributed modules as well as modules created by yourself.

How do I get Drupal?

Go to http://drupal.org and download which ever version you want.

Premier4509 show off their new kits

Premier4509 has released images of 4 new body kits.

The first being for the Aston Martin V8 Vantage.

UK Counties & Countries data files (CSV + MySQL)

The following files are data files that can be used in projects that require a list of UK Counties and/or all of the Countries in the world.

The following files are useful for web developers to use for their select drop downs or a lookup table in a database.