Sep 13

I have added support for a few different tags within comments. Here are some examples of what you would type as comment content and what it would look like as a comment.

Links:
[[http://nathanhoad.net|htp://nathanhoad.net]]
http://nathanhoad.net

htp://nathanhoad.net
http://nathanhoad.net

Code:
[code]function do_nothing ($blah) {
return $blah
}[/code]

function do_nothing ($blah) {
    return $blah
}



Terminal:
[terminal]sudo apt-get awesomeness[/terminal]
sudo apt-get awesomeness

Quote:
[quote]"I said something that was very profound and inspiring. I'm sorry you didn't hear me."
- Me[/quote]


"I said something that was very profound and inspiring. I'm sorry you didn't hear me."
- Me


Emotes:
:-D :-) :-( :-P ;-) :-@

:-D :-) :-( :-P ;-) :-@


Lists:
* something
* something else
* last thing


  • something
  • something else
  • last thing


I think that just about covers everything.

When I was building this blog I came across an interesting problem. I wanted to include some of my video projects as Youtube clips but noticed that the default embed code that Youtube offers isn't valid xhtml.

Youtube offers something like this:

<object width="425" height="350">
    <param name="movie" value="http://www.youtube.com/v/iJ6JjzfZ2PM"></param>
    <param name="wmode" value="transparent"></param>
    <embed src="http://www.youtube.com/v/iJ6JjzfZ2PM" 
        type="application/x-shockwave-flash" 
        wmode="transparent" width="425" height="350"></embed>
</object>



After a bit of playing around, I found that what I really needed was something more like this:

<object data="http://www.youtube.com/v/iJ6JjzfZ2PM" 
    type="application/x-shockwave-flash" 
    width="425" height="350">
    <param name="movie" value="http://www.youtube.com/v/iJ6JjzfZ2PM"/>
</object>



The next hurdle was RSS; Valid RSS doesn't allow <embed> tags at all. I removed them from the output of my RSS generator but I still wanted to show some sort of preview of the missing Youtube embed. Thankfully, Youtube offers a default preview image for all uploaded videos and so given iJ6JjzfZ2PM as an example video id, the image would be:

http://img.youtube.com/vi/iJ6JjzfZ2PM/default.jpg

That image comes out something like this:


The preview image for a Youtube clip.

So with all that sorted, now I can have my Youtube and my validation ;-)

Sep 3

This is my first official blog post on my new folio/blog site. I have been posting things to this blog for the past week and a bit but this is the first post since the site went up this afternoon. I might set up a project page for this site to keep track of changes that I make to the system. Feel free to have a look around and let me know what you think :-P