And I’m not talking about the 2000 election. Yeah, I’m totally over it by now. This is my favorite picture of my poor ankle. That incision is impressive, isn’t it? It’s three times longer than my ACL scar. It’s longer than Jen’s caesarian scar (she said I should post that bit of info).\
I’m stuck on the couch for at least another week, foot elevated the whole time, no doing anything except stuff I can do on the couch while drugged up (hence the tag experiments from last night). I wonder what I’ll do tonight when I can’t sleep any more, I’m uncomfortable and I’ve watched all the DVD’s in the house…
-
Gore Gore Gore
-
First Post-Op Appointment
I went to see Dr. Wilson this morning for my first post-op appointment. I took pictures. Warning, they’re pretty cool (cool = gross).
-
Movable Type Categories As Tag Cloud
Like yesterday’s post about del.icio.us tag clouds, this was an experiment because I was bored. I figured it was so easy to make the link tag cloud, it should be almost as easy to create one from my categories. The challenge is that I have almost 1600 entries (actually, this is #1600!): so many that I don’t want the number of entries in a category to correspond directly to the text size (because 200em is really big).\
All it took was a little PHP on top of the tags to do the category list.\
Of course, this will only work if you can use PHP on your server (and why can’t you, huh huh huh), and if you publish the page as a PHP file. You may want to change the way it increments numbers to get the right scale between categories. Play, and if you end up using it, please post a comment so I can come check it out.\
Here’s what I did (of course, this is the “meat” – you have to add the rest of the page around it):<code> <ul class="tags"> <MTCategories show_empty="0" sort_by="title" sort_order="ascend"> <? $count = <MTCategoryCount>; $fontSize = 1; for ( $i=1;$i<10; $i++ ) { if ( $count > $i ) { $fontSize = $fontSize + .1; } } for ( $i = 10; $i < 300; $i=$i+20 ) { if ( $count > $i ) { $fontSize++; } } ?> <li> <a href="<MTCategoryArchiveLink>" title="<MTCategoryCount> Entries" style="font-size:<?= $fontSize ?>em"><MTCategoryLabel></a> </li> </MTCategories> </ul> </code>
The CSS is pretty much the same as yesterday, although I’ve tweaked it just a little since then:
<code>ul.tags { list-style:none; text-align:justify; } ul.tags li { display:inline; padding:0 .3em; }</code>
-
Late Night Markup Tip
Tired of writing markup? Make too many stupid mistakes, like unclosed tags, unescaped ampersands, unquoted attributes, etc? Stop writing markup in a plain old text editor and switch to an XML editor!\
I’ve been using OxygenXML to write markup for several months now and I find that I make far fewer mistakes there than I did when I wrote everything in BBEdit. I love the one click validated, pretty print, and that it has good code highlighting for other languages (its PHP highlighting is especially good).\
Using an XML editor should save you keystrokes too. Oxygen closes my tags for me, and shows attributes in bright red when they’re not closed. It even goes back and highlights the opening tag when your cursor is at the end tag. Nice.\
Yeah, it’s midnight and I’m awake. Gotta wait twenty more minutes before my pain pill, then it’s sleepy time. -
Importing Your Del.icio.us Tag Cloud In Movable Type
Someone on the Movable Type ProNet list asked how to import their del.icio.us tag cloud into thier blog a couple days ago, and since I’m stuck here on the couch, I’d see if I could figure out an easy way to do it… and you know what, there is!\
All you need to install is the very cool MTGetXML plugin, and create yourself a new index template. The important bit to add is this:<code><ul class="tags"> <MTGetXML keeproot="0" location="http://USERNAME:PASSWORD@del.icio.us/api/tags/get?" cache="60"> <MTGetXMLElement name="tag"> <li style="font-size:<MTGetXMLValue name="count">em"> <a href="http://del.icio.us/USERNAME/<MTGetXMLValue name="tag" encode_url="1">" title="<MTGetXMLValue name="count"> links"> <MTGetXMLValue name="tag"> </a> </li> </MTGetXMLElement> </ul></code>
* USERNAME = del.icio.us username
* PASSWORD = del.icio.us password\
Here’s what my CSS looks like to get my tag cloud to look the way it does:<code>ul.tags { list-style:none; text-align:justify; } ul.tags li { display:inline; padding:0 .3em; }</code>
And in case you missed the link earlier, here’s what it looks like. Enjoy!\
Update: And because I couldn’t sleep, I did the same thing with my categories. It was a little more involved (because I have some categories with more than 100 entries in them, I didn’t map them right to font sizes, so I had to do MATH!). I kinda like it. It takes some PHP (for the math bits), but it’s almost as easy. I’ll post my template for it later. -
5 In The Morning and Can’t Sleep? Time To Mess Up Your Blog!
I got about two hours of sleep. It’s really hard to sleep with a foot that’s on fire.\
You may notice a couple different things if you read the main page of the site. I’ve added a couple links, and moved some stuff around. What’s cool, is it took very little markup changes to do what I wanted. With the new three column layout, things were feeling a little cramped. So, on the main page, the stuff that used to be on the right is now at the bottom under the entries. It should clear out some room for the content and make it easier to read.\
The best part is that the different formatting of the menu on the home page is almost entirely CSS. I had to move the markup down there on the homepage (it’s just an include), and I needed to fix a couple url-encoding bugs to get the page to validate again, but to get the pics, links and feeds to line up the way I wanted just meant some descendant selectors from #body. Mmmm, I love CSS.\
I think it’s time for more pain pills… -
A Fun Javascript Puzzle: Shortcut Icons
Someone at work asked about this and I can’t find the answer. And, because my foot hurts and I can’t sleep, I figured I’d give it a shot.\
This is my attempt, and it doesn’t work in anything but Opera 8.5 (that I’ve tested so far), as you can see. Any ideas?\
Before you start, here’s what I found with my example:- Firefox and Safari both report no errors when I try to change the shortcut icon.
- Firefox actually updates the DOM to point to the new image, but the browser doesn’t display it.
- It doesn’t work in IE, but I had someone else test it and I didn’t get any more details other than it doesn’t work.
- I’ve only tried one way of doing it so far, but I can’t think of anything else that would work at the moment (paaaaaain piiiiiiiills).\
Got any ideas? Isn’t it a fun little conundrum?\
UPDATE: I’ve got something working in Firefox! Check out attempt two. It removes the shortcut icon link and appends a new one to the head. Still doesn’t work in Safari, and I don’t have IE at the moment to test, but it’s progress. If you try it in IE, please let me know if it works.
-
I Guess It’s My Turn…
First Sheryl Swoopes, and now George Takai come out of the closet. It must be the week for it. Ok, my turn. I was in the closet this morning, and now I’m out. I was looking for a shirt, and with the crutches and the fact that my closet is upstairs? I don’t plan on going back in the closet anytime soon.
-
Home
We’re home, I have a big splint/bandage combination on my leg, and I’m high… high as a kite.\
Dr. Wilson says everything went well, but I forgot to ask him if I could keep the bone. Stupid oxycontin.\
I don’t expect to do much for the next couple weeks except watch movies, take a lot of pain pills followed by lots of naps and try not to get bored. I don’t have a lot of experience writing code while on painkillers, but I might try it…\
Oh, and this was announced today on the microformats list if you’re into that sort of thing. It was a lot of fun coming up with it, and I can’t tell you what product we’re building that drove its creation, but it may be the coolest thing I’ve ever worked on at AOL.\
More details when I’m less high. -
My Headshot for SxSW
I could take a new one, but I just don’t have time between now and surgery on Friday. I think this’ll have to do.\
This photo came from my first trip to Dublin – although I should probably just ask Dan if I can use this one