Feeling validated

April 6, 2008 8:44 PM | Comments (2) | TrackBacks (0)

After feeling pretty pleased that I had so easily switched from the old site’s templates to MT4’s, I spent this weekend fine-tuning my sidebar and transferring static pages into the MT4 content management system.

Then I decided to check out how valid my pages were. Horrors! I had 128 errors.

WTF?! My new blog template has 128 errors?!

The majority of errors were caused by Movable Type code, with problems popping up in all sorts of templates, modules and widgets.

The ‘abbr’ tag in each post’s timestamp had some invalid parameters which I deleted and so far it doesn’t seem to have affected the blog. There were class names for styles I couldn’t find listed in the stylesheets. It seemed to be system-generated because the style names took this form: class=”style-name [space] sub-style-name” and I am not sure if we allow for styles with spacing between them! Anyway after I deleted them, nothing seemed to happen.

(Aside: I also noticed these complicated style names with spaces between them, when I was working on my new church website, which uses Joomla, another content management system. Lots of new style names were being generated that we couldn’t find in any of the stylesheets. In fact the developer and I still could not clean up all the weird styles because we didn’t know where to search!!)

As I’ve been blogging for several years, my monthly listings were pretty long, so I switched to the Monthly Archives dropdown menu widget instead. However, it too generated errors as it had two consecutive ampersands in the code. I don’t understand why they needed to be there because I’m no developer, added the ‘amp;’ crossed my fingers and the dropdown menu still works.

After fixing all the MT4 template validation errors, I turned to the stuff I had knowingly embedded. There was a YouTube video which I hadn’t bothered to fix yet. It is troublesome validating YouTube code everytime I want to insert a video. However on doing some quick Googling, I found this service where you can paste your YouTube embed code in, and generate valid code!

Twitter, as usual, was another big culprit, with ampersands galore. It also uses the outdated ‘embed’ tag. I figured out how to convert this into valid ‘object’ code and now Twitter is causing no more validation problems. Thanks to Poolie for the original valid Twitter Flash code, which I adapted for the ‘Twitter with friends’ widget, and to Dom for sending me Poolie’s tip via Twitter last year.

The next thing I’m going to do is to convert some of the MT include templates to PHP includes, which are more flexible. I don’t want to keep re-publishing every single page to reflect the latest updates on my sidebar. I’ve always wondered why MT (including earlier versions) structured its templates in a less dynamic way, unlike Wordpress. I’m no expert and have missed out some advanced feature, so I’ll stand corrected if you have anything to point out.

The latest beta version of MT4 apparently aims to address user complaints that the template structure is too complicated. I totally agree. If you’re a developer, MT isn’t a problem, but for many of us it can still be daunting. Of course, you must have some level of skills to have installed MT on your server in the first place. But MT can still be simplified.

As of this time of writing, my home page, at least, is valid. Go check.

Recent entries

0 TrackBacks

Listed below are links to blogs that reference this entry: Feeling validated.

TrackBack URL for this entry: http://vantan.org/cgi-bin/mt/mt-tb.cgi/1454

2 Comments

For class=”style-name [space] sub-style-name”

The [space] is actually used to apply multiple styles to the item.

Eg.

.txtFont{
font-family: Arial, "Times New Roman", Courier;
}

.txtB{
font-weight: bold;
}

Applied to an object:

<blockquote class="txtFont txtB">This is my text</blockquote>

This way, you can have <blockquote> that uses just "txtFont"... and u can apply the "txtB" class to bold one particular blockquote.

Thanks MicCheng. I've obviously been out of touch, now that I don't do coding work.

Still, I like to keep my styles simple, preferably not too intertwined. Never liked going through other people's code to make changes, cos they think differently.

Leave a comment

Read this before posting:
  1. Please don't post anything racist, inflammatory or derogatory in any way.
  2. Your comment may be published immediately, because I kind of trust you (unless you're an evil spambot). However, I reserve the right to edit or un-publish your comment.

Subscribe to my feed

Feedburner

About this Entry

This page contains a single entry by vantan published on April 6, 2008 8:44 PM.

French, Faster was the previous entry in this blog.

Baptism anniversary is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

On Twitter...