Featured

YUI Based Lightbox – Final

Posted on January 1, 2008
Filed Under Javascript | 42 Comments
post image My previous YUI implementation of the lightbox, which was released for beta evaluation, now has nearly gone gold. This page will be devoted for upcoming updates and bug fixes. So if you've found any bugs, feel free to report them in the comment section of this post. Also, I would like to thank many who [...]
Read more »
Lastest

symfony tips: Global app.yml for Multiple Applications

Posted on October 12, 2009
Filed Under symfony | Leave a Comment

I will be writing several posts related to tips I have learn or discovered in developing websites using symfony. For readers who don't know that symfony is, it is a PHP 5 based wed development frame which enables developers to rapidly build feature-rich websites by providing a set of reusable codes and common tools required by day-to-day web development. You can read more about symfony here.

Read more »
Archives

A Simple Yet Powerful PHP Template Engine

Posted on June 28, 2009
Filed Under CSS, HTML, PHP | 2 Comments

This is not yet another regular expression replacement template engine. The template engine uses PHP itself to render the template. The template itself is very intuitive to people who are already familiar with PHP. There is no extra learning for additional syntax - the template code itself is just plain PHP code. Though I haven't done any benchmark, from my past experience of using it, it is pretty fast - consider that it consists of less than 100 lines of code. Thinking of using Smarty?
Read more »

ctRotator – A Flexible Item/Image Rotator Script for jQuery

Posted on November 12, 2008
Filed Under Javascript, WordPress | 30 Comments

I was taking part in developing an interesting web application - the Thank You Project. During which I made an item rotator script that swaps a list of messages in and out from the message board. I find the rotator script is very useful, so I decide to share it. To get an overview of what the script can do, you can check the demonstration page first.

Read more »

Ajax Response Helper for PHP

Posted on October 1, 2008
Filed Under Javascript, PHP | 2 Comments

In Ajax programming development, passing data back and forth between client and server is a common task. There are two major data formats that one can use for this purpose, namely XML and JSON. My personal preference is JSON because I find it's less verbose and easier to parse.

Although latest PHP provides a very handy function (json_encode) for outputting data in JSON format, for almost every Ajax request I handle on the server side, I have to routinely format the data in a certain way so I can use it conveniently on the client side. For example, to indicate whether it is a valid Ajax request, I embed an field called has_error in every response. I find it's getting annoying after a while, so I wrote a class to automate things a bit.

Read more »

Fading Effect with YUI’s Animation Utility

Posted on May 2, 2008
Filed Under Javascript | 9 Comments

In YUI's Animation Utility example page there are demonstrations on how to create color and motion animations. However I couldn't find an example for how to create fading effect. After spending some time on trying different approaches, I came up with this code snip:

var aniObj = new YAHOO.util.Anim(
  'DOM reference or ID' , 
  { opacity: {from: 0, to: 1 } }, 
  'duration in second', 
  'easing'
);

where easing can be one of the following:

YAHOO.util.Easing.backBoth
YAHOO.util.Easing.backIn
YAHOO.util.Easing.backOut
YAHOO.util.Easing.bounceBoth
YAHOO.util.Easing.bounceIn
YAHOO.util.Easing.bounceOut
YAHOO.util.Easing.easeBoth
YAHOO.util.Easing.easeBothStrong
YAHOO.util.Easing.easeIn
YAHOO.util.Easing.easeInStrong
YAHOO.util.Easing.easeNone
YAHOO.util.Easing.easeOut
YAHOO.util.Easing.easeOutStrong
YAHOO.util.Easing.elasticBoth
YAHOO.util.Easing.elasticIn
YAHOO.util.Easing.elasticOut

Creating a Digg This Button for Your WordPress Blog

Posted on April 30, 2008
Filed Under Javascript, WordPress | 3 Comments

Creating a Digg This button is very easy. Here's a non-plugin approach:

<script type="text/javascript">
digg_url = '< ?php the_permalink() ?>';
digg_title = '< ?php the_title() ?>';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

Copy and paste above script to anywhere between your WordPress' theloop:


Instead post specific Digg button, you can create a site wide button as well:

<script type="text/javascript">
digg_url = '< ?php bloginfo('url'); ?>';
digg_title = '< ?php bloginfo('name'); ?>';
</script>
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

Read more »

Page 1 of 612345»...Last »

Categories

Polls

  • Tell us who you are:

    I am a...

    View Results

    Loading ... Loading ...