Backup of Deleted Templates

VBScript Comment IP

Filed as archives/commentip.vbs
On Error Resume Next

Set vis = CreateObject("Scripting.Dictionary")

<MTComments lastn="600" sort_order="descend">
vis("<$MTCommentIP$>") = "<$MTCommentAuthor$>::<$MTCommentID$>"

For Each e in Document.all
If UCase(e.TagName) = "A" Then
If vis(e.innerText) <> "" Then
e.insertAdjacentHTML "AfterEnd", " &nbsp;<a href='" & vis(e.innerText) & "'><font color=red>" & vis(e.innerText) & "</font>"
End If
End If
Category News Feeding VBScript
Filed as 
On Error Resume Next
Sub PrintCategoryNews(strCategory)
s = ""


If LCase(strCategory) = LCase("<$MTCategoryLabel$>") Then
<MTEntries lastn="1000">
s= s + "<a href=<$MTEntryLink$>><$MTEntryTitle$></a> <span class=posted><$MTEntryDate format="%B %d"$></span><br />"
End If

Document.Write s
End Sub

Find out Bigger Images on this Site

I often get request to republish my article. Normally, I will give the permission for reprint. However, to send out the original image is a big headache to me.

Since most of my images are hosted on flickr, and I stored my original image on the server. You can get it on the server.

This is the method to find out the original location.

  • View the page containing the image you are interested.
  • Copy the locaiton the image. (In IE, right click on the image, and click Properities, and then you can find out the URL of the image. In Firefox, just right click, and click Copy Image Location).
  • Paste the URL into the box below, and typically, you can get all different sizes of the image.

URL of image:

More AdSense Code on Site

4 years ago (Oct 22, 2003), I turned on Google AdSense on my blog. Oh! Time passes fast! I didn’t realize I have been using Google AdSense for almost 4 years, and that this product has been around for 4 years.

When I put my first AdSense unit to the page, I was worrying whether it hurt my users too much. I asked the question and answers (I, II) were pretty supportive. So I kept the Ad Unit on the right for the next four years.

Today, there is another change. Every month (April and May), I receive an email from Google that reads like this:

May 2007 Optimization Report

Dear Publisher,

Here is your optimization report for the month of May. After an automatic review of your sites, we think you might be able to improve your monetization using the following tips:

Placing more than one ad unit on a page often generates more revenue.

Many of your sites only contain one ad unit.

How can I fix this? Dismiss this tip.

We hope these tips are helpful, and encourage you to experiment using different layouts and formats–no two sites monetize the same way!


Google Adsense

It seems not a bad idea to follow their suggestion.

Added Google AdSense Component

So here is what I did. I added an additional AdSense component to the bottom of the page, on the right, just on the right of “Other articles in this category” section.

In addition to that, I added a Google AdSense Link Unit at the end of the “Other articles in this category” section. You can see the change on this page.

Your Feedback

As always, I don’t want to pursue the path to make it commercial – it is promising (as many wrote me email), but I don’t feel I will be happy doing that. My decision is still: keep it as a public service for visitors and expats in Shanghai. No money involved.

I just checked the result. It looks still fine to me – not that annoying, especially the Link Unit – I found the content is interesting even for me (I cannot click on it though).

So what do you feel? I need to collect you, my reader’s feedback, and then compare with the additional monetization opportunity it brings, then make a decision (maybe in one week) whether to keep it or to remove it.

Conditional Ad Unit?

I am still looking for the solution to display the ads conditionally. I want to completely remove the ads (both top and bottom) for newly created content (say, the latest one month), so my frequent visitors won’t see ads at all. If someone comes from a search engine, or the content is so interesting that someone browse the historical blogs, they can see ads there.

Anyone knows how to do it? Thanks.

RSS Changed to Full Text

Maybe it is good news for many readers who rely on RSS to read this blog. I have changed all my RSS feed from excerpt only to full text. That means, no matter what reader you use, from Google Reader, to Bloglines, to, you will read FULL TEXT of this blog in your reader software/sites.

This is not a hard decision for me. Everyone (100%) of the more than 10 reponses voted for full text. It is a typical example that everyone knows the alternative is better (except for me), but didn’t tell me. I am the one who can make the change, but I didn’t realize it – you know, maybe I am the single person who don’t have to use a reader to read my article – I read it in my ‘editor’ window and on my blog only.

OK. I suggest people to take the chance to think about what I can do to make the site more useful and more convinient. If I know that, and if I can do it (easily), I will do it. Thanks again (for the third time) for cube316 to point it out.

P.S. If you haven’t yet, use these two links to subscribe this blog via RSS:

RSS 1.0 Feed
RSS 2.0 Feed

Full Text RSS Feed for This Blog?

Cube316 asked whether I want to turn on full text feed for the RSS of my blog. Both excerpt or full text is OK for me. My decision depends on which one my readers’ love better.

So the question is yours, and decision is yours:

Do you like
A) Full Text of each entry in my RSS feed, or
B) Excerpt in the RSS for conciseness.

Please give me suggestions in the next week, and I will change to full text if everyone likes it, or keep the current setting.

In case you didn’t know I provide RSS yet, try this URL:

You can subscribe to this blog via RSS reader like Google Reader, Bloglines, or client side readers.

How to Advertise on this Blog?

A friend’s friend asked him to ask me (ha ha, weired) how can he put advertisement on my this. He is running an apartment broker service for expats at (disclaimer: I didn’t experienced it, and don’t know the quality. Try it out at your judgement, and share your feedback with others). Pretty fit the audience of this blog, right?

Here is my answer:

I don’t accept individual advertisement on this blog.

That means, I don’t want to accept any paid content on this site, except Google AdSense. On the Google AdSense part, I hesitated for some time, and finally I wrote this: Why I Added Google Adsense to My Blog on Oct 23, 2003, when I added it to my blog. I wrote:

Actually, I hate to bring the advertisement into this site, since I am passionate to provide more information about Shanghai and life here just because I love to do it.

This does not change after 4 years (OMG, 4 Years! since my first Google AdSense ad)

I received many queries about putting commercial advertisement on my site with pretty high quote (OK, at least higher than Google AdSense). I still don’t want to do that, at least in the next one or two years.

The reason is, if I accept payment for anything I wrote, I don’t feel I can be objective, and tell the truth. I know when I am accepting any benefit, “truth” may be different than I original thought, even without my own awareness. So the bottom line is, I don’t accept anything. If you ever sent me email, thanks for your inquire and your interest, but I don’t have plan for that.

I am still comfortable for putting Google AdSense, since it does definitely zero impact on what I write, or should I write positive or negative about something. I like that kind of feeling. I love to write to help people. If I feel I am writing for money, I may lose the passion to write, and may not enjoy what I write, and finally gave up.

I do give advertisement space free of charge, for example, last time to Dan Washburn, who is my good friends. I also mention some services, like because they are my friends (or friends’ friends). It is all for free. and I will let you know that. I value friendship and want to help my friends also. But I want to make it clear whether I mention it because I personally experienced it and recommend it, or it is just for a friend.

P.S. If you do want to do advertisement…

If you do want to post an advertisement on this site, you can still do it on Google AdWords network. You don’t need to talk to me, or even let me know – I don’t want to know that either. You will find a link named: “Advertise on this site” at the bottom of every Google AdSense ad block. Click on it, and click “Sign Up Now” to sign up Google AdWords program. Then you can choose to target your ads to domain. You can choose to have text ad or Image ad, and they choose your payment. Then your ads MAY appear on the site, depending on how Google thinks about it.

Do it by yourself. I appreciate your support, but don’t need to notify me about it. :-)

Hope this helps to answer the FAQ: How can I advertise on this blog?

P.S. 2. Never, never ask me to write a review about your site, your service or anything. If I find it interesting, I will. If I find I want to personally do a favor of my friend, I will. If I find it valuable for visitors to Shanghai, I will. If you ask me to do it, or pay me to do it, I won’t.

Jack, Run, Linda, and Wendy

We had dinner together at a restaurant near SJTU (Shanghai Jiaotong Unversity) tonight, and then visited the Kijiji office. They were talking about some money related stuff – in this huge “everyone in stock market” environment. Haha.

Spam Mail – Not eMail, it is Mail!

As usual, I opened my mail box at the entrance of my home. There are many mails in it. Besides several bill, and some not-so-important mail, and DM, the rest are all spam satellite TV mails.

Look at these! They are the fruit we have in my mail box in several days. They offer satellite installation service. On one hand, it is not legal according to the current censorship mechanism: the Party does not allow anyone to install satellite TV to watch “enemy’s propaganda” outside China. On the other hand, it is against the international copyright laws, since they use pirated cards to “steal” program from satellite. They claim to be able to view ANY TV program, including CNN, HBO, Cinemax, BBC, NHK, DW, ABC, Fox News, MTV, and all kinds of adult program. They also commit SPAM!

I don’t like them. Backup Plan

This blog is my most important digital assert. I cannot imagine what happens when it crashes someday, or I lose all my data. So backup is critical for me – even more critical than my bank account. Here is the backup plan. I hope it is also helpful to other bloggers like me. It also reveals some backstage information about the architecture of this blog.

Critical Server Information:

Hosting Started at: 28-Mar 2006

Current Hosting Plan Ends at: Sat 28-Mar-2009

Host provider:

Download Database Backup

I guess this is even more important than file backup. So I will do it first everytime.

Here are the links to the 5 database I have on this server:






It should be named as backup-sql-databasename-m-d-yyyy.tar

A typical file size should look like:

backup-sql-926-3-20-2007.tar 37,305

backup-sql-bbpress-3-20-2007.gz 39,926

backup-sql-blog-3-20-2007.gz 5,984,544

backup-sql-blogcn-3-20-2007.gz 2,487,559

backup-sql-public-3-20-2007.gz 954,123

Daily File Backup

I should transfer data from this URL:

to this URL:

D:\jswangmy\Web\History and Backups\

Please make sure the backup file using the backup tool is always named as

Home Directory Backup

Instead of the Full Backup, I found the Home Directory Backup Even more helpful, since most of the (huge) data outside my home is useless for me.

That is from:


d:\jswangmy\Web\History and Backups\


Hosting Provider:

It is less strait forward than the You have to enter an email address at (new window)

and email you when the backup is created.

I have put the backup files in the backup folder. So the only thing I need to do is to click the backup file to download it. (Password required, of cause)

Unsubscribe if You Don’t Like Newsletters

I posted a mail to Wangjianshuo’s Blog Update subscribers (see the newsletter section at the bottom of this page, that is the mail list), to ask people who are not interested in continuing receiving update to unsubscribe from the list. As I said, I hate spams, and I hate to be treated as a spammer even more.

Hi all,

I am happy that you joined the Wangjianshuo’s Blog Update mail-list. It is daily update of my personal blog on Shanghai.

This morning, I got a complain email from a member, who thought this is spam. It happened before.

So I’d like to take the opportunity to ask everyone to consider whether you want to continue to receive this update or not.

If not, please just follow the instruction at the end of this message to unsubscribe from this mail-list. I am perfectly fine with that. I hate spams, and hate to be treated as a spammer even more.

Have a great day!


Jian Shuo Wang


On the newsletter function, I feel it is not that neccessary. Now we have RSS, and why people need to subscribe to a mail-list to get notified? Also, is one email per day too frequent? Obviously the answer is Yes. But anyway, there are people who may find it userful. Let me keep this feature on the site.

P.S. Tracking code added to the URL in newsletter

To get visibility of whether people are using the email letter, I tagged the URL in the newsletter, so I can see how many people clicked the URL, meaning they actually use it.

This is the change to /cgi-bin/mt/plugins/Notifier/tmpl/email/notification.tmpl file in Notifier MT-plugins.





<TMPL_VAR NAME=ENTRY_LINK>?utm_source=newsletter&utm_medium=email

Wayback to Wangjianshuo’s Blog

Vince’s email mentioning Way Back Machine reminds me to check out what Wangjianshuo’s Blog looks like three years ago. Here are some snapshots.

2002 2003 2004 2005
4 pages 15 pages 35 pages 23 pages

Sep 22, 2002 *

Oct 16, 2002 *

Nov 25, 2002 *

Dec 01, 2002 *

Jan 26, 2003 *

Feb 09, 2003 *

Mar 27, 2003 *

Apr 05, 2003 *

Apr 24, 2003 *

May 22, 2003 *

Jun 22, 2003 *

Jul 28, 2003 *

Aug 07, 2003 *

Oct 03, 2003 *

Oct 18, 2003 *

Oct 27, 2003 *

Nov 20, 2003 *

Dec 03, 2003 *

Dec 27, 2003 *

Feb 06, 2004 *

Mar 26, 2004 *

May 10, 2004 *

Jun 04, 2004 *

Jun 06, 2004 *

Jun 11, 2004 *

Jun 12, 2004 *

Jun 15, 2004 *

Jun 16, 2004 *

Jun 16, 2004 *

Jun 19, 2004 *

Jun 21, 2004 *

Jun 22, 2004 *

Jun 23, 2004 *

Jun 26, 2004 *

Jun 27, 2004 *

Jul 01, 2004 *

Jul 01, 2004 *

Jul 01, 2004 *

Jul 03, 2004 *

Jul 15, 2004 *

Jul 16, 2004 *

Jul 17, 2004 *

Jul 18, 2004 *

Jul 18, 2004 *

Jul 25, 2004 *

Sep 26, 2004 *

Oct 12, 2004 *

Oct 16, 2004 *

Oct 22, 2004 *

Oct 24, 2004 *

Oct 30, 2004 *

Nov 18, 2004 *

Nov 22, 2004 *

Nov 24, 2004 *

Jan 31, 2005 *

Feb 05, 2005 *

Feb 09, 2005 *

Feb 11, 2005 *

Feb 12, 2005 *

Feb 13, 2005 *

Feb 14, 2005 *

Feb 25, 2005 *

Feb 26, 2005 *

Mar 03, 2005 *

Mar 03, 2005 *

Mar 04, 2005 *

Mar 06, 2005 *

Mar 08, 2005 *

Mar 17, 2005 *

Mar 18, 2005 *

Mar 19, 2005 *

Mar 20, 2005 *

Mar 22, 2005 *

Mar 26, 2005 *

Mar 28, 2005 *

Mar 29, 2005 *

Apr 01, 2005 *

Comment System is OK Now

I felt strange that there were no new comment after I posted my last comment at 25, 2005 12:55 AM. I thought it may because of weekend. To my surprise, I found the site stopped accepting new comments after that.

The reason is, I put “…” into the banned world list of my MT-Blacklist tool. Three dot means to match any three chracters. Some readers may lose some comments that they spent much time to write. Sorry for that. The good news is, the system is back to normal…

Removed my Email from Blog

Today, I removed my email address signiture from every page of my blog.

Old footer of individual page in this blog

I put on my email into my blog from day one of blogging. I enjoy being interactive with my readers. When there is not so much traffic, it was very rare to get any email from reader. Later, after my monthly page view reached about 1 million, I got two or three emails everyday. Most people seek for help about Shanghai. The questions helped me to find good topics to write about Shanghai.

This March, after my job change, I find it very hard to follow the emails. Now when monthly page view mraches to about 2 million, I simply don’t have time to even read all the emails in my email box. It is very bad that someone put effort to write an email to me, waitted somewhere in the world, but I don’t have the ability to reply. So I decided to remove my email from this site. It is not easy to balance being “open” (by posting my email address), or being realistic (by realizing that I don’t have time for it), I finally choose the easy one – to keep my email to limited audience…

Wangjianshuo’s Blog Change Log

23:29 2006-7-31


  • Remove Google Adsense code from Individual Entry Archive


  • Increase user experience by providing ad-free browsing on

    Individual Entry Archive page.

  • Increase Google Adsense revenue to improving overall CTR rate.

    Success Metrics:

  • Get earning back to 40 level, from 28 (after the change).


  • Template -> Archives tab -> Individual Entry Archive
  • Remove the following code from under

    <span class=Adsense>

    <$MTInclude module=”RelatedEntries”$>

    Below is removed.

    <p align=right>

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

    google_ad_client = “pub-8513779941474461”;

    google_ad_width = 234;

    google_ad_height = 60;

    google_ad_format = “234x60_as”;

    google_ad_type = “text_image”;

    google_ad_channel =”0738760540″;

    google_color_border = “D2E4FC”;

    google_color_bg = “FFFFFF”;

    google_color_link = “0000FF”;

    google_color_text = “000000”;

    google_color_url = “008000”;


    <script type=”text/javascript”




  • Save.

    23:50 2006-7-31


  • Remove BBS from blog site


  • After putting up BBS onto site for some time, no one uses it, and get only less than 10 reply. So remove BBS, and confirm BBS is not the way to go.

    Success Metrics:

  • N/A


        Templates -> Modules -> Chinese

          Remove the following lines: <iframe width=100% height=250 FRAMEBORDER=0 SCROLLING=no src=””>



  • My 17 “OR” Articles

    Chedong is my good friend and a search engine expert. He wrote an article on his blog named: 15 OR of Wang Jian Shuo (I found this is 976th article from him already)

    We discussed two topics I wrote: one is Enjoy Doing or Being Able to Do and Dislike Doing or Starting to Do. Then Chedong get back and used Google to get a list of 15 articles. I just searched and got 17 results (Maybe I changed to English interface?) The question I asked include:

    1. Where to Study Chinese, Beijing or Shanghai?
    2. Pudong or Puxi
    3. Mandarin or Shanghaiese?
    4. To Tip or Not to Tip
    5. To Focus or Not?
    6. Car or Bicycle?
    7. Sina, Sohu or Netease?
    8. To Continue or Not? Confusing in China Blogsphere
    9. Dislike Doing or Starting to Do
    10. Blog, to Host it or Not?
    11. House of Flying Daggers (or Shi Mian Mai Fu)
    12. Thinking in English or Chinese
    13. Enjoy Doing or Being Able to Do
    14. Media – Should I Love It or Hate It?
    15. To Host It or Not? Confusing in China Blogsphere
    16. Sina, Sohu or Netease?

    You will see how many questions (confusion) I have in the past three years. Further, I found Google intitle search is a great way to organize the articles by keywords. For example, you will find the following search result useful on the topics:

    taxi metro bus PVG maglev

    Chedong suggested me to add a “OR” tag on the article and finally we agreed that it is by no means can an author find out a “silly” tag like “OR” when he writes the article. It has to be some thing that is discovered after many articles.

    Comment RSS Feed

    From today, you can use the Comment RSS Feed to get notified of new comments posted to this site

    Comment Feed

    Add it to your favorite RSS reader now. To reseve bandwidth resources, do not set the refresh interval too short. :-)

    This Post is Sent at Internet Cafe

    I visited the Hui Yuan Internet Cafe at the opposite side of Shanghai Jiao Tong University on Hua Shan Road to post this article. It is the first time in the recent two years to visit an Internet cafe. I am waiting for my friends Mao and Hengge to have tea soon, so I still have some time to kill in the middle. I paid 3 RMB for one hour’s time.

    The Internet connection is good, and the computer is not bad, except someone is smoking beside me while he is playing Tian Tang II. Someone is cleaning his dirty mouse rolling balls with his hand, and others are ordering their fast food dinner from the waiter. I guess there are about 500 computers in this Internet cafe and more than 80 of them are occupied. It is the best place to learn the Internet industry and culture. Majority of them are playing game (either Shanda’s or CS), some (1 out of 10) are watching movie (stored locally) with earphones. Some are chatting with QQ or other IM – I didn’t see MSN Messenger user in this Internet cafe so far. There are five persons out of the 70 seats in my room surfing on the Internet – one is on Sina, the other on Sohu, the third on Hotmail, I don’t know which site the fourth guy is visiting (seems like a portal). The fifth, which is me is editing this blog entry.

    My Functional Spec

    In Micrososft, I have been the training on software development processes for many years. I prompt the use of 3P4S (3 processes + 4 servers) software method – Daily Build process, Source Control process and Bug Tracking process + source server, build server, release server, and bug database….. I also worked a lot on stuff like team model, functional spec, code review…

    When I talk with new developers and program managers the other day, I found the development process is not good and there is almost no document. I joked that “Your functional spec for a large project is not as complete as spec for my personal website.”

    I was not kidding. I have a functional spec document before I started to work on the new homepage. It was the planning work and thought before I actually worked on it. I altogether 4 hours (several minutes to one hour each time at my spare time) on the spec and it took less than 1 hour to implement the idea.

    Here is the document:

    After you review the document, you know all the secret behind my homepage. I hope the MoveType code will be helpful.

    Homepage Version 3

    Anyone noticed the change of the homepage? It is 3rd major change in the design. I added some key elements that have been requested for a long time, including links, archives, recent comment preview… It is still in beta, which means I may still change it when I have time and some part may not work perfectly.

    What do you think of the new homepage?

    PmWiki Reloaded

    I reinstalled PmWiki again. This time, the system is not Windows and I followed the instruction on page to get rid of the Setgid error.

    Then I need to enable the Chinese support of this Wiki site. This page: helped. The newer version (1.0.11) added $StyleToken = “\036”; and I updated the code from those I got from the guide.

    My Map Has Errors – I Know

    I apologize to Mr. Peng who wrote to me to complain that there is an error on my Shanghai Map. He searched for Zhong Shan South Road II and come to my site since mine is the first in the result. According to my map, the place is somewhere near Xi Kang Road. He took bus No 113 there only to find the road he was looking for is at the other side of the city.

    I apologize for the inconvenience my map caused. I put a disclaimer on the map with red font and put it on the top of the page. It reads:

    注意:本地图上的点信息由网友提供,任何人都可以添加一个点;没有人进行任何核实。它可能会帮助您尽快地在整张地图上找到您要找的点,但是一定要先在原始地图上确认再使用。Note: All the point information on this map was contributed by readers and is not verified for ts accuracy. Please reference the map image before use.

    The Map

    The map is built with two ideas in mind:

    • A map should be simple with less interface and load fast.
    • A map should be built with community effort

    So I simply put the tiles of the maps and enable people to pinpoint on the city map and scroll using the errors.

    Then I opened the right to add a point to anyone who has access to the page. This is built upon the Wiki concept. In the previous version, I enabled people to write description to any point and delete any point but it is not included in this version.

    The point information is not accurate. I guess about half of the information is wrong. I will find a better way to control the quality to make it usable, but now, I guess I don’t have time to do it. So a disclaimer is the best solution that I can accomplish within five minutes.

    English Version?

    I don’t have an English version map. I know it is highly demanded and many readers asked me for that. I’m afraid I don’t have one.


    Actually, the copyright of the map is the SMI. I have contacted with them and want to make some progress to get a usage license before I use. We made appointment to meet before but didn’t find the time.

    Bigger Font is a Failure

    Too tired today due to long MSN conversation chat. Just a small piece of note today.

    It seems the larger font I changed is not a positive move. I saw people suggesting to change it back to original view. I think it reasonable. When professional look conflicts with readability and usability, I may need to choose the perfessional look. I am going to change back this week. Any comments?

    Xujiahui Station Changed Face

    As a side note, the Xujiahui Metro Station changed face these days. It added many new guidance board with vivid color and stick the direction signs onto the floor. It is great. Its usability is almost as good as the MRT in Hong Kong. The new direction system will be installed on all stations of Metro Line #1 soon.

    The extension of Metro #1 is almost finished and I see the new line on the direction board of Xujiahui Station already. The new terminal station of Metro Line#1 will be Gongfu Xincun.

    Bloggers Came Back

    As the end of the long vacation, bloggers also returned to their blogging life. Claire completed her trip in Cambodia. Eric returned to Beijing from Hong Kong via Shanghai. Even Isaac started to post some entries after disappearing for about half month – I was wondering what happened to this hard core blogger. The blogging sphere becomes a little bit more interesting after the long vacation, although it is clear that more and more people have recovered from the blogging fever and go back to their lives, leaving the blog they just started untouched for more than one month…