8
Boring Friday night activity – fixed UI glitch on iCO
I’ve been sick and still recovering from.
Anyway, my iPhone WebApp, iCuteOverload became look uglier after a few firmware updates ago and I had ignored since, but I finally fixed today.
It looks like box-sizing: border-box stopped woking on the recent WebKit, so I needed to use WebKit’s own declarations by adding “-webkit-” prefex, to adjust the box-model. It was easy fix but didn’t figure out soon enough :-p (maybe because I was watching House M.D. while debugging). Then I looked at the latest iUi code and well, the fix was already there… I should have just downloaded from beginning.
Oh well.
1
iCuteoverload on Apple.com Directory
Now iCuteoverload is on Apple’s iPhone web app directory, and girliemac.com has gotten new visitors.
Thank you!
9
iCuteOverload Update – Launch YouTube app
OK, iCuteOverload beta (preview at: girliemac.com/cute on iPhone!) is almost official.
Before handing to Megan, I made another change – converting YouTube Flash embed (that is not supported by iPhone) to YouTube video link to open in iPhone’s YouTube app. Thanks to Isao Yagi, who gave me tips to my regex question on php-user list, I could make this work.
Here’s how the regex code in php looks.
pattern to look for:
$p = ' /<object[\S\s]+?http:\/\/www\.youtube\.com\/v\/([\w\-]+)"[\S\s]+? <\/object>/i ';.
This look for a html object tag that includes YouTube link, and capture the video ID to re-create a new link.
As long as I found, the video ID can contain any alpha-numeric char (\w) and hyphen (\-).
Use /i to make it case-insensitive just in case.
replace string:
$r = ' <a href="http://www.youtube.com/watch?v=\1"><img src="images/watch_youtube.png" alt="watch!" width="200" height="56"/></a>';
then use preg_replace function to replace the string:
$content = preg_replace($p, $r, $content);
I use an image button link to launch YouTube app.
The captured video ID for Flash is now taken as a query string. This should work fine!


However!!! I just found that NOT all YouTube videos are available for iPhone yet…
So when I try the latest CuteOverload entry, I got this sad message, “Could not load movie”.

According to Apple Support, they will apparently be in sync by the end of the summer.
28
iCuteOverload Beta pix

Beta preview: go to http://girliemac.com/cute on your iPhone to see.
My next plan: convert all YouTube Flash embed into links to open the videos with YouTube app. some UI improvement.







