HTML5 on IE version lower than 9

HTML5 is so good as it makes the html document outline more semantic. This helps better SEO and easier for styling. However, most HTML5 tags are not supported in IE with version lower than 9. And IE9 can only be installed on Vista or 7. For the large amount of WinXP/2000 users, if they use the bundled browser, they would never read a website with HTML5 correctly. There are some workarounds on this issue. You may use Modenrizr to detect whether the browser support an HTML5 feature. Or you may simply include the following script in your html page.

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
< ![endif]-->

The script will only be downloaded and run if it’s an Internet Explorer with version lower than 9. Therefore, IE9, Firefox, Safari, Chrome and Opera won’t download the file and it optimize the webpage loading time. After running the above script, IE (even IE6) will recognize HTML5 tags and you scan style them accordingly. Do remember to include the script before your CSS.

Although HTML5 tags are recognized, canvas won’t be working. However with the IE proprietary VML, canvas can work in IE. Just include excanvas.js into your project and canvas can be run in IE.

Drupal 6: Ubercart Ajax Cart with jQuery Update

If you are using jQuery Update on Drupal, you may find Ubercart Ajax Cart is not working when you click add to cart. This is because Ajax Cart was developed with the original jQuery with Drupal 6 which is version 1.2. Since jQuery 1.3, the attribute selector was updated and you don’t have to put the “@” sign to select an element with the attribute.

In jquery.ajax.cart.js line 10, the original line is like this.

if ( $form.find('input[@name=uc-ajax-cart-callback]').length  == 0 )

Just update this line and delete the “@” sign

if ( $form.find('input[name=uc-ajax-cart-callback]').length  == 0 )

The UC Ajax Cart will then back to work.

NppFTP for Notepad++

I recently have updated Notepad++ and I found that there is a new function on my FTP explorer.

It finally can create new file directly on the server!!! It’s been years and I believe everybody using Notepad++ shouts on not having this feature. I eventually figured out that it’s not FTP_synchronize anymore. This is an official plugins by Notepad++ which is called NppFTP.

However, all of my old FTP profiles from FTP_synchronize are disappeared. Anyone if you have a solution on how to migrate the old FTP profile to NppFTP, please let me know.

Update: The FTP account information for FTP_Synchronize is stored under %APPDATA%\Notepad++\plugins\config\FTP_synchronize.ini. Username and password of all FTP accounts could be retrieved. The password is encrypted in a very simple way where you can decrypt it back easily. If the password is “iphone”, it will be stored as “ihneop”. Head-tail-head-tail…

Again, Notepad++ is my favourite web development tool on windows (well… it will also be great if there is a Mac version).

Notepad++

How Apple help the economy?

iPhone4 has been a mystery product since its launch. No matter how much is it, there are a lot of people getting this PHONE. As the largest mobile phone market in the world, people in mainland China have been using iPhone4 since it launched in the US, while it officially launched on 25 Sep 2010. The main iPhone4 supplies to the mainland China are from Hong Kong. This barely helped the economy in Hong Kong and mainland China. Let’s see the supply chain.

  1. A Hong Kong guy buys iPhone4 at $5888 online and sells the phone to a mobile phone store at $8000
  2. Mobile phone store sells the phone to someone in ShenZhen at $10000
  3. Someone in ShenZhen sells the phone to a rich man in China at $15000

When Apple limits the supplies of iPhone4, it actually helping 3 other parties to gain extra earnings. It’s very funny as there are actually more people using iPhone4 in mainland China than in Hong Kong. My uncle even asked me to help him to order 6 iPhone4 and get them back to mainland China.

For a $5888 phone, it’s more than the monthly salary of most people in China. You could see many people refusing to buy iPhone4 on forum.

http://game.ali213.net/thread-3288918-1-1.html

Well… that makes sense. Can’t earn such money, then just buy a normal phone. However, this is the truth.

iPhone 4 Launches in China to Thousands

What can you say?

Titanium Mobile – [INFO] iPhone SDK version: loading…

After installing the latest iOS SDK 4.0.2, I can’t run my project on iPhone simulator. The console stuck at this message

[INFO] iPhone SDK version: loading...

This is the problem of the incompatibility of iOS SDK 4.0.2 and Titanium SDK 1.4.0. To solve this problem,

  1. download the latest nightly build of Titanium SDK from Appcelerator Continuous Builds
  2. place the latest 1.4.1 SDK under /Library/Application Support/Titanium/mobilesdk/osx/
  3. edit your project and update the SDK version to 1.4.1

You can then run your project in iPhone Simulator with iOS 4.0.2.

Apple for this winter

The Apple Media Event has just finished. It’s not very exciting as there is no iPad mini and App Store enabled AppleTV. Of course the new iPod nano is lovely and the tiny size of the new AppleTV is amazing. It’s so exciting to see Chris Martin singing before the end of the event. He is so funny.

Chris Martin: This is a new song. Coldplay 2.6 features 7 chords. One is the iMinor designed by Jony Ive. lol

淺談SEO的重要性

我們在 Creativeworks 的 Facebook Page 上刊載了一篇有關 SEO (Search Engine Optimization) 的文章。詳見

http://www.facebook.com/creativeworksstudio#!/notes/creativeworks-studio-limited/zaigoogle-sou-suolu-dongde-jie-guo-qian-tanseo-de-zhong-yao-xing/153092398039617

若你有任何關於網頁計設或iPhone/Android軟件的查詢,請隨時電郵 info@creativeworks.com.hk 或致電 21482805,亦可於本網誌回覆。