Archive for the 'WordPress' Category

The one with the update to the rant

Wednesday, May 17th, 2006

If you read this post, here’s an update.

Trawling through the multitudinous spammer comments for willy wotsits and all sorts of pharmaceuticals that would sound dodgy even if the “author” didn’t go by the name of Righteous P. Turbitude III, I nearly fell of my chair at seeing Andy Budd’s name nestled amongst them.

Many thanks to comments from Andy Budd and Chris Mills (author and publisher respectively) for pointing out that:

Thank you both for providing the new information (and apologies for the uncharacteristic rant). It was uncharacteristic, no? Please tell me I’m not a whingebag?

I’ve been dipping into CSS Mastery in preparation for the Wise Women css study group kicking off this Friday and it is excellent. Really, really excellent.

Starting off with a review of basic css that *cough* we all know and need to frantically revise love, the rest of the book takes you through ever more advanced techniques to produce sites such as this and this.

I’ll write more when I’ve read more but I suspect it will be sitting alongside Rachel Andrew’s CSS Anthology as a book that is always to hand and frequently referred to.

Diolch yn fawr

Wednesday, May 10th, 2006

to Em³ for helping me fix the archive page which has been broken since the upgrade to WordPress 2. Would you believe that all it took was the addition of Sören Weber’s Exec-PHP plugin? No, me neither. But there you go.

The deadline for signing up to the BrowserCam annual subscription to the Premium service is fast approaching, just a few places left so leave a comment if you’re interested.

Also, if you’re keen to learn php (from beginner level) or css (from intermediate level) and would like to join a study group, let me know and I’ll point you in the right direction. The text for the css group will either be CSS Mastery: Advanced Web Standards Solutions (Andy Budd, Simon Collison, Cameron Moll) or More Eric Meyer on CSS.

And now for the rant

The price for CSS Mastery is $22.04 on Amazon.com (that’s £11.86) but to buy it from Amazon.co.uk it costs £22.79, a whopping $42.36, almost double the price! Why?

I’ve foregone the pleasure of tucking myself up on the sofa with a pot of tea and a book by buying the CSS Mastery book direct from the publisher, Friends of Ed, as an e-book but…

Rant #2

There are quite a few errata. Fine, I can understand the need to get books out quickly in today’s market but why can’t they be corrected in the downloadable e-book? They’re password protected to prevent text editing (okay, I can highlight and notate text) but surely someone could have spent an hour amending the source files and creating a new pdf for download? Send me the files and I’ll do it!

/end rant.

Read the update!

Deliciously autoposting

Wednesday, May 3rd, 2006

If all goes well at midnight GMT tonight a post will automagically appear here containing links I’ve added through the day to my del.icio.us bookmarks.

How to go about this is explained in Kevin Lim’s post, From Del.icio.us to WordPress: How to automatically post daily links.

If it works well I could replace the sidebar blog on the right but I like more control over the appearance of the sideblog and Morgan Doocy‘s mini-posts plugin works so well it would be a shame to replace it.

Well, let’s see if works first, eh?

Validating your css

Monday, May 1st, 2006

I’m knee deep in the redesign of a multi page website for a nearest and dearest, trying to make it accessible, validate, blah, blah, blah when I suddenly came across a great tip for validating your css even when your (x)html isn’t yet ready for validation. Ever seen this message from the W3C validator?

“Please, validate your XML document first!”

Frustrated, I googled for that phrase and came across an excellent article by Zoe Gillenwater in Making it Legal: Validating Your (X)HTML and CSS. Here’s an excerpt:

The CSS Validator accepts more than just .css files, which is handy if your styles are embedded or inline, instead of linked or imported. Just put in the URL to your (X)HTML page (or CFM page, etc.), and the validator will find the styles in it and validate them. It can also find and review linked or imported style sheets this way, but it is recommended that you validate external style sheets directly, not by submitting their parent pages to the CSS Validator. This is because if the XHTML page has errors or warnings itself, trying to validate its external style sheet can result in the error “Please, validate your XML document first!”. To avoid this, simply validate all external style sheets directly, rather than through the page they are linked or imported from.

I was going to point you to the error message for this site but blow me down, now my css validates (unlike the code and don’t get me started on the now borked archive page) but here’s a quick summary of what you need to do to validate the css independently of the (x)html:

  1. You’re using Firefox, right?
  2. With Chris Pederick’s Web Developer extension for Firefox, click on View CSS and your style sheet(s) will open in a new tab or page.
  3. Click on the hyperlink to the page(s) containing the css For example, the css for this site which will in turn open in a new page or tab.
  4. Click on Tools > Validate CSS to automatically use the W3C Validator.

If you like the Web Developer extension for Firefox you might also want to get the the Web Accessibility Tools Consortium Web Accessibility Toolbar for Internet Explorer and the (still in beta but very useful) Microsoft Developer Toolbar.

Validation using the above method doesn’t seem possible at first glance (no time to delve right now) but there are plenty of other tools to make it very worthwhile downloading.

Right, I’m off to make a pot of tea, find some good coding music at Pandora or Last.fm and wait for the phone to ring…

Hairy and scary

Monday, April 24th, 2006

If you visited earlier you might have seen a screen blank with an error message. I took the plunge and upgrade WordPress from 1.5 to 2.0.2. Fingers (and toes) crossed, it all seems to be working well.

I can’t recommend the following tutorials highly enough, I followed them step by step and apart from a few hair-raising moments (mea culpa, I missed a paragraph), it all went swimmingly.

The main page: Tamba 2 WordPress Guides
Upgrade to WordPress 2.x
How to backup
Where is phpmyadmin ? (yes, I needed to check this, ’twas my first time tinkering with my databases).

One small problem and I’ve scratched my head but can’t figure it out yet – why the background image (middle.gif) doesn’t display since the upgrade.

Here’s the css:

#page {
background: transparent url(images/middle.gif) repeat-y top center;
margin: 0 auto;
padding: 0;
text-align: left;
width: 864px;

Any ideas oh wise ones?


Before I got the chance to put that excellent advice from Gordon and Lyle into practice, I found that just saving the .css file and uploading it over the “old” (but identical) file was enough to solve the problem.

So if you’ve upgraded to WordPress 2.0.2 and find that some of your css styling isn’t working any more, it’s worth trying that before giving yourself more grey hairs fixing a (possibly) unfixable problem.

Blogaday map

Monday, April 24th, 2006

Thank you for adding your details to the Frappr Blogaday map, there’s room for plenty more, hint, hint. Award for coolest avatar* goes to Graeme, award for actually adding the date of your birthday goes to very few of you. Are you shy? You don’t have to put the year, honest, just the date.

But I think Andew’s right, Frappr’s not perfect for this, we need an ajaxy programming guru to step forward and identify her/himself. Think of the fame! The fortune! Well, maybe not the fortune, us bloggers expect everything to be free but don’t you think it’s a great project that would be hugely popular? Me too.

* Talking of avatars, I’ve been slaving over a hot computer to produce my own – what do you think?

WordPress 2.0.2

In other news, my brother’s here visiting, was due to go back home today but has developed a nasty bout of stomach flu so I’m donning a nurse’s cap to apply cold flannels to his fevered brow. Or not. But I’ve set him up with a domain name, hosting and WordPress 2.0.2 and he has joined the ranks of the shirker blogger community. Now you’d think I’d be linking to him post haste, no? Hmm, until he gets the whole anonymity concept I’m afraid that’s a big fat No. Sorry bruv.

I started the upgrade process to WP 2.0.2 for here but the Fantastico section with my hosting is temporarily borked so I’ll try and find time to do a manual update this week. I’m not sure I like the new Intelligent text formatting and found myself switching to the html popup window to edit links and such.

SimpleTags WordPress Plugin

Wednesday, March 8th, 2006

Snippet of php code

SimpleTags is a WordPress plugin for generating Technorati tags.

I installed it a wee while ago but ahem, what with one thing and another had forgotten to activate it. Good thing it’s simplicity itself to use then. You just copy the .php file to your plugins folder, activate it via the dashboard and start adding tags to posts:

[tags]WordPress, WordPress Plugin[/tags]

Update: Do they not work in mini posts?

WordPress, Exec-PHP plugin and Pages

Tuesday, March 7th, 2006

That was an awfully long sidebar over there, no? I’ve been holding out against changing the display of archives and categories to drop down menus, meaning to investigate the use of (WordPress specific) php in posts and pages, thinking I’d move them off the front page entirely, giving more prominence to the blogroll.

Enter Soeren Weber’s Exec-PHP plugin:

The Exec-PHP plugin allows <?php ?> tags inside your WordPress posts and pages to execute the code inside of it just like you normally write and run code inside of any PHP file.

I installed it earlier today, activated it via the WordPress plugins page and can now use php code everywhere!

I’ll quickly document what I did so that I can refer to it in the future but I can’t be the only person who’s wanted to do this but not quite gotten around to it? In the meantime, apologies to non WordPress users, you might like to wait for today’s next post, “Wimmin wot I admires”.

First up, I created a new Page called Archives Test, then opened up a copy of sidebar.php and copied the code that displays the H2 heading “Archives” and the php that displays them by month:

<h2>< ?php _e(‘Archive’); ?></h2>
< ?php wp_get_archives(‘type=monthly’); ?>

and pasted this into the new Page and bingo! We have a page showing the archives. It needs tidying up and formatting of course but the Exec-php plugin makes it so easy to display that php code.

You do exactly the same if you want to display, for example, Categories:

<h2>< ?php _e(‘Categories’); ?></h2>
< ?php list_cats(0, ”, ‘name’, ‘asc’, ”, 1, 0, 1, 1, 1, 1, 0,”,”,”,”,”) ?>

Now, that default page theme includes the sidebars (with archives, categories, blogroll and sideblog etc.) so I need to create a new Page template that just has the banner for easy access back to the home page.

But wait! You might be using a theme that includes additional Page templates – check to see if you have more than the default option in the drop down menu under Page Options (you can see a screenshot here).

I adapted this (slowly being improved for accessibility issues) layout from ClemensRelaxation theme and he included two Page themes which I’m going to tweak a little. I won’t write about how I do that (kludge, kludge and more kludging) because you couldn’t want a better tutorial than the one on the WordPress CodexCreating your own Page Templates.

In the meantime you can now access the archives from here. Phew!

Making extended posts more accessible in WordPress

Tuesday, November 29th, 2005

Ever since reading that using the “more” button in the WordPress dashboard results in accessibility issues I’ve been meaning to find a way round it. But with so many other things to fix (resizable fonts!), I’d put it on the back burner and stopped writing extended posts. Then tonight I fell upon a solution by accident.

First up, why is it a problem? Well, the W3C Web Content Accessibility Guidelines (WCAG) state that

If more than one link on a page shares the same link text, all those links should point to the same resource. Such consistency will help page design as well as accessibility.

If a page on this blog has, say, 10 posts and two or more of those posts contain extended text, then two or more of those posts will have a “more” link leading to two different places.

Reading Bruce Lawson‘s post, “WordPress PHP help wanted“, a comment from Derek Featherstone led me to try this method and by jingo it works. (more…)

Meanwhile back on the ranch

Friday, October 21st, 2005

Hopefully, a spiffy new look is starting to take shape, thanks to the scrumptious relaxation theme from Clemens.

Before I start hanging pictures and getting fresh paint on the walls, I’m still fixing validation errors, especially one that seems to be caused by the “more” tag (that puts part of a post in an extended entry). But that’s for the morrow. There’s also truckloads of accessifying to do with the graphics brought over from typepad. Remember I said how easy the export of posts was from typepad? Hmm. That’s true. But graphics are another matter. It’s bothered me for a while that even as a Pro user, you don’t have any kind of global access to files. I can see that for the most part you don’t need that access and I trust Six Apart to keep backups of everything on a regular basis so having my own backups wasn’t necessary. But when I started to look for an easy way to download all of the graphics from the past two years I realised that they were scattered in many a folder and the only solution was to go through them all, saving each graphic individually. Hah! I even opened a help ticket for confirmation but the sad fact is that I needed a faster way to get hold of all those pictures.

So the first solution was to use a Mozilla extension called DownThemAll. Starting with March 2003, I simply downloaded all graphics on that page, then on to April, May, June etc. It took about 40 minutes all told so I was quite happy. But then I realised that this didn’t catch all graphics – when you create a thumbnail image in the Typepad interface, a corresponding html page is created for the larger size graphic and that of course wasn’t being picked up by DownThemAll.

Second solution was to use a website copier, HTTrack. This has done the job rather well I think. But now I have to go through every post and make sure that they all fit, have alt tags and generally doesn’t mess everything up. Oh boy.

Meanwhile, enquiring minds might like to know that the blogroll is now themed by tea types – there’s Caravan, Keemun, Earl Grey, Darjeeling and Oolong, all of which have their own special flavours. As do you. The old lists started out reflecting frequency of updates (daily, frequent, etc.) but that went out of the window as folks suddenly started post like fury or slowed to a standstill.

Anyway, the plan is to take some pictures of tea cups this weekend and add them as little icons above each category but I’ve a feeling my camera will not be recovering any time soon from being dropped from the landing so I’ll end up scouring my favourite free image sites for alternatives.

Across the web there are some lovely novelty teapots and some pretty teacups. There’s even a Darjeeling tea caddy and a teapot font so I’m not short of inspiration.

Unless… would anyone like to contribute pictures of teacups, mugs and teapots? It would be lovely to make it a group effort. Photos and drawings (hint, hint) are all welcome. How about a maximum file size of 50x50px?

And the prize? How about a special edition “Music to take tea by” cd, a compilation guaranteed* to make teatime an absolute pleasure.

There you go. Deadline is midnight BST on Sunday (23 October), you can post them on your blogs or email them to me, it’s up to you.

Good luck!

* usual disclaimers apply, I haven’t made it yet. Ahem.

Update: I’ve added some pictures from Stock Xchng that I plan to use for the blogroll.

Spotlight on...

Delicious links

These links are updated frequently thoroughout the day. Should you miss any they're all stored on my Delicious pages.

What I'm listening to