Cherry Studios

Wordpress and .htaccess

Posted by admin on Sunday, June 29th, 2008

I’ve just ported a few articles over from the old site to give the site a bit of a starting point, some of them aren’t particularly well written in both their grammar and their code but hey it’s a start.
Over the years the old site had built up a steady trickle of visitors from its [...]

continue reading

Neat little javascript image swap function

Wednesday, August 6th, 2008 - Uncategorized

I’ve been using this function for a while now, and thought I’d share it.
// swaps image.gif
// for image2.gif
// and vice versa
function swapThisImage(oElement){
imageSource = oElement.src;
arrayParts = imageSource.split(’.');
var extension = arrayParts.pop();
var path = arrayParts.join(’.');
if(imageSource.lastIndexOf(’2.’) > 1) {
path = path.substring(0,path.length-1)
oElement.src = path + ‘.’ + extension;
} else {
oElement.src = path + ‘2.’ + extension;
}
}
To call the function just [...]

continue reading

Wordpress and .htaccess

Sunday, June 29th, 2008 - Featured, Uncategorized

I’ve just ported a few articles over from the old site to give the site a bit of a starting point, some of them aren’t particularly well written in both their grammar and their code but hey it’s a start.
Over the years the old site had built up a steady trickle of visitors from its [...]

continue reading

PHP Output Caching Class

Sunday, June 29th, 2008 - PHP

A simple class for output caching with PHP.

<?php
/*
_________
| INFO |__________________________________________________________________
| [...]

continue reading