How to embed a Google Video in SMF

About a year ago I wrote a post on how to embed a YouTube video in a Simple Machines Forum post. Well, as it works out today I needed to embed a Google Video in a post so I went through and did almost the same process to get it to work.

isApache() and isIIS() functions for PHP

A couple quick little functions for when you need to know if you're running on Apache or IIS.
PLAIN TEXT
PHP:

function isApache()

    {

    return ((bool) preg_match('/Apache/i', $_SERVER['SERVER_SOFTWARE']));

    }

function isIIS()

    {

    return ((bool) preg_match('/IIS/i', $_SERVER['SERVER_SOFTWARE']));

    }

isApache() will return true if it's running on an Apache server and false if not. [...]

Trimming array elements in PHP

Several times I've had a user setting that was separated by commas that I needed to split out into an array. People, correctly, put a space after commas. But for the array the space shouldn't be there. Here's a quick tip to strip out those leading spaces.
PLAIN TEXT
PHP:

$array = array_map('trim', $array);

array_map [...]

How to install WordPress 2.5.1

WordPress is a insanely popular blogging platform, and with every release it gets better. It's also very easy to install, even for those who have never installed a CMS on their server before.
The first step is to head over to WordPress.org and download the WordPress file. Click on the Download button on the [...]

SQL_CALC_FOUND_ROWS – Is it faster?

Reading through a post on SQL_CALC_FOUND_ROWS actually being slower that running one query followed by a count query I decided I needed to do a little benchmarking on my own.