mike afford media LOGO

Archive for the ‘technical’ Category

Tuesday, June 28th, 2011

Weather Widget Revisited

Wordpress Weather Widget v 2.0

My Wordpress Weather Widget v 2.0

I have just put the finishes touches on my latest attempt at a Local Weather Widget for Wordpress, this time branded in Leitrim colours.

I first had a stab at this kind of thing a couple of years ago but removed it when it broke the blog completely…! This new version seems a bit more stable, but still suffers from missing data from the Yahoo! Weather feed, especially overnight. Also, and here’s the problem, it’s still hard coded into a text widget, which isn’t exactly ideal. You should be able to see the real thing at the bottom of the sidebar on the right… (UPDATE : I’ve just turned the weather widget off – it should be back once I’ve worked out how to make it not quite so easy to download a free set of my weather icons..!)

So if there are any bored PHP / Wordpress experts out there who’d be interested in a collaboration, please do get in touch. It’d be nice to make this into a proper Irish Local Weather widget downloadable from wordpress.org/extend, with options in the admin page to select your county branding, your town or city (or long-lat?), and choose from current, 1 day or 2 day forecasts or combinations.

As before, the XML parsing and CSS classes are based on those by Marco Voegeli. The data is currently coming from Yahoo!Weather, but I’m in the process of investigating the free weather API from World Weather Online – they offer a longer-range forecast, and they’re also using my weather icons!

Sunday, January 31st, 2010

Photoshop CS4 crashes when changing font

I recently upgraded the entire Adobe Master Collection on my Macbook Pro to the CS4 versions and earlier today Photoshop started crashing. The horror. It happened whenever I tried to change the font on a piece of text. I was highlighting the text and using the arrow keys to flick through all the fonts in the list, one by one. Several ‘unexpected quits’ later, I’d narrowed it down to one particular font that was causing problems. …read more

Friday, September 25th, 2009

Cufón text replacement in Wordpress

Tolkien Fonts - cufon text replacement example

Tolkien Fonts - cufon text replacement example

I’ve recently been experimenting with Cufón text replacement, and decided to put it to use on a site I’ve been messing about with. I’d also been converting the whole thing to a Wordpress-powered site (more on that later), so it seemed to make sense to look for a plug-in to do the job.

So, the plugin is called WP-Cufon and you can get it at wordpress.org/extend/plugins/wp-cufon/

It’s quick to install, has good documentation, and it’s easy enough to specify some rules to control the text replacement on your site.

So for example I’ve used :

Cufon.replace('h1', { hover:true });
Cufon.replace('h2', { hover:true });
Cufon.replace('h5');
Cufon.replace('#navbar a');

which replaces the font for h1, h2, h5 headings and any link text within the ‘navbar’ div with a special font of my own making. All of the subsequent styling is covered by CSS. It really is very simple to set up.

You need to convert your font first into a format that Cufon can handle – there’s a Cufon generator that does the whole thing very neatly. It also, importantly, allows you to limit usage to certain domains to protect the font from use elsewhere.

…read more

Tuesday, October 28th, 2008

Step by Step WordPress customisation

As promised – here’s a quick rundown of how I tweaked the default WordPress theme to match my own website. Pretty much everything was achieved by editing either the style.css or header.php files.

The changes to the basic proportions of the page were made by increasing the #page and #footer divs from 760 to 900pixels and adjusting the right sidebar content to be 250px wide (to match my own ‘content_sub’ div) and expanding the rest of the content to fill the gap. …read more

Saturday, October 18th, 2008

My Customised Blog Theme

I’ve have made a few tweaks to the default WordPress theme – and well, it’s nearly there – as (hopefully) you can see from this page. I haven’t checked the layout integrity in many different browsers, and I expect there will be some strange things happening on sub-pages to this blog (for example – if any comments come in). And I’m also not sure what will happen if I start adding or editing widgets – but hey, it was my first effort and I think it has matched up with my main site design pretty well. There’s still plenty still to do – fiddle with the look of some of the links (particularly RSS related bits) and I haven’t really set up the sidebar yet. …read more

Friday, October 17th, 2008

Tinkering with WordPress themes

OK, in order to work out how WordPress sites are put together, I’m going to have to put on my Graphic Design Geek hat. (Yes I have one of those. It’s a black beret, by the way.)

I’m intending to blog about the changes I’m making as I go along. …read more

Friday, October 17th, 2008

A quick word about WordPress permalinks

Here’s a thing. The default installation of WordPress I’ve just done is set up in such a way that the URL of each individual post is what they call ‘ugly’ – it contains numbers and question marks, rather than containing the actual text from the title of your post. And apart from being ‘ugly’, these links are not particularly Search Engine friendly. …read more

Friday, October 17th, 2008

Image upload failure in WordPress

OK, you may remember seeing a little image in my last (first) post. Well, getting that to appear wasn’t quite as straightforward as I’d hoped. When I first tried to upload an image from my computer, I got an error message:

failed to write to disk
…read more

Friday, October 17th, 2008

Installing WordPress on your own site

I thought it might be useful to document the process of setting up this blog on my site as I went along.

Step 1: I found this page on WordPress.org which details the procedure for installing WordPress on your own site (this assumes that you have your own domain, and FTP access to upload all of the WordPress files to your own site). Now, being a graphic designer, and itching to get on with the task of customising the page to make it look all arty and such, it’s fair to say that I only read the instructions briefly, so this might all end in disaster, but here goes… …read more