Tuesday, September 23, 2008

Aflexi (CDN) Prelaunch

The CDN project that I am working on - Aflexi, is now on prelaunch. There are two videos added to the website:
Feel free to leave your comment there and share with your friends about us too. :)

Updated: Removed the links below as the videos are no longer there. Go here instead.

- yc

Thursday, September 18, 2008

Unable to open this mailbox

I just set up courier-imap on my machine but I couldn't open the INBOX:
2 NO Unable to open this mailbox.
I thought it would be a permission problem but the dirs are set with 700. I also read that it could be the server's date time, which didn't seem to be the case at all.. I then bumped into this thread in the Ubuntu forum to find out that I should have used maildirmake command to create the maildir, bah.

- yc

Wednesday, September 17, 2008

Invitation to Bloggers Buff 2008

A blogging forum/workshop for Malaysians is back this year. Read more about it at its website.

- yc

Tuesday, September 16, 2008

Seperating visual effects from HTML using jQuery

I remember reading Matt Ryall's blog on 10 things every web developer should know a while back and I would like to highlight the clean code suggestion made there.

I'm migrating the existing Aflexi website to Drupal and at one point I came across an existing code which.. is not too ugly but hard to be integrated into its Menu feature. The code has a few divs that jQuery uses to create sliding effects, I could actually put them into the template page.tpl.php but using jQuery to inject them at the end of page is certainly a better practice.

So, in my template.php, I have:

$('#nav').append('lots.of.divs'); // Here's the injection
$(document).ready(function() {
UiHelper.registerSlider('a.menu-1-1-2', '#sliderWso', '#pointerWso', 300);
drupal_add_js(join("\n",$js), 'inline');

By the way, I make the divs a one liner using:

echo 'paste your html' | tr -d '\n'

Then, talking about injection, this is brought into my attention as well - jQuery-AOP.

- yc