August 2008 Archives

Sensible Link Management in Movable Type

| 4 Comments | No TrackBacks
Please note the following has only been tested on version four of the software!

After I had installed my Movable Type blog software, I was quickly coming up to speed on some basics necessary to publish an aesthetically-pleasing and comfortably-navigated blog. However, I quickly noticed a feature that is not readily available: customizeable link management.

One must pose the question why this feature is not part of the standard build. But, thanks to the guys and gals in #movabletype on freenode, I was pointed to a plugin called LinkRoller. The author of the software, "arvind", pushed me in the right direction, and thanks to the modular design of Movable Type, I was up and running quickly.

If you want the ability to customize your links within your blog, this is what you need. First, download the software and follow the installation instructions. Installation for me was a breeze, and I encountered no issues. The brief video on the installer page will quickly demonstrate how to create links. At this point, you should go ahead and create a link such as this one following the video provided on the download page. Use a sensible tag and description fields. This will be demonstrated shortly.

Now you must somehow display your links on your blog. To do this, you need to create a widget and then choose where to display it. Navigate to Design > Widgets in the control panel.  Select "Create widget template" from "Widget Templates" and enter "LinkRoller" in the top form field. Next, choose one of the following examples:

If you simply want all of your links displayed in one menu (not sorted), copy and paste the following code in code form field:

<div class="widget-linkroll widget">
    <h3 class="widget-header">Interesting Links</h3>
    <div class="widget-content">
    <MTLinks>
    <MTLinksHeader>
    <ul>
        </MTLinksHeader>
            <li><a href="<$MTLinkURL$>"><$MTLinkName$>: <$MTLinkDescription$></a></li>
        <MTLinksFooter>
    </ul>
    </MTLinksFooter>
    </MTLinks>
    </div>
    
</div>

This is good, but not necessarily satisfying or flexible enough for some. Naturally, I, along with others, wanted a mechanism to classify the link entries in accordance with tags. Thanks to one clever poster this can be done as follows:

<div class="widget-linkroll widget">
<h3 class="widget-header">Interesting Links</h3>
  <div class="widget-content">
    <mt:Tags type="asset" sort_by="name">
      <ul class="widget-list">
      <li><h4><mt:TagName></h4></li>
      </ul>
      <MTSetVarBlock name="linktag"><mt:TagName /></MTSetVarBlock>
      <ul class="widget-list">
        <mt:Assets type="link" tag="$linktag">
          <li><a href="<mt:AssetURL>"><mt:AssetLabel escape="html">: <mt:AssetDescription></a></li>
        </mt:Assets>
      </ul>
    </mt:Tags>
  </div>
</div>

After choosing one of the two options -- or rolling your own -- click save and return back to the widgets page. Before publishing your blog so you can see your links, the final step is to place the widget in your selected widget set. Under "Widget Sets", select your layout and drag your newly created widget from "Available Widget" to "Installed Widgets". Once you have pressed "Save Changes" and the system finishes the update, you can now publish your blog.

link_roller_widget.gif
Happy linking!

Google Street View In My Neighborhood

| No Comments | No TrackBacks
On the way to work this morning -- and just outside my flat -- I spotted the Google street view car. Seems this one was a little Vauxhall with an even bigger panoramic camera array mounted prominently on the roof. The image below I snapped with my mobile camera while I was walking, so it's not the perfect photo. However, you can still make out the Google logo on the door:

google_streeet_view2.jpg
Sightings of Google's controversial vehicles are nothing new. On its début in London, it was widely publicized with one being stopped by the police. I for one welcome our enterprising overlords -- it's far more comfortable than the real "big brother's" never-ending installation of video surveillance on every street and in every tube station. Some day when you have nothing better to do, spend time cruising the virtual Google street view, it's amusing what you can find frozen in time.

2008 Olympics

| No Comments | No TrackBacks
Well, what a games this has been! Beijing put on quite the show, and the facilities were first rate, too. I'm starting to wish I was actually there. Never mind the fake buildings and lip syncing nine year old (which by the way I think is down right pathetic and sorry) -- all kinds of records were broken and there was a few surprises from the good ol' USA.

A while back I was in Kazan, Russia. While hanging out one night in the super club 51st State, I ran into two rather tall American guys. Both were 6'8" plus. While sharing a few drinks, they told me how they were playing volleyball for a Russian team in Kazan, but would be heading to Beijing to play for the USA men's team.

To be honest, I didn't give it much thought other than I thought it was cool. I did however promise them I would watch them play. Well, a few months past, and I completely forgot about it. However, while watching the final gold medal match, I suddenly remembered about these two guys. I recognized both of them. One is Lloy Ball (I believe the team captain) and Clayton Stanley (super spiker).

It was quite the thrill to see these two guys help take out the defending champions Brazil.  Lloy is apparently a four time Olympian and a distinguished veteran of the sport and was one of the star players throughout the match. Clayton scored 20 points in the match and ended up with the Gold medal match point winning spike!

Bravo guys! What a match! I hope I run across you two again. I wouldn't mind buying you guys a drink.

Cheers!

Master Boot Record Oops

| No Comments | No TrackBacks

One of my colleagues has a laptop that dual boots with Windows XP (R) and Ubuntu (Hardy Heron). He received a new laptop and wanted to move the partitions from the old hard drive to the new laptop's hard drive.

The data migration went well, and the laptop would boot straight into Windows, so we needed to install grub back to the master boot record (MBR). Naturally, we booted off the Hardy CD, and I figured we'd just reinstall Grub to the MBR straight from the Grub menu.

Now, this is quite straightforward. You simply boot from a livecd, mount the root and/or boot partition(s), chroot and drop to the grub shell. Finally, do something like:

grub> root (hd0,0)
root (hd0,0)

or

grub> find /boot/grub/stage1
find /boot/grub/stage1
 (hd0,0)
grub> setup (hd0)

However, we received:

grub> find /boot/grub/stage1
Error 15: File not found

Well, that's not good! I considered trying

# dd if=/boot/grub/stage1 of=/dev/sda count=1

but didn't have the courage to do it and looking back on it now it wouldn't have worked anyway. So instead I ignorantly copied the MBR from the other disk as it was supposed to be a clone and applied it to the new disk using dd of course.

The outcome WAS NOT PRETTY! Grub could not find any partition. In short, the file allocation tables were all wrong. Not to worry, we just loaded up Winternals ERD and ran a lengthy scan on the disk. I figured the $2345245 software would surely bail us out of this mess. Wrong!

The solution was this gem of an open source beauty. I loaded this on a USB stick, booted off the Heron livecd, and ran the binary it ships with. Within minutes it found the correct partitions and we were able to restore the MBR with the correct file allocation tables.

However, we were just back to square one and needed to install Grub to the MBR. We figured out that what done us over in the first place was the fact the Ubuntu partition was not the active partition. Easily fixable:

# fdisk /dev/sda 
... 
Command (m for help): a 
Partition number(1-5): 2 
... 

At this point we were able to boot back into the livecd and run grub correctly. Lesson learned -- just because you've done something numerous times that should be straightforward -- backup!

About this Archive

This page is an archive of entries from August 2008 listed from newest to oldest.

September 2008 is the next archive.

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

Pages