Migrating MovableType to WordPress

This is a migration guide I wrote solely for the benefit of myself. Although I don’t think I need it the second time, to have a detailed reproduce steps written and modify to reflect the actual steps are the basic skills of a support engineer (by training).

The Problems

The basic export/import stuff works for MovableType to WordPress – pretty straight forward. There are only three minor issues that prevent the smooth transition.

Problems 1: URL change.

My MovableType uses a naming system I created, not the default. The Individual Entry Archive page URL was:

<$MTArchiveDate format=”%Y%m%d”$>_<$MTEntryTitle dirify=”1″$>.htm

After exporting, the URL is renamed by the base name of the MovableType, not the full name. For example, URL:

http://home.wangjianshuo.com/archives /20060127_long_vacation_of_spring_festival_comes.htm

becomes

http://home.wangjianshuo.com/archives/ 20060127_long_vacation.htm

The solution:

Unlike most of the solutions found on Internet, I am going to change the base_name in the Export file itself. I will change the MTOS-4.38-en/lib/MT/ImportExport.pm file. I am going to change the line

BASENAME:<$MTEntryTitle dirify=”1″$>

to

BASENAME: <$MTArchiveDate format=”%Y%m%d”$>_<$MTEntryTitle dirify=”1″$>

This should solve the problem to let WordPress know the right way to preserve the URLs.

Dash Problem

This solve the old post problem that was imported from MovableType. For the new post, the problem is with the “-“. WordPress uses dash instead of underscore to replace non-alphabetic characters. I just need to go to wp-includes/formatting.phpfile and change all the dash, to underscore in the function sanitize_title_with_dash. This solve the future post problem to make it consistent with the older posts.

Update July 25, 2012

Be sure to comment out the following line:

preg_replace(‘|-+|’, ‘_’, $title);

Because WordPress just leave – as it is, and replace it to underscore causes many previous articles broken.

Problem 2: Encoding difference

The default encoding of MovableType was ISO 8859-1, and WordPress uses “UTF-8” (right choice). The steps in the migration plan solved the problem. Otherwise, the problem I met was, the content after the special character, like ASCII code 92 was cut off, which is a necessary replacement of a single quote ‘.

WordPress uses UTF-8 as the default encoding. So if your MT blog uses ISO 8859-1 or Latin – 1 to encode posts, convert the posts to UTF-8 before importing, to ensure that all characters display properly.

On *nix and OSX you can use the iconv program to convert your import.txt file: $ iconv -f ISO-8859-1 -t UTF-8 import.txt > import_new.txt

After I did the conversation, I went on for the extra mile to use the following command in vim to change all the annoying encoding x92, x93, x95 to its proper format:

:%s/[|]/’/g (119, and 1623 replaced)

:%s/[|]/”/g (979 and 897 replaced)

:%s//o /g (334 replaced)

:%s/[|]/-/g (323 and 264 replaced)

If the original MT uses UTF-8, it won’t be a problem, although the exported file is not directly readable in editor in Mac.

Problem 3: Convert Line Breaks

By default, when I use two lines to separate a paragraph, but in WordPress, it becomes a single line and the two paragraphs are put together with only one line break.

It turned out the bug 16147 is exactly talking about the problem and fixed the problem. Just go to the importer.php file and remove the following line.

 (if( !empty($line) ))

Something to note is, since WordPress load plugins automatically, /wp-content/plugins/movabletype-importer/movabletype-importer.php does not exist in the downloaded package.

Problem 4: The Chinese Title

Using the sanitised title as part of URL is good to keep it unique, but the Chinese title causes problems. You cannot just use the Chinese encoded names as WordPress, resulting huge number of % and numbers in the URL. The original less of consideration of MovableType actual worked very well by just taking some a or e out of the encoded title, but need some research.

Configuration

After migration, there are some configuration work. Basically by looking at the admin tab one by one, we can get some idea. Here are some outline:

1. Configure the upload file folder.

2. The URL slug – use %year%%monthnum%%day%_%post_name%.htm

3. Open XML-RPC

4. Change display name for default user.

Done

That should be all I have to do. Did some quick research and quickly fixed the problem. I am going to do the actual migration the next weekend. Then you will see a brand new blog.

Thinking about Switching to WordPress

I am a one with emotions. I have been using MovableType for almost 10 years – daily. There are many great memories with MovableType. I know their founders (well, met briefly during my first Silicon Valley trip), and I know many of their people (well, early employees, not sure if they are still there). They even hosted a 6 year blogging anniversary for me in their office. I am using MovableType daily for so long. To be short, I loved MovableType, and the team.

However, recently I really got pissed off by the slowness of MovableType and its almost stopping on development. There are still bug fixes, but it is not interesting. In a Saturday morning, I started to think, shall I still stay on MovableType?

My whole 10 years of daily blogging started with a post named: MovableType Successfully Installed on Windows XP. I didn’t expect the 10 year journey started there. Today, I had the idea to install WordPress, and give it a try (with a little bit sense of guilty deep in my heart). It turned out that the installation went well, and it did complete in 5 minutes.

I am going to test run on this blog for a while, and decide whether I want to migrate the site to WordPress. That may be another journey. I’d like to take the chance to thank MovableType team, for allowing me to use the software for so long and to spend thousands of hours on it, to create something I am proud of after many years.

P.S. This post was posted on WordPress first, and copied here.

An Even Better Way to Record Life than Twitter

I thought twitter, and in China, its counterpart (copier) Weibo, was

the best way to record life, especially with the nicely done iPhone

App. I know blogger.com has the ability to allow people send emails to

it, and have it posted. MovableType has a plugin called PostOffice,

that serve exactly the same propose. Now, i am writing an email to an

email address I setup, and it will automatically appear on my blog.

Pretty old technology, but it works. The good thing is, I can start to

use as many applications, including email clients to send to this

address.

Hopefully, you will see this post within few seconds. MovableType is

still great.

Google Reader Support PubSubHubbub

One of the most significant steps of the promising PubSubHubbub protocol is, Google Reader started to support PubSubHubbub. That means, a post on this blog will appear in Google Reader (and Google Buzz in Gmail) immediately after I click Save. That is cool. I am happy I finally enabled PubSubHubbub support on this blog the other day.

Again, welcome to the world of real time web.

Update February 21, 2010

P.S. My test shows, this update appears in Google Buzz about 10 seconds after, but it took about 1 minute to appear in Google Reader. Maybe it is because of cache (enemy of real-time web), or high volume?

Enabled PubSubHubbub on my Blog

I am excited about the PubSubHubbub project, and was amazed by its simplicity and scalable design.

I finally downloaded the MovableType PubSubHubbub plugin and installed it 5 minutes ago. If it works as it is expected to work, and after Google Buzz and other crawler update my RSS XML the next time, the magic will happen. You will start to see my blog post in real time (well, almost real time by few seconds delay) in your Google Buzz. With more and more services supporting PubSubHubbub, more and more people will see this real time functionality.

What is it

Simply put, PubSubHubbub, despite of the weird name, is a very easy and simple protocol.

Every time I hit the “Save” button in my MovableType editing page, it will ping a server called http://pubsubhubbub.appsport.com (it can be any other similar services, I just used it as an example), and that server will ping all the subscribers, like Google Buzz, to tell them something has happened. Then they will get back to my blog to get the latest entry. That replace the current pull method – readers needs to check at an interval – waste of time, and can be huge delay.

Real Time Web

The web is continuously changing. I am excited to enter the real time web today.

Six Apart’s Problem?

Whenever I search for some plugins on MovableType community, I constantly run into the great plug-ins by Byrne Reese. The plugin that is in my head is AutoLink. I am thinking about installing it tonight. However, when I just browse the articles on Byrne’s website, I stumbled upon an article dated back to December 5, 2008: A sad departure from Six Apart and looking to the future. Byrne left the company? It was from that entry did I understood that Six Apart has done 8% layoff in November 2008.

I Do Care about Six Apart

Long time readers of this blog may understand my love to MovableType and its creator, Six Apart. Without MovableType, I am very sure I won’t have started blogging 7 years ago, and won’t write for 7 years. My blog started just as a test drive of MovableType in 2002, and my first entry of this 7 year old blog was exactly about my experience of installing the software: < href="http://home.wangjianshuo.com/archives/20020911_movabletype_successfully_installed_on_windows_xp.htm">MovableType Successfully Installed on Windows XP. In the last 7 years, I used MovableType more often than Windows. I open MovableType everyday, and I even don’t do so for Windows (I also used Unix system).

I still remember my first visit to Six Apart office by introduction of Chris (CEO of Rojo.com at that time, and later became CEO of Six Apart), met Mena and Ben, and visited the office many times later. I also enjoyed hosting my friends Ginger and Seki in Shanghai.

My friends in Six Apart treated me so well. On for 5th Anniversary of blogging, the whole Six Apart team had a wonderful celebration party for me, and Ginger brought me to see baseball game at AT&T Park.

It would be fair to say, I am a hard-core MovableType fan, friend of the company, and the person who cares about this company a lot.

My Thoughts about Six Apart

From the upgrade of MovableType from 3.x to 4, my direct feeling is Six Apart is losing its focus, and slips to the wrong direction. I said, MovableType 4.2 is disappointing after I had been expecting it for a long time. But that is not the key problem. I just feel Six Apart is doing too many things at the same time, and now, MovableType is no longer the focus of the company. I am very sure that my friend in Six Apart will argue that MT is still the most important product, but importance is really measured by resources put into it.

I read about Chris’ post about Changes of Six Apart:

This year was one of profound growth and change for Six Apart. In addition to welcoming almost 90 new people and growing to a company of over 200 employees, we launched Six Apart Services, Six Apart Media, Blogs.com, Movable Type Open Source and MT Pro, a suite of TypePad-powered products, including Blog It, Blog Link, the TypePad iPhone app and TypePad AntiSpam, and reached the final stage of the biggest technical project in the company’s history: the migration of TypePad onto a new platform. And, as you all know, we aren’t done yet, with several of our most significant product releases still to come this year.

.

Let me count the initiatives:

  1. 90 new people (almost double) in one year
  2. Six Apart Services
  3. Six Apart Media
  4. Blogs.com
  5. MovableType Open Source
  6. MT Pro
  7. Typepad-powered products
  8. Migration of the Typepad platform

I believe this was just the new initiative in 2008, and there are many lasting projects accumulated from as early as 2002 when the company was formally founded. All those projects need maintaining resources.

Among all the initiatives, I think I personally have most concern toward Six Apart Services, and Media. Although it is where revenue comes from, but don’t forget about the cost side of the equation. Any company has its unique DNA. Who founded the company? What is the story? Who hired the first 10 people? What format the company meeting is? All these small details makes a company unique, and optimized for one particular task. Simply put it, I don’t think the same group of people who build blogging software can do service well, or sell advertisement well, or the other way. The result is either a hard-core engineering team building great software + a so-so advertising and services team (the best possible situation), or a diluted so-so engineering team + a so-so advertising/services team (most possible).

That is the reason why Ben can ship MovableType 1.0 with one person, and now 200 people shipped MovableType 4. Don’t get me wrong. MovableType 4 IS great in many aspect, but I am just talking about the ratio of resources put into it, and the outcome. Till now, I still think MovableType 3.2 is the best blogging software in the world – I still have my Chinese blog, and my friends’ blog running on it. MT 4 is great in functionality, but the core is not about functionality for many people, it is about simplicity, reliability, and speed, which I think MT 3.2 is better.

In tough times, it is even more important to keep focus. My personal bias is, Six Apart was a great technical company and should remain to that core. I know everyone faces revenue challenges, but doing engineering is the most cost-effective way to run a company, isn’t it? Saving the cost of expansion to other business also means moving toward profit.

I Still Stand on the Side of Six Apart

Although I have some pretty harsh comments about my great friends there, I want to make it clear that it was just because I care the company so much. I want to see a successful company, and my best wishes goes to Six Apart from Shanghai, China.

Track Click on Elements

I once used the code below to track the clicks on elements on a page. If you know JavaScript, you may understand what it is about.

// Track every click within the page.

document.onclick = function(e) {

    e = e || window.event;

    el = e.target || e.srcElement;

if(el.tagName.toLowerCase() != ‘a’ || el.tagName.toLowerCase() != ‘input’) return true;

    var name = “”;

    var i = 0;

    while(el != document && i++ < 10 && el.tagName.toLowerCase() != "html") {         name = el.tagName.toLowerCase() + (el.id == "" ? "" : "@" + el.id) + (el.className == "" ? "" : "." + el.className) + "/" + name;         el = el.parentNode;     }   _uacct = "###########YOUR GOOGLE ANALYTICS CODE HERE############";   if(typeof(urchinTracker)=='function')     urchinTracker(name);   return true; }

Basically, it just record entries like below in your Google Analytics account.

html/body/.related/a

html/body/#header/div.navigation

Short Pause of Comment System

Sorry that due to an ignored error in the template system, more specifically, the invidual archive template, you may experience some problems when you post your comment to this blog. This problem existed for several days and affecting the few most recent blog entry.

Now the problem has been fixed (Thanks Carroll for the email to bring this to my attention). The good thing is, all the comments you have posted are recorded by the system completely, and they should have shown up now.

MovableType 4.2 is Disappointing

I am trying to migrate Wendy’s blog from MovableType 3.2 to 4.2 Beta, however, after about an hour, I still cannot import the files into the new system. So… I have to get back to MovableType 3.2.

So far, I still believe MT 3.2 is the best blogging software on the earth – simple, fast, and reliable. I don’t like MT 4.0, I don’t like 4.1, and now I don’t like MT 4.2 Beta

Subscription Enabled on This Blog

With the recent hot discussion, I think it makes sense to turn on the Subscription Function for this blog, so you can get notified when someone posted a reply to your comment on the same entry, or when I publish a new article in either the category you are interested in, or for all new articles. I hope you like this new function (provided by Everitz Consulting for MovableType 4).

How it Works?

Subscription is a function provided on this blog that you can get email notification when something interesting happens on this blog.

How to Subscribe?

There are three type of subscription.

The first one is entry level subscription. At the bottom of the comment post form, just before POST button, you will see a check box labeled: "Subscribe to this entry". Check this check box and click POST to get notified for any other comments after you.

image

The second is the blog level subscription. At the bottom of each page, there is a form under Subscribe to Blog. Enter your email in the text box and click GO, you will be notified via email for any new blog entries posted on this blog. Since I write daily, and sometimes twice per day, this is NOT a recommended way to get up to date to this blog. You may try to subscribe via RSS feed here. If you do want to subscribe this way, please be cautious that you will get almost daily email from me, and please do remember that you have subscribed, and don’t call me spammer in the future.

image

The third choice is the Category Level Subscription. You can user the email form under "Subscribe to xyz Category". This is the recommended way to subscribe via email, since you will only be notified for entries on topics you are interested in. As you can see, I write on various topics, and I am sure you may not be interested in all of them.

Remember to Confirm Your Subscription

For any of the three subscription method, you MUST click a link in an email sent to your inbox. This is to protect privacy of my reader. No one can subscribe on behalf of you. If you don’t click the link, you are not subscribed.

Hope this facilitate an even quick and direct communication.

PS: This entry is not available on all individual entries yet. It may takes sometime for the old entries to get rebuilt.

MovableType Dirify Change for UTF-8

This is for MovableType 3.2, but the same for 3.3, or 4.0, 4.01.

In the file /mt/lib/MT/Util.pm, there are two lines. I have to change it from:

LINE 553: sub dirify {

LINE 554: ($MT::VERSION && MT->instance->{cfg}->PublishCharset =~ m/utf-?8/i)

LINE 555: ? utf8_dirify(@_) : iso_dirify(@_);

LINE 556: }

It has to be changed to

LINE 553: sub dirify {

LINE 554: # ($MT::VERSION && MT->instance->{cfg}->PublishCharset =~ m/utf-?8/i)

LINE 555: iso_dirify(@_); # ? utf8_dirify(@_) : iso_dirify(@_);

LINE 556: }

I made all the changes to my installation base of MoableType.

The reason is, I have all the titles dirified to become the URL. In Chinese names, the newer version (which actually fixed a bug) simply turns all UTF-8 (Chinese title) into nothing, which is not friendly for users.

After the change, the entry titled “Wendy说过一句话” will be in URL: http://home.wangjianshuo.com/cn/20071121_wendyeeaee.htm

Although the Chinese part was lost, at least it is some way of distinguishing different entries, and this encoding does not change along with the database. It does not has any type of IDs in it. Imagine if you have entry_id in the URL, and you do an export and import – all the URL changes.

Cool URIs don’t change. This is also what I believe.

MovableType 4.01 and Bluehost CPU Exceeded Error

To run MovableType with a lot of entries (2000+) on Bluehost is painful, since Bluehost has CPU limitation. It checked the CPU a user account is using in 5 minutes. If it was more than certain amount (40 seconds or so), it pops up the CPU Exceeded Error. Recently, they even moved the interval to 60 seconds! That makes a rebuild in possible. It will throw away this error before rebuild complete – in my case, just after I rebuild several pages.

I believe many people experience the same problem: CPU Exceeded Error before MovableType rebuild complete. This is true in 4.0, and 4.01 is not better.

After seeking for the answer for a long time, I finally had an easy solution – to modify the JavaScript code a little bit, and ask MovableType to rest for longer time before each step of the rebuild. Here is what I did.

Propose:

Workaround the Bluehost CPU limit by setting the interval of the build long enough.

File changed:

/public_html/home/cgi-bin/mt/tmpl/cms/rebulding.tmpl

Line Number of the Line Changed:

20

Original:

setTimeout(‘doRedirect()’, 200);

Change to:

setTimeout(‘doRedirect()’, 20000);

That’s it.

You can even try smaller number than 20000 to build faster and then test. Maybe 10000, or several thousands are OK for your server, or your number of archives.

Update May 4, 2008

Changed the line from 60000 back to 20000.

Wangjianshuo’s Blog Template Archives 2007

These are the templates I am using for 2007. In case you are also using MovableType and want to create a blog like this, this may be of help.

Master Archive Index

See it in action: http://home.wangjianshuo.com/archives.htm

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />

<title><$MTBlogName$> Archive</title>

<link rel=”stylesheet” href=”jianshuowangstyle.css” type=”text/css” />

<link rel=”alternate” type=”application/rss+xml” title=”RSS” href=”<$MTBlogURL$>index.rdf” />

</head>

<body>

<$MTInclude module=”Header”$>

<p><i>Daily journal by <a href=”http://home.wangjianshuo.com/archives/20040218_about_jian_shuo_wang.htm”>Jian Shuo Wang</a>, <a href=”http://home.wangjianshuo.com/archives/links/Shanghai/”>Shanghai</a>,

China</i></p>

<h3>Current Column</h3>

<ul>

<MTEntries lastn=”1″>

<li class=”0″><a href=”<$MTEntryLink$>”><$MTEntryTitle$></a> <span class=”small-note”><$MTEntryDate format=”%B %d, %Y” $></span></a>

</MTEntries>

</ul>

<h3>Previous entries</h3>

<p>Here is a long list of all articles I wrote for Wangjianshuo’s Blog. It helps you to quickly locate a blog in the past.

<ol><li class=0>Press Ctrl+F in Internet Explorer to search for title if you happen to remember

<li class=0>Press Ctrl+D to add this page to your favorite.

<li class=0>Click <a href=”http://home.wangjianshuo.com/archives/searchbar.htm” target=”_search”>here</a> to load the list into the search pane, making it easier to navigate through articles</ol>

<p>Alternatives to locate an old entry are:

<ol><li class=”0″>Enter keyword at the Search box on the right-top corner and click Search. It searches the site using Google.

<li class=”0″>Browse my <a href=”http://home.wangjianshuo.com/archives/links/”>directory</a> to see categorized articles.</ol>

<p>Wish you enjoy your stay at Wangjianshuo’s Blog. </p>

<hr>

<MTArchiveList archive_type=”Monthly”>

<a name=”<$MTArchiveDate format=”%Y%m”$>”></a>

<$MTArchiveTitle$>

<ul>

<MTEntries>

<li class=”<$MTEntryCommentCount$>”><a href=”<$MTEntryLink$>”><$MTEntryTitle$></a> <span class=”small-note”><$MTEntryDate format=”%B %d, %Y” $></span></li>

</MTEntries>

</ul>

</MTArchiveList>

<h3>Copyright</h3>

<p>You are encouraged to <b><a href=”http://home.wangjianshuo.com/archives/20030304_link_to_wangjianshuos_blog.htm”>link</a></b> to the homepage of this site or individual

articles. <b>You can quote</b> the content of the article (less than 30%) for free, as

long as you provide a link back to the original page. If you want to use the

<b>whole article</b> and picture on this site, please notify me before doing that – I

will often give you the permission free of charge.</p>

<h3>Questions?</h3>

<p>If it is related to an <b>individual article</b>, leave a comment under the

article. If it is related to the <b>whole site</b>, sign the <a href=”http://home.wangjianshuo.com/archives/20030302_guestbook.htm”>guestbook</a> of this site.</p>

</div>

<h3>Sign up Wangjianshuo’s Blog Update</h3>

<form method=”GET” action=”http://groups.yahoo.com/subscribe/wangjianshuo” target=_blank>

<input type=hidden name=”action” value=”subscribe”>

Do you feel articles on this site useful? Want to get notified when a new article like

this goes online? Subscribe the Wangjianshuo’s Blog Update newsletter now. FREE! |

<a href=”http://home.wangjianshuo.com/archives/20030508_emails_and_privacy_policies.htm#privacy”>Privacy Policy</a> |

<a href=”http://home.wangjianshuo.com/archives/20030428_my_dinner_impacted_by_sars.htm#update”>More Info</a><br>

<br>

<input type=”text” name=”user” value=”enter email address” size=”42″ style=”font-family: Verdana”>

<input type=”submit” name=”Submit” value=”Subscribe”> <i>Powered by Yahoo! Groups</i>

</form>

<script language=vbscript>

On Error Resume Next

For Each e in document.all

If e.tagName = “LI” AND e.className <> “” Then

If CInt(e.className) > 10 Then

e.style.fontWeight = 900

End If

End If

Next

</script>

<$MTInclude module=”Footer”$>

<a href=”http://home.wangjianshuo.com/mt26/mt.cgi?__mode=rebuild_confirm&blog_id=1&tmpl_id=4″><img src=”http://www.wangjianshuo.com/about/logos/dot.gif” width=3 height=3 border=0></a>

<a href=http://home.wangjianshuo.com/cgi-bin/mt/mt.cgi?__mode=view&_type=template&blog_id=1&id=5>+</a>

</body>

</html>

Main Index

See it in action: http://home.wangjianshuo.com

Please note: there are many modules in it. For a list of key modules, please see list at the end of this article.

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<title>Wangjianshuo’s Blog</title>

<meta name=”googlebot” content=”noodp” />

<meta name=”description” content=”Events (in Shanghai) that affect my life (and others’). It is Wangjianshuos’s Blog including Shanghai travel, Shanghai hotels, Shanghai tour, Shanghai map, Shanghai weather, Shanghai bus, Shanghai photos, Shanghai travel advices, Shanghai dining suggestions, Shanghai shopping, Shanghai night, Maglev, metro, and taxi. It also covers Shanghai news, internet access, and mobiles in Shanghai.” />

<meta name=”keywords” content=”Shanghai tour, Shanghai Hotel, Shanghai map; Shanghai weather; Shanghai tour, shanghai taxi; bus, pictures, photos, hotels, attractions, shanghai china.” />

<link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<$MTBlogURL$>index.xml” />

<link rel=”openid.server” href=”http://www.myopenid.com/server” />

<link rel=”openid.delegate” href=”http://jianshuo.myopenid.com/” />

<meta http-equiv=”X-XRDS-Location”content=”http://www.myopenid.com/xrds?username=jianshuo.myopenid.com” />

<meta http-equiv=”Content-Type” content=”text/html;charset=utf-8″ />

<style><$MTInclude file=”jianshuowangstyle.css”$></style>

</head>

<body>

<$MTInclude module=”Header”$>

<center><form name=g style=”margin:0″ method=”get” action=”http://home.wangjianshuo.com/archives/20060120_search_this_site.htm” target=”_top”>

<input type=”hidden” name=”domains” value=”home.wangjianshuo.com”></input>

<input type=”text” name=”q” size=”15″ maxlength=”255″ value=”” style=”width:70%”></input>

<input type=”submit” name=”sa” value=”Search”></input>

<input type=”hidden” name=”sitesearch” value=”home.wangjianshuo.com”></input>

<input type=”hidden” name=”client” value=”pub-8513779941474461″></input>

<input type=”hidden” name=”forid” value=”1″></input>

<input type=”hidden” name=”channel” value=”6801625507″></input>

<input type=”hidden” name=”ie” value=”ISO-8859-1″></input>

<input type=”hidden” name=”oe” value=”ISO-8859-1″></input>

<input type=”hidden” name=”safe” value=”active”></input>

<input type=”hidden” name=”flav” value=”0000″></input>

<input type=”hidden” name=”sig” value=”NdyQdGFpJnNH_B3d”></input>

<input type=”hidden” name=”cof” value=”GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:11″></input>

<input type=”hidden” name=”hl” value=”en”></input>

</form><script language=”JavaScript”>document.g.q.focus();</script></center>

<$MTInclude module=”Headline”$>

<br />

<div class=”lw”>

<$MTInclude module=”PreviousHeadlines” $>

<$MTInclude module=”RecentComments” $>

<$MTInclude module=”HotTopics” $>

<$MTInclude file=”bbs.htm” $>

<$MTInclude module=”Links” $>

<$MTInclude module=”Footer” $>

</div>

<div class=”lm”> </div>

<div class=”le”>

<$MTInclude module=”Holiday” $>

<$MTInclude module=”About” $>

<$MTInclude module=”Archives” $>

</body></html>

Comment Module

<div class=”comments-head”><a name=”comments”></a>Comments</div>

<MTComments>

<div class=”comments-body” id=”<$MTCommentDate format=”%I%M”$>”>

<a name=”<$MTCommentDate format=”%I%M”$>”></a>

<$MTCommentBody$>

<span class=”comments-post”>Posted by: <a href=”http://user.wangjianshuo.com/<$MTCommentAuthor encode_html=”1″>.htm”><$MTCommentAuthor$></a>

<MTIfNonEmpty tag=”MTCommentURL”>

(<a href=”<$MTCommentURL$>” rel=”nofollow”>external link</a>)

</MTIfNonEmpty> on <$MTCommentDate$></span>

</div>

</MTComments>

</div>

<MTEntryIfCommentsOpen>

<div class=”comments-head”>Post a comment</div>

<script type=”text/javascript” language=”javascript”>

<!–

var HOST = ‘home.wangjianshuo.com’;

// Copyright (c) 1996-1997 Athenia Associates.

// http://www.webreference.com/js/

// License is granted if and only if this entire

// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {

var curCookie = name + “=” + escape(value) + ((expires) ? “; expires=” + expires.toGMTString() : “”) + ((path) ? “; path=” + path : “”) + ((domain) ? “; domain=” + domain : “”) + ((secure) ? “; secure” : “”);

document.cookie = curCookie;

}

function getCookie (name) {

var prefix = name + ‘=’;

var c = document.cookie;

var nullstring = ”;

var cookieStartIndex = c.indexOf(prefix);

if (cookieStartIndex == -1)

return nullstring;

var cookieEndIndex = c.indexOf(“;”, cookieStartIndex + prefix.length);

if (cookieEndIndex == -1)

cookieEndIndex = c.length;

return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));

}

function deleteCookie (name, path, domain) {

if (getCookie(name))

document.cookie = name + “=” + ((path) ? “; path=” + path : “”) + ((domain) ? “; domain=” + domain : “”) + “; expires=Thu, 01-Jan-70 00:00:01 GMT”;

}

function fixDate (date) {

var base = new Date(0);

var skew = base.getTime();

if (skew > 0)

date.setTime(date.getTime() – skew);

}

function rememberMe (f) {

var now = new Date();

fixDate(now);

now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);

setCookie(‘mtcmtauth’, f.author.value, now, ‘/’, HOST, ”);

setCookie(‘mtcmtmail’, f.email.value, now, ‘/’, HOST, ”);

setCookie(‘mtcmthome’, f.url.value, now, ‘/’, HOST, ”);

}

function forgetMe (f) {

deleteCookie(‘mtcmtmail’, ”, HOST);

deleteCookie(‘mtcmthome’, ”, HOST);

deleteCookie(‘mtcmtauth’, ”, HOST);

f.email.value = ”;

f.author.value = ”;

f.url.value = ”;

}

//–>

</script>

<div class=”comments-body”>

<form method=”post” action=”http://home.wangjianshuo.com/cgi-bin/mt/mt-comments.cgi”

name=”comments_form”

onsubmit=”if (this.bakecookie.checked) rememberMe(this); s1=’http://home.wangjia’; s2=’nshuo.com/cgi-bin/mt/mt-‘; s3=’comments-ifuleuiycfi.cgi’; this.action = s1+s2+s3;”>

<input_HIDDEN type=”hidden” name=”static” value=”http://home.wangjianshuo.com/scripts/thanksforcomment/thankyou.htm” />

<input type=”hidden” name=”static” value=”1″>

<input type=”hidden” name=”entry_id” value=”<$MTEntryID$>” />

<input type=”hidden” name=”src” value=”home.wangjianshuo.com” />

<input type=”hidden” name=”spammer” value=”goaway” />

<input type=”hidden” name=”spamming” value=”gotohell” />

Name: <br />

<input name=”author” /><br />

Email Address: (will not show)<br />

<input name=”email” /><br />

<input name=”url” /><br />

Comments:<br />

<textarea name=”text” rows=”12″ cols=”60″ style=”width:80%”></textarea><br /><br />

It may take up to <b>30 seconds</b> before the server returns a result. IP address recorded. <br>

<input type=”checkbox” name=”bakecookie” />Remember info?

<br /><br />

<input type=”submit” name=”post” value=” POST ” style=”font-weight: bold;” onclick=”urchinTracker(‘/go/post_comment’)” /> <– Please click POST only once<br />

<input type=”button” onclick=”forgetMe(this.form)” value=”FORGET PERSONAL INFORMATION” />

</form>

<script type=”text/javascript” language=”javascript”>

<!–

document.comments_form.email.value = getCookie(“mtcmtmail”);

document.comments_form.author.value = getCookie(“mtcmtauth”);

document.comments_form.url.value = getCookie(“mtcmthome”);

//–>

</script>

</MTEntryIfCommentsOpen>

RecentComments Module

<div class=”l”>

<div class=”so”>

<span class=”he”>Recent Comments</span><span class=”m”></span></div>

<div class=”ct”>

<MTComments lastn=”15″ sort_order=”descend”>

<MTCommentEntry>

<a href=”<$MTEntryLink$></MTCommentEntry>#<$MTCommentDate format=”%I%M”$>”><$MTCommentAuthor$></a><small> : <$MTCommentBody encode_html=”1″ convert_breaks=”0″ trim_to=”50″ $> : <MTCommentEntry><a href=”<$MTEntryLink$>”><$MTEntryTitle trim_to=”10″ $></a></small><br/>

</MTCommentEntry>

</MTComments>

<b><a href=http://user.wangjianshuo.com/mt-user/mt-comment.php?q=list>Latest 100 Comments</a></b>

</div>

</div>

RelatedEntries Module

<div class=”comments-head”><$MTEntryCategory$></div>

<ol><MTEntryCategoryEntries lastn=”9″>

<li><a href=”<MTEntryLink>”><MTEntryTitle></a> <i><$MTEntryDate format=”%x”$></i></li>

</MTEntryCategoryEntries>

</ol>

Update May 2, 2008

This is the latest individual archive template:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>

<head>

<title><$MTEntryTitle$></title>

<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ />

<link rel=”stylesheet” href=”http://home.wangjianshuo.com/jianshuowangstyle.css” type=”text/css” />

<link rel=”alternate” type=”application/rss+xml” title=”RSS 2.0″ href=”<$MTBlogURL$>index.xml” />

<style>h1 {margin-top:5px;}</style>

</head>

<body>

<div id=”header”>

<div id=”banner”><a href=”http://home.wangjianshuo.com”>Wangjianshuo’s blog<br />

<span class=”description”>Events (in Shanghai) that affect my life (and others’)</span></a>

</div>

<div id=”globalMenu”><div id=”nav”><ul id=”nav_menu”><li class=”top”><a class=”top” href=”http://home.wangjianshuo.com/”>Home  </a></ul></div></div>

</div>

<table width=100% id=”bread”><tr><td width=”70%”>

<div id=”navigation”><a href=”<$MTBlogURL$>”>Home</a> »

<MTParentCategories glue=” » “><a href=”<$MTCategoryArchiveLink$>”><$MTCategoryLabel$></a></MTParentCategories></div>

</td>

<td align=right nowrap>« <mt:EntryPrevious><a href=”<MTEntryLink>”>prev</a></mt:EntryPrevious> <mt:EntryNext><a href=”<MTEntryLink>”>next</a> »</mt:EntryNext>

</td><td align=right nowrap><form name=g style=”margin:0″ method=”get” action=”http://home.wangjianshuo.com/archives/20060120_search_this_site.htm” target=”_top”><input type=”hidden” name=”domains” value=”home.wangjianshuo.com”></input>

<input type=”text” name=”q” size=”20″ maxlength=”255″ value=””></input>

<input type=”submit” name=”sa” value=”Search”></input>

<input type=”hidden” name=”sitesearch” value=”home.wangjianshuo.com”></input>

<input type=”hidden” name=”client” value=”pub-8513779941474461″></input>

<input type=”hidden” name=”forid” value=”1″></input>

<input type=”hidden” name=”channel” value=”6801625507″></input>

<input type=”hidden” name=”ie” value=”ISO-8859-1″></input><input type=”hidden” name=”oe” value=”ISO-8859-1″></input><input type=”hidden” name=”safe” value=”active”></input><input type=”hidden” name=”flav” value=”0000″></input><input type=”hidden” name=”sig” value=”NdyQdGFpJnNH_B3d”></input><input type=”hidden” name=”cof” value=”GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;FORID:11″></input><input type=”hidden” name=”hl” value=”en”></input></form><script language=”JavaScript”>document.g.q.focus();</script>

</td><tr></table>

<h1><$MTEntryTitle$></h1>

<!– Start of Google AdSense Section –><div id=”AdSenseSquare”><script type=”text/javascript”>var ref = document.referrer.toLowerCase();if (ref.indexOf(‘wangjianshuo.com’) == -1 ) {

document.write(“<IFRAME src=’http://home.wangjianshuo.com/archives/2006/07/13/google_adsense_300x250.htm’ width=350 height=250 frameborder=0 marginwidth=0 marginheight=0 scrolling=0></IFRAME>”);

document.getElementById(“header”).style.display=”none”;

}</script></div>

<span class=adsense>

Related Categories<br>

<mt:ParentCategories>

+ <a href=”<$MTCategoryArchiveLink$>”><$MTCategoryLabel$></a><br>

<mt:SubCategories>

<a href=”<$MTCategoryArchiveLink$>”><$MTCategoryLabel$></a><br>

</mt:SubCategories>

</mt:ParentCategories>

<script type=”text/javascript”><!–

google_ad_client = “pub-8513779941474461”;

google_ad_width = 120;

google_ad_height = 600;

google_ad_format = “120x600_as”;

google_ad_type = “text_image”;

//2007-12-25: 120×600 Open Air

google_ad_channel = “9775971810”;

google_color_border = “FFFFFF”;

google_color_bg = “FFFFFF”;

google_color_link = “0000FF”;

google_color_text = “000000”;

google_color_url = “008000”;

//–>

</script>

<script type=”text/javascript”

src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>

</script></span>

<p><$MTEntryBody$></p>

<a name=”more”></a><$MTEntryMore$>

<p><span class=”post”><small>Posted by <a href=”http://home.wangjianshuo.com/archives/20040218_about_jian_shuo_wang.htm”><$MTEntryAuthor$></a> at <$MTEntryDate$><br />

Copyright: You are free to redistribute this work, as long as you keep this <a

href=http://creativecommons.org/licenses/by-sa/2.5/>disclaimer</a>

and this <a

href=”<mt:EntryLink/>#”>link</a>: <a href=”<mt:EntryLink/>#”><mt:EntryLink/></a></small></span></p>

<div class=”comments-head”>Related Entries: <$MTEntryCategory$></div> <ol><MTEntryCategoryEntries lastn=”9″> <li><a href=”<MTEntryLink>”><MTEntryTitle></a> <i><$MTEntryDate format=”%x”$></i></li> </MTEntryCategoryEntries> </ol>

<div class=”comments-head”><a name=”comments”></a>Comments</div> <MTComments> <div class=”comments-body” id=”<$MTCommentDate format=”%I%M”$>”> <a name=”<$MTCommentDate format=”%I%M”$>”></a> <$MTCommentBody$> <span class=”comments-post”>Posted by: <a href=”http://user.wangjianshuo.com/<$MTCommentAuthor encode_html=”1″>.htm”><$MTCommentAuthor$></a>

<MTIfNonEmpty tag=”MTCommentURL”>

(<a href=”<$MTCommentURL$>” rel=”nofollow”>external link</a>)

</MTIfNonEmpty> on <$MTCommentDate$></span>

</div>

</MTComments>

</div>

<MTEntryIfCommentsOpen>

<div class=”comments-head”>Post a comment</div>

<script type=”text/javascript” language=”javascript”>

<!–

var HOST = ‘home.wangjianshuo.com’;

// Copyright (c) 1996-1997 Athenia Associates.

// http://www.webreference.com/js/

// License is granted if and only if this entire

// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {

var curCookie = name + “=” + escape(value) + ((expires) ? “; expires=” + expires.toGMTString() : “”) + ((path) ? “; path=” + path : “”) + ((domain) ? “; domain=” + domain : “”) + ((secure) ? “; secure” : “”);

document.cookie = curCookie;

}

function getCookie (name) {

var prefix = name + ‘=’;

var c = document.cookie;

var nullstring = ”;

var cookieStartIndex = c.indexOf(prefix);

if (cookieStartIndex == -1)

return nullstring;

var cookieEndIndex = c.indexOf(“;”, cookieStartIndex + prefix.length);

if (cookieEndIndex == -1)

cookieEndIndex = c.length;

return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));

}

function deleteCookie (name, path, domain) {

if (getCookie(name))

document.cookie = name + “=” + ((path) ? “; path=” + path : “”) + ((domain) ? “; domain=” + domain : “”) + “; expires=Thu, 01-Jan-70 00:00:01 GMT”;

}

function fixDate (date) {

var base = new Date(0);

var skew = base.getTime();

if (skew > 0)

date.setTime(date.getTime() – skew);

}

function rememberMe (f) {

var now = new Date();

fixDate(now);

now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);

setCookie(‘mtcmtauth’, f.author.value, now, ‘/’, HOST, ”);

setCookie(‘mtcmtmail’, f.email.value, now, ‘/’, HOST, ”);

setCookie(‘mtcmthome’, f.url.value, now, ‘/’, HOST, ”);

}

function forgetMe (f) {

deleteCookie(‘mtcmtmail’, ”, HOST);

deleteCookie(‘mtcmthome’, ”, HOST);

deleteCookie(‘mtcmtauth’, ”, HOST);

f.email.value = ”;

f.author.value = ”;

f.url.value = ”;

}

//–>

</script>

<form method=”post” action=”http://home.wangjianshuo.com/cgi-bin/mt/mt-comments.cgi”

name=”comments_form”

onsubmit=”if (this.bakecookie.checked) rememberMe(this); s1=’http://home.wangjia’; s2=’nshuo.com/cgi-bin/mt/mt-‘; s3=’comments-ifuleuiycfi.cgi’; this.action = s1+s2+s3;”>

<input_HIDDEN type=”hidden” name=”static” value=”http://home.wangjianshuo.com/scripts/thanksforcomment/thankyou.htm” />

<input type=”hidden” name=”static” value=”1″>

<input type=”hidden” name=”entry_id” value=”<$MTEntryID$>” />

<input type=”hidden” name=”src” value=”home.wangjianshuo.com” />

<input type=”hidden” name=”spammer” value=”goaway” />

<input type=”hidden” name=”spamming” value=”gotohell” />

Name: <br />

<input name=”author” /><br />

Email Address: (will not show)<br />

<input name=”email” /><br />

<input name=”url” /><br />

Comments:<br />

<textarea name=”text” rows=”12″ cols=”60″ style=”width:80%”></textarea><br /><br />

It may take up to <b>30 seconds</b> before the server returns a result. IP address recorded. <br>

<input type=”checkbox” name=”bakecookie” />Remember my information?<br/>

<input type=”checkbox” name=”subscribe” value=”1″ /><label for=”subscribe”>Subscribe to this entry</label><br />

<input type=”submit” name=”post” value=” POST ” style=”font-weight: bold;” onclick=”urchinTracker(‘/go/post_comment’)” /> <– Please click POST only once<br />

<input type=”button” onclick=”forgetMe(this.form)” value=”FORGET PERSONAL INFORMATION” />

</form>

<script type=”text/javascript” language=”javascript”>

<!–

document.comments_form.email.value = getCookie(“mtcmtmail”);

document.comments_form.author.value = getCookie(“mtcmtauth”);

document.comments_form.url.value = getCookie(“mtcmthome”);

//–>

</script>

</MTEntryIfCommentsOpen>

<!– Footer –>

<style>td.bd {border-left:#aaaaaa solid 1px;padding-left:20px;}</style><table bgcolor=”#EAEFF4″ id=”footer” width=”100%”><tr>

<td valign=top><dl><dt>Archives</dt><MTArchiveList archive_type=”Monthly”><dd><a href=”<$MTArchiveLink$>”><$MTArchiveTitle$></a> (<$MTArchiveCount$>)</dd></MTArchiveList></dl></td><td valign=”top” class=”bd”><dl><dt>Site Links</dt><dd><a href=”Homehttp://home.wangjianshuo.com/”>Home</a></dd><dd><a href=”http://home.wangjianshuo.com/index.xml”>RSS</a></dd><dd><a href=”All’>http://home.wangjianshuo.com/archives.htm”>All Archives</a></dd><dd><a href=”Privacy’>http://home.wangjianshuo.com/archives/20030508_emails_and_privacy_policies.htm”>Privacy Policy</a></dd></dl><dl><dt>About This Blog</dt><dd><a href=”About’>http://home.wangjianshuo.com/archives/20040218_about_jian_shuo_wang.htm”>About Me</a></dd><dd><a href=”Contacthttp://home.wangjianshuo.com/archives/20070701_contact_me.htm”>Contact</a></dd><dd><a href=”FAQhttp://www.wangjianshuo.com/about/faq.htm”>FAQ</a></dd></dl><MTTopLevelCategories><dl><dt>

<$MTCategoryLabel$><MTSubCategories><dd><a href=”<$MTCategoryArchiveLink$>”><$MTCategoryLabel$></a></dd></MTSubCategories></dl></MTTopLevelCategories></td>

<td valign=”top” class=”bd”>

<dl><dt>Related Entries</dt>

<MTEntryCategoryEntries lastn=”300″><dd><a href=”<MTEntryLink>”><MTEntryTitle></a></dd></MTEntryCategoryEntries>

</dl>

<dl><dt>Other Languages</a></dt>

<dd><a href=”http://<mt:BlogHost/>/zh-CN/<mt:EntryLink dirify=”1″/>.htm”>Chinese</a></dd>

<dd><a href=”http://<mt:BlogHost/>/ja/<mt:EntryLink dirify=”1″/>.htm”>Japanese</a></dd>

<dd><a href=”http://<mt:BlogHost/>/fr/<mt:EntryLink dirify=”1″/>.htm”>French</a></dd>

<dd><a href=”http://<mt:BlogHost/>/de/<mt:EntryLink dirify=”1″/>.htm”>German</a></dd>

<dd><a href=”http://<mt:BlogHost/>/it/<mt:EntryLink dirify=”1″/>.htm”>Italian</a></dd>

<dd><a href=”http://<mt:BlogHost/>/ko/<mt:EntryLink dirify=”1″/>.htm”>Korean</a></dd>

<dd><a href=”http://<mt:BlogHost/>/pt/<mt:EntryLink dirify=”1″/>.htm”>Portuguese</a></dd>

<dd><a href=”http://<mt:BlogHost/>/ru/<mt:EntryLink dirify=”1″/>.htm”>Russian</a></dd>

<dd><a href=”http://<mt:BlogHost/>/ar/<mt:EntryLink dirify=”1″/>.htm”>Arabic</a></dd>

<dd><a href=”http://<mt:BlogHost/>/es/<mt:EntryLink dirify=”1″/>.htm”>Spanish</a></dd>

</dl>

<!– SiteSearch Google –><form method=”get” action=”http://www.google.com/custom” target=”_top”><table border=”0″><tr><td nowrap=”nowrap” valign=”top” align=”left” height=”32″><a href=”http://www.google.com/”><img src=”http://www.google.com/logos/Logo_25wht.gif” border=”0″ alt=”Google” align=”middle”></img></a><br/><input type=”hidden” name=”domains” value=”wangjianshuo.com”></input><label for=”sbi” style=”display: none”>Enter your search terms</label><input type=”text” name=”q” size=”24″ maxlength=”255″ value=”” id=”sbi”></input></td></tr><tr><td nowrap=”nowrap”><table><tr><td><input type=”radio” name=”sitesearch” value=”” checked id=”ss0″></input><label for=”ss0″ title=”Search the Web”><font size=”-1″ color=”#000000″>Web</font></label></td><td><input type=”radio” name=”sitesearch” value=”wangjianshuo.com” id=”ss1″></input><label for=”ss1″ title=”Search wangjianshuo.com”><font size=”-1″ color=”#000000″>wangjianshuo.com</font></label></td></tr></table><label for=”sbb” style=”display: none”>Submit search form</label><input type=”submit” name=”sa” value=”Search” id=”sbb”></input><input type=”hidden” name=”client” value=”pub-8513779941474461″></input><input type=”hidden” name=”forid” value=”1″></input><input type=”hidden” name=”ie” value=”ISO-8859-1″></input><input type=”hidden” name=”oe” value=”ISO-8859-1″></input><input type=”hidden” name=”safe” value=”active”></input><input type=”hidden” name=”cof” value=”GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:FFFFFF;ALC:000000;LC:000000;T:0000FF;GFNT:0000FF;GIMP:0000FF;LH:0;LW:0;L:http://home.wangjianshuo.com/archives/2003/04/13/screen-home.wangjianshuo.com-logo.PNG;S:http://home.wangjianshuo.com;FORID:1″></input><input type=”hidden” name=”hl” value=”en”></input></td></tr></table></form><!– SiteSearch Google –></td></tr></table>

<center>© 2001 – 2008 Jian Shuo Wang. All right reserved. </center>

<script type=”text/javascript” src=”http://home.wangjianshuo.com/archives/2006/07/13/public_javascript.js”></script>

<script src=”http://www.google-analytics.com/urchin.js” type=”text/javascript”>

</script>

<script type=”text/javascript”>

_uacct = “UA-52458-1”;

urchinTracker();

</script>

</body>

</html>

// filelocation: http://home.wangjianshuo.com/archives/2006/07/13/public_javascript.js

// Update via: http://home.wangjianshuo.com/cgi-bin/mt/mt.cgi?__mode=view&saved_rebuild=1&_type=template&blog_id=1&id=78

// This is the public Javascript.

// This page is included in all individual pages.

// This is the Menu content

var menuHTML = “

“;

if(e = document.getElementById(‘globalMenu’))

e.innerHTML = menuHTML;

// This is remove link back to the same page

e = document.getElementsByTagName(“A”);

for(i=0; i < e.length; i++) { if(e[i].href == location.href) { e[i].removeAttribute("href"); e[i].style.textDecoration = "none"; } }

FeedBurner is a Useful Service

After Feedburner coming out for many years, now I switched my feed from my standard feed – my own XML feed file at http://home.wangjianshuo.com/index.xml to FeedBurner. The original feed file is still there so my previous subscribers won’t lose update from my blog, but new visitors will start to receive RSS feed from FeedBurner. Now you can subscribe to my blog via FeedBurner’s address: http://feeds.feedburner.com/jianshuo.

P.S. One day after I enabled FeedBurner, it was banned by the Great Firewall…

Upgraded to Movable Type 4

This is my first comment to the new MovableType 4. Let me just write a short sentence, and then test if everything is OK.

Update

It turned out the upgrade is very smooth – without any problem, and everything simply works.

The only problem I encountered with is, I didn’t find out the Rebuild button anywhere in the Admin page.

Also, since the template was still the old one, and most of the new features are not immediately available now. Please wait for sometime, and I will be able to add it along the time.

P.S. Interview

I was just interviewed by the International Herald over phone. The topic is about this blog, and the questions are very similar with That’s Shanghai.

P.S. Sun Island

I am back from a company event in Sun Island in Qingpu today. Did I mentioned Sun Island on this blog? Not yet. It is one of the few very good place to go for company meeting in Shanghai… I will talk more about it in the future.

MovableType 4 Finally Out

I know for most of my readers who only care about information on Shanghai will find this news boring or irrelevant to the topic of this blog. Maybe it is, but for me, it is completely not.

There are several reasons.

1. Thank you, MovableType.

I’d like to thank MovableType for providing such a good tool for me to use in the last 5 years. I am, maybe, one of the most loyal usres of MovableType, from the day one (or the second in terms of MovableType’s history) to today.

MovableType was a great software, and I love the company a lot. I also enjoy my personal friendship with people in MovableType, like Ginger, or Chris, and the two founders, Mena and Ben (for meeting for a short period of time, but gave me very unique impression).

2. Think of my first entry in this blog in Sept of 2002.

It is: MovableType Successfully Installed on Windows XP. If I wasn’t attracted by the Shanghai Pudong Airport topic, MAYBE, this blog may turn out to be a MovableType blog.

3. Movable 4 has great features I was looking for.

Let me quote some I am interested most among the many features MovableType 4 offers.

Features I like

10. A powerful and simple re-sizable WYSIWYG Editor, with automatic saving of drafts of entries and templates — never lose a half-written post again

The auto save works great for me, although I wonder whether I will get used to the WYSIWYG Editor, since I have been using the plain text for five years – it worked perfectly well for me.

16. Better plain-text entry with built-in support for Markdown and Textile, and conversion of MS Word “smart” quotes to HTML entities

The smart quote feature is sometimes useful when I write in Word first.

17. Even more SEO-friendly with customizable URLs per entry, per-template, or per-page

Good feature, however, I don’t think there is any chance for me to customize my old URLs.

20. OpenID support built in

This is great. I will support OpenID! My OpenID is wangjianshuo.com. Yes. Just Wangjianshuo.com, so register your openId and you will be able to directly sign-in in the new version of Wangjianshuo.com

21. Built-in user registration

This is the best feature. When Wangjianshuo’s blog has registration feature, do you want to be the first to register?

22. Powerful profile pages for every user in your system

Yes! This is it! I love this feature so much so my contributors (commenters) has a place to show off their great contribution to the site – this blog is nothing without the in-depths comments.

24. A ratings framework that lets users rate any item in the system — entries, comments, and in the future even authors or entire blogs

To ask my readers to rate the best blog entries of the month is a very cool idea. So give me feedback by rating and you can also the great comment you see.

27. Automatically provision a new blog for each user who registers with the system

Wow! Can it be possible? Hmmm.. Let me think the question: what if you want to open a blog under the domain of Wangjianshuo.com? Do you want to do that?

28. Built-in support for integrated spam fighting and optionally displaying a CAPTCHA for comments

I hope the anti-spam is better (although it is good enough) and I won’t turn on the CAPTCHA feature, since I think my additional work to delete spam comments is well compensated by easier comments without entering the hard to read characters.

29. Integrated email notifications — let your readers know when a thread they’re interested in has updated

This is also great. I have this plugin installed, but it does not seem to work.

Well. That’s it. It has great features, and I am looking forward to upgrade this blog to MovableType 4.0 this weekend. I hope I have enough time to do that.

Congratulations, the MovableType team!

MovableType 4 is Almost Out

MovableType is almost out – it is RC4 (Release Candidate 4) now. I am sure that when the final version comes out, I will upgrade my MovableType to that version.

The key feature I think is helpful is the user management and registration. It allows my readers to register with the system and create some pages for him/herself. With the new system, you can be a user and even a contributor to this system. Want to you think?

Pudong Airport Terminal 2 Completed

The Pudong Airport will open a new terminal this year. The construction is already completed, and just waiting for the connecting roads and viaduct to be completed. The next time people visit Pudong Airport, they should check out which terminal they should go to…

MTSubCategory of MovableType

I have so many articles, so I finally spent some time to create a category page for top level categories, middle categories, and subcategories. You may have noticed the change of the my homepage (look at this screenshot).

screen-category.wangjianshuo.com.png

Screen shot of the category function of Wangjianshuo’s blog

For those bloggers using MovableType, here are code I used to create a page like that:

<br><div class=”so”><b>Categories</b></div>

<div class=”ct”>

<div class=”category”>

<style>

.category div{float:left;width:32%;padding-bottom:20px;}

.category b {background-color:lightyellow;padding:3px;margin:3px}

</style>

<$MTTopLevelCategories$>

<div><b><a href=”<$MTCategoryArchiveLink$>”><$MTCategoryLabel$></a></b><br>

<MTSubCategories>

» <a href=”<$MTArchiveLink$>”><$MTArchiveTitle$></a> <small>(<$MTCategoryCount$>)</small><br>

<MTSubCategories>

      <a href=”<$MTArchiveLink$>”><$MTArchiveTitle$></a> <small>(<$MTCategoryCount$>)</small><br>

</MTSubCategories>

</MTSubCategories>

</div>

</MTTopLevelCategories>

<br style=”clear:both” />

</div>

</div>

I didn’t use the MTCatRecurse tag, since I only want to list the first 3 level of the category and I want some diversity in the top level, second level and third level…

Hope this helps. (For regular readers who do not care about how this blog works, please simply ignore this entry).

Added Today in History

Today, I added a new plugin – OnThisDay

The difference is, you will see the “Today in History” section.

This is the MT code in my Individual Archive Template. In case you are also a MovableType blog owner, you may find it interesting.

<div class=”comments-head”>Today in History</div>

<ul>

<MTOnThisDay>

<MTEntries>

<li><$MTEntryDate format=”%b %e, %Y”$>: <a href=”<$MTEntryPermalink$>”><$MTEntryTitle$></a><br>

<small style=”text-decoration:none”><$MTEntryExcerpt$>

</small></li>

</MTEntries>

</MTOnThisDay>

</ul>

This is useful to me to remind me what I did in the last year, the year before last year, and even the two years ago.

For example, I found the entry Second Day in Hong Kong in Jan. How interesting! I am going to Hong Kong tommorrow. Without this feature, I won’t remember that I was also in Hong Kong the same day last year.

Enjoy it and give me some feedback about this feature.

Removed “Chedong” Copyright

Finally removed Chedong Copyright under the title to keep it more clean. In case I need it in the future, let me do a backup here.

<!–<p><small>Author: <a href=”<$MTEntryAuthorURL$>”><$MTEntryAuthorDisplayName$></a>.

Published: <a href=”http://home.wangjianshuo.com/archives/<$MTEntryDate format=”%Y_%m.htm”$>”><$MTEntryDate format=”%B %e”$></a>, <$MTEntryDate format=”%Y”$>.

Tag: <MTEntryCategories glue=” “>

<a href=”<$MTCategoryArchiveLink$>” rel=”tag”><$MTCategoryLabel$></a> (<$MTCategoryCount$>)

</MTEntryCategories><br>

Copyright: You are free to redistribute this work, as long as you keep this <a href=http://creativecommons.org/licenses/by-sa/2.5/>disclaimer</a> and <a href=”<$MTEntryPermalink$>#”>link</a>.<br>

Permlink: <a href=”<$MTEntryPermalink$>#”><$MTEntryPermalink$></a></small></p>–>

Also, I backed up the category module as below:

<div class=”l”>

<div class=”so”><b>Tags</b></div>

<div class=”ct”>

<MTCategories>

<a style=”text-decoration:none” href=”<$MTCategoryArchiveLink$>” title=”<$MTCategoryCount$>”><$MTCategoryLabel$></a>

</MTCategories>

<script language=javascript>

e = document.getElementsByTagName(“A”);

for(i=0; i < e.length; i++)

{

if(e[i].title != “”)

{

t = e[i].title;

if(t > 256) e[i].style.fontSize = “150%”;

else if(t > 126) e[i].style.fontSize = “140%”;

else if(t > 68) e[i].style.fontSize = “130%”;

else if(t > 16) e[i].style.fontSize = “120%”;

else if(t > 8) e[i].style.fontSize = “110%”;

else if(t >= 2) e[i].style.fontSize = “100%”;

else if(t = 1) { e[i].style.fontSize = “80%”; }

}

}

</script>

<!–end of tagging map–>

</div>

</div>