Monthly Archives: September 2009

Movable Type 3.34 to WordPress 2.8.4

As you can see, I have moved my blog over to WordPress. Actually, the whole domain, ZackVision.com, is powered by WordPress.

If you see any problems, please comment on this post or contact me.

I was using Movable Type 3.34 which came out in January 2007 and was now badly outdated. The reason why I hadn’t upgraded is because I was using a lot of hacks and had made my own modifications to the core code.

A few months ago, I ran into major problems with spam comments. That got me thinking about an upgrade. I was, however, able to solve the spam issue with MT-Akismet.

I downloaded Movable Type 4.2, the latest version, and played around with it. I liked it, but I realized that none of the plugins I was using had an upgrade for MT4. Also, I could find very few amateur bloggers on Movable Type. Professional websites and blogs were mostly using Movable Type, but the rest of the bloggers had switched to WordPress long ago.

I had already been using WordPress for a private blog and so I decided to take a look at the latest version of WordPress and how I could migrate my blog to it.

There were a few things I had to give up: No more MathML or serving all pages as application/xhtml+xml; no OpenPGP signed comments.

I also had to modify the Movable Type export script and WordPress’s import script so I could keep the same post IDs and slugs (basenames) as well as import tags and convert the content based on the text filter used in Movable Type.

Here are changes required in Movable Type 3.34′s lib/MT/ImportExport.pm file:

--- ImportExport.pm.orig        2009-09-23 11:25:12.975789000 -0700
+++ ImportExport.pm     2009-09-23 11:25:12.764003000 -0700
@@ -529,27 +529,27 @@
     $tmpl->text(<<'TEXT');
 AUTHOR: <$MTEntryAuthor strip_linefeeds="1"$>
 TITLE: <$MTEntryTitle strip_linefeeds="1"$>
+BASENAME: <$MTEntryBasename$>
 STATUS: <$MTEntryStatus strip_linefeeds="1"$>
 ALLOW COMMENTS: <$MTEntryFlag flag="allow_comments"$>
 CONVERT BREAKS: <$MTEntryFlag flag="convert_breaks"$>
 ALLOW PINGS: <$MTEntryFlag flag="allow_pings"$>
+POSTID: <$MTEntryID$>
 -----
 BODY:
-<$MTEntryBody convert_breaks="0"$>
+<$MTEntryBody$>
 -----
 EXTENDED BODY:
-<$MTEntryMore convert_breaks="0"$>
+<$MTEntryMore$>
 -----
 EXCERPT:
 <$MTEntryExcerpt no_generate="1" convert_breaks="0"$>
 -----
 KEYWORDS:
-<$MTEntryKeywords$>
+<MTEntryTags include_private="1" glue=","><$MTTagName$></MTEntryTags>
 -----
 <MTComments>
 COMMENT:
@@ -558,7 +558,7 @@
 IP: <$MTCommentIP strip_linefeeds="1"$>
 URL: <$MTCommentURL strip_linefeeds="1"$>
 DATE: <$MTCommentDate format="%m/%d/%Y %I:%M:%S %p"$>
-<$MTCommentBody convert_breaks="0"$>
+<$MTCommentBody$>
 -----
 </MTComments>
 <MTPings>

And here are the changes required in WordPress 2.8.4′s wp-admin/import/mt.php:

--- mt.php.orig 2009-05-05 12:43:53.000000000 -0700
+++ mt.php      2009-09-23 11:49:00.182602000 -0700
@@ -375,6 +375,15 @@
                                        $post->post_title = $title;
                                else if ( 'ping' == $context )
                                        $ping->title = $title;
+                       } else if ( 0 === strpos($line, "BASENAME:") ) {
+                               $postname = trim( substr($line, strlen("BASENAME:")) );
+                               if ( '' == $context )
+                                       $post->post_name = $postname;
+                               else if ( 'ping' == $context )
+                                       $ping->post_name = $postname;
+                       } else if ( 0 === strpos($line, "POSTID:") ) {
+                               $postid = trim( substr($line, strlen("POSTID:")) );
+                               $post->import_id = $postid;
                        } else if ( 0 === strpos($line, "STATUS:") ) {
                                $status = trim( strtolower( substr($line, strlen("STATUS:")) ) );
                                if ( empty($status) )

I also added the following to the .htaccess file to handle the redirects needed from my old URLs to the new ones:

RewriteEngine On
RewriteBase /
# Old Monthly archives
RewriteRule ^weblog/archives/([0-9]{4})/([0-9]{2}) weblog/$1/$2/ [R,L]
# Old single entry links
RewriteRule ^weblog/archives/000([0-9]{3}).html$ ?p=$1 [R,L]
# Another old single entry links
RewriteRule ^weblog/archives/entry/000([0-9]{3}).html$ ?p=$1 [R,L]
# Old category archives
# Change underscores to hyphens
RewriteRule ^weblog/archives/([^_]*)_([^_]*)_([^_]*)_(.*)$ weblog/category/$1-$2-$3-$4/ [R=301,L]
RewriteRule ^weblog/archives/([^_]*)_([^_]*)_(.*)$ weblog/category/$1-$2-$3/ [R=301,L]
RewriteRule ^weblog/archives/([^_]*)_(.*)$ weblog/category/$1-$2/ [R=301,L]
RewriteRule ^weblog/archives/([^0-9]*)$ weblog/category/$1/ [R,L]
# To handle the old MovableType feeds.
RewriteRule ^weblog/atom\.xml$ feed/atom/ [R,L]
RewriteRule ^weblog/index\.xml$ feed/ [R,L]
RewriteRule ^weblog/index\.rdf$ feed/ [R,L]
# To handle old Movable Type permalinks.
RewriteRule ^weblog/([0-9]{4}/[0-9]{2}/.*)\.html$ $1/ [R,L]

I liked the iNove theme and installed it with some modifications done via child theme.

I have also installed the following plugins:

  1. About Me widget
  2. Akismet
  3. AmazonFeed
  4. AVH Amazon
  5. Collapsing Archives
  6. Contact Form 7
  7. Easy AdSense
  8. Efficient Related Posts
  9. Google Analyticator
  10. Google XML Sitemaps
  11. Lifestream
  12. NextGEN Gallery
  13. Now Reading Reloaded
  14. Page Links To
  15. Recommended Reading: Google Reader Shared
  16. Rich Text Biography
  17. JanRain RPX – Authentication from Facebook, Twitter, Google, Yahoo, Windows Live ID and OpenID
  18. Search & Replace
  19. Search Meter
  20. Sociable
  21. Thread Twitter
  22. WP-Syntax
  23. XML Google Maps

I am also working on a fork of Now Reading Reloaded. It will be for movies and will be called Now Watching. Once I have tested it, I’ll release it here and on the WordPress site.

While the blog itself has been completely moved over to WordPress, I am still working on migrating the other static pages. Also, my list of books read and movies watched is still not back yet.

Related Reading

Italy Day 7: Venice to Rome

We woke up early in the morning and, after breakfast, headed to the Santa Lucia train station to go back to Rome.

The Italian train system has some strange seat numbering. When making reservations, I had asked for seats together and the numbers were consecutive. But the seats were not really together. There were four seats, two on each side of the aisle, facing four other seats. Instead of having three seats together on one side of the aisle, however, we had three seats that were diagonal from each other. So two two diagonal seats on one side of the aisle and one seat on the other side. That was odd, but there was a nice South African couple there who were also split on both sides of the aisle and we switched seats.

In about four and a half hours, we were in Rome. We went to Hotel Amalfi and checked in. After lunch, we decided to do some sightseeing. We took the metro to Spagna and walked to Ara Pacis Augustae. The ticketperson there was really surprised that we wanted three audio sets, but Michelle did want her own.

Ara Pacis
Ara Pacis
Papal Basilica of Saint Mary Major
 

It was a hot day, the hottest during our trip and Michelle wanted to get into the water fountain just outside Ara Pacis when we went back outside. After she had cooled down in the water, we walked around looking at the Mausoleum of Augustus, which is not open to tourists. We also looked at every church in the neighborhood.

Then we decided to head south. Passing by the Chamber of Deputies and Pantheon, we stopped for some gelato. We wandered around Campo dei Fiori and Piazza Farnese and on Via Giulia.

As we stood in the long line at the popular pizza restaurant, Da Baffetto, we realized a mistake: We were almost out of cash and the restaurant didn’t accept credit cards. Instead of looking for an ATM, we decided to go to Da Sergio instead. Their pasta was good, but the waiter didn’t know any English, so communication was a bit difficult.

The next day, we took the train to the airport. There we realized that our flight was not from Terminal C, the main terminal for international flights, but from Terminal 2, for which we had to take a bus in front of Terminal C as it wasn’t within walking distance. That terminal looked like it was for all US-bound flights. At first, we had to go through security counters and then check in at the airline counters. Finally, after checking in, we realized that our gate at Terminal 2 didn’t have any aircraft. Instead, we got on a bus and went to the plane which was parked next to Terminal C. It was an odd situation and reminded me of Pakistan and other strange places.

Ten hours later, we were back in Atlanta and home.

Michelle has been saying since we returned that she wants to go back to Italy when she’s 10 years old. Sometimes, she even wants to go live in Italy and eat gelato every day.

Photographs from Venice and Rome are below the fold on Google Maps.

Read more »

Related Reading

Italy Day 6: Venice

Our second full day in Venice we focused on what tourists do immediately on reaching Venice: Piazza San Marco or St Mark’s Square. Part of the square was closed off with chairs in that area due to an event later. There was also some work going on to prevent flooding of Piazza San Marco.

We got in the line for St Mark’s Basilica. It is a great church with mosaics and decorations on the facade. Inside the church is full of mosaics depicting St Mark’s life as well as Virgin Mary and other subjects. Pala d’Oro is dazzling and we liked the Treasury too.

Going upstairs to the Galleria and the Museo di San Marco was of course required for us museum lovers, but it also gives a good view of the church interior and you can go outside for a nice look at the square. The four horses that you see outside on the Basilica in the photograph below are of course replicas and the originals are inside in the museum.

Since we were getting hungry, we decided to have a light lunch at Caffè Quadri.

Piazza San Marco
Horses of St Mark
Piazzetta
Palazzo Ducale
Procuratie Vecchie
 

Doge’s Palace or Palazzo Ducale is where the Venetian rulers lived and of course it’s worth visiting (I could even live there, especially with artwork from such luminaries in every room).

Museo Correr has some Venetian art and history, though its collection isn’t great.

Then it was time to go up to the top of the Campanile. Fortunately an elevator takes you up to where the bells are housed. It provides a good view of Venice, the lagoon and the mainland. You can see the photographs I took from there at the end on the map.

We went for dinner at Osteria al Garanghelo which had decent food and was not expensive.

Lots of photographs on Google Maps follow under the fold below.

Read more »

Related Reading

iTunes U and Podcasts

Specs listed the podcasts she listens to and Razib also mentioned a podcast recently, so I thought I should list the stuff I have been listening to on my iPhone and may be Razib and others can chime in with some suggestions.

Here’s my current list of podcasts:

In addition, here are some courses and lectures on iTunes U and as podcasts that I have been listening to or that are in my listening queue:

What do you recommend?

Related Reading

Italy Day 5: Venice

Venice is a strange city. It seemed like a ghost town to me. There were lots and lots of tourists but where were the locals? May be they live away from the center or go away during the tourist season. Also, in Rome, tourists are spread out all over the city at all kinds of sights, but in Venice, it looked like there are only a couple of places a majority of tourists were interested in. There was a large crowd at Rialto bridge and St Mark’s Square was of course packed, but otherwise one could lose oneself in the alleys of Venice without encountering too many people.

Venice is also where I realized how useful bringing my GPSr loaded with maps (covered by a Wired article now. The narrow streets and alleys didn’t seem to have a pattern and there were lots of dead ends and branch canals blocking your way.

We started the day by going to the Rialto bridge. At the market, Michelle bought a face mask which you can see in the photographs below.

After wandering about there for a while, we decided to go for a gondola, a traditional Venetian row boat, ride. Of course, all tourists want a ride and these are expensive costing 100 euros for about 35-40 minutes. The gondolier took us on the Grand Canal and then some side canals, pointing out different landmarks.

Then we wandered about in the San Marco district carefully avoiding Piazza San Marco (St Mark’s Sqaure). Since we are museum geeks, we went to Gallerie dell’Accademia which has some really nice Venetian art. Unfortunately they have a “no photography” rule.

Later we walked about looking at different squares and buildings and eating gelato.

To see the Grand Canal we decided to ride the ferry (vaporetto). First we rode it to San Zaccari and then back towards the train station but we got off at Ca’ d’Oro, a Venetian Gothic palace. We took the traghetto, a gandola ferry, across the Grand Canal from Cannaregio district to San Polo and Santa Croce.

We had gelato at Gelateria San Stae and then went to see the Basilica of Santa Maria Gloriosa dei Frari. Around the corner from there was Scuola Grande di San Rocco. There was a very nice chocolate shop there, but unfortunately it was closed on the weekend.

Crossing the bridge into Dorsoduro district, we visited Ca’ Rezzonico, a palace that now houses a museum. I have a couple of photos from their courtyard.

It was time for dinner for us, but Italians eat late. So we wandered aimlessly, enjoying the narrow streets and narrower canals. Finally we got to Vecio Fritolin where we had a nice dinner outside and also a good conversation with a French couple.

Photographs are below (click “Continue Reading” if you are on the main page) on the map.

Read more »

Related Reading