SockAndAwe Google Gadget

After working with the SockAndAwe.com site for a little while now, I have written and submitted my first Google Gadget which displays the number of shoes thrown at George Bush via the internationally popular flash game.

To embed this gadget into your site you can use the following code:

Alternatively you can add this to your iGoogle homepage or customise this gadget to fit your site design.

Why not join in shoe throwing fun and see how many times you can hit Bush by playing the game at www.sockandawe.com.

CSS: Targeting Safari 3 only

Although Safari 3 tends to render layouts the same as the other leading popular browsers, it prefers to use it’s “aqua” button styling for standard sized form buttons.

One solution for this is to set a dimension (width or height) to the button.

To target Safari 3 in CSS you can use the following to add or override any existing attributes, such as the height of a button:

@media screen and (-webkit-min-device-pixel-ratio:0) {
	button {
		height: 40px;
	}
}

If required, multiple selectors can be added into a single block.

Flash AS3: Play sound from the library

In order to play a sound from the library you can use the following simple AS3 code:

var snd:Beep = new Beep();
snd.play();

You must also assign your sound clip a class name by right clicking the sound in the library and checking the export for ActionScript option. In the example above the class name was set to “Beep”.

The default base class¬† is set to “Sound”, allowing inheritance of methods from the Sound Class.

CSS: Extra Button Padding in IE

Today at work I was asked how to remove the extra padding added to buttons (both the button tag and input[type=button]) in Internet Explorer.

The Problem:

In the example below there is a standard button with 10px padding on all sides. Internet explorer chooses to add additional horizontal padding:

The solution:

After coming across this problem myself in the past, I eventually remembered that there are two CSS styles you can add to fix this bug feature in IE:

button {
	width: auto;
	overflow: visible;
}

Heroes Season 3 coming soon…

Since watching the very first episode of Heroes Season One I have been hooked and rarely missed a showing.

Season 2 has been recently shown again on the Sci-Fi channel, so found myself watching them all again and anxiously awaiting the arrival of the forthcoming series.

It has been announced that the first episode of Heroes Season 3: Villains will be shown in the UK on BBC Two and BBC HD on Wednesday 1st October at 9pm.

If you miss that don’t panic as it will be replayed at 10pm on BBC Three the same night, however it will not be available on iPlayer.

As the volume name (Villains) suggests, it sounds like we could be seeing a different side to some of the characters we have come across so far… I can hardly wait to see what secrets may be revealed!

The death of Mr. Box Man

It has recently come to my knowledge that an act I participated in a few months ago has leaked into public view in the form of a media project by a year 10 pupil from Calthorpe School in Fleet, Hampshire.

Now in year 11, the student – who we shall refer to as B. Haines – had obtained video footage of myself (in costume) and put into practice his new found video editing skills using a trail version of Video Edit Magic to produce “Death of Mr. Box Man”.

Not only was this used towards his GCSE Media Studies, I have more recently found out that it was played at the school during the final year 10 assembly.

Although I am undoubtedly the main star of the show, all credit must go to Nick Haines for the high quality video recording skills, and Ben for his acting, polishing of the final cut, additional textual commentary and great choice of music – nice work guys!

Dell Inspiron Mini 9 – My new best friend?

Since it’s release at the beginning of this month (September), I have been toying with the idea of purchasing Dell’s contribution to the UMPC market – the Dell Inspiron Mini 9.

At a set price of ¬£299, it’s not the cheapest mini notebook around, but having purchased a number of Dell products in the past I am very confident about the quality of the product.

Although there are no customisable options available to UK customers like those available for the American market, we are offered the highest specification.

The opinions in the Fubra office differ dramatically, some people are strongly against the idea of purchasing the mini 9 and having concerns over it’s practicality and general purpose.

Others – along with myself – can see the mini 9 functioning well as an addition their current setup, allowing them to have a more portable hardware solution rather than hauling around larger laptops and desktop replacements (as in my situation).

Although it wouldn’t be a replacement and more of an extension I am having no some doubts about the purchase. Maybe if I actually saw through my initial impulse purchase last week I wouldn’t be having these thoughts, but bailed at the shipping options section.

To help aid the my final decision and those of any possible future buyers, I alongside Dunham have set up a forum that can be found at MyDellMini.com, in order to discuss the product and other UMPC related subjects.

Creating Symbolic Links in Windows

Until recently I assumed that creating Symbolic links in Windows was an impossibility.

That was however before I stumbled across an interesting VerySimple Dev Blog announcement describing the creation process.

To create a symbolic link in Windows Vista, at the command prompt, enter the following command:

mklink /d symlink_filename target_filename

(If you are linking an entire directory you must include the /d switch, otherwise this should be omitted.)

Use Windows Explorer to navigate to the directory in which you have just created the symlink, the file should be visible as if this were it’s permanent location. If you wish to remove or rename the link simply perform this action on the file or folder from this location.

One thing to remember is that you must create any link as administrator. If you do not run the command as Administrator, you may receive the following error:

You do not have sufficient privilege to perform this operation

To run the command prompt as administrator, right click the command prompt icon and click “Run as administrator”.

You may be further prompted with security messages asking for your permission before performing this action, depending on your current setting of the Windows User Account Control (UAC).

Google Static Maps API

Admittedly I have completely missed the boat on blogging about the Google Static Maps API which was launched back in February, but I was reminded of them the other day whilst working on a site admin panel.

As the maps I wanted to display were only a small addition to the panel providing a quick snapshot of a location, using the full JavaScript API would have been rather unnecessary.

This is where the static maps prove very useful and are an easy and quick addition to any web page, whether or not you use Google’s static map wizard. Continue reading “Google Static Maps API”

Upgrading to WordPress 2.5.1

After receiving notification of the latest WordPress release I wandered over to the WordPress Blog to see what was included in the latest version (2.5.1).

Aside from what has been described as a “very important security fix” there were over 70 additional bug fixes, most of which I hadn’t come across myself although had heard of some troubles encountered by others.

Unlike my previous upgrade this time I just switched the subversion repository and ran the web based update script, shaving off an additional few minutes and therefore upgrading my install in under two minutes from start to finish!

svn switch http://svn.automattic.com/wordpress/tags/2.5.1/

Luckily everything seems to be working fine and I have faith in the WordPress releases, but if you want to be more cautious you should probably backup your database first.

As Paul’s response to my previous upgrade post mentions, any web scripts can be rolled back using svn.

It is highly recommended that you carry out the upgrade as it is said that the vulnerability to 2.5 will be made public shortly.

There is also to introduction of additional security in the form of secret keys, introducing randomness into the cryptographic functions used for cookies.

Simply obtain a secret key and paste the code into your wp-config.php file along with the other defined variables.