How to Create a WordPress Theme Viewer

For WordPress veteran this might not be new, which is, let visitor preview multiple themes in one WordPress installation. It puzzled me quite a while before I figured out how to do it. The very reason for the need of this feature is that I want to allow regular users to view different themes on a WordPress powered website. I wasn't able to until I ran into this page. Yea right! A theme switcher. I installed this plugin and tested. It provides the exact function that I need. Fantastic.

Now here comes the interesting stuff. The official documentation documented the plugin is as follow, which outputs a list of links that can switch to a specific theme:

Continue reading

A YUI Loading Panel Widget

Probably needless to say, but here it is. A web page which is processing a lengthy Ajax request and doesn't provide a loading indicator of any kind will mostly mislead the user to think that the page has stopped responding. So the solution? Use a loading indicator of course. Here's a very handy loading indicator widget for Ajax programmers who use YUI.

Files

How to Use

First, create a new instance of loading panel. After that, you can call show or hide method on the loading panel object.

The user can close the loading box by clicking on the cancel link. If you want to handle this situation, you can subscribe to the cancelEvent:

Continue reading

Apache Performance Problem on Vista

Just switch my operating system to Vista, and my biggest complaint about it is that it breaks my Apache HTTP server. The server still runs, but very slowly. The symptom is as follow: every time I reload a web page from the browser, there usually is a 2-3 seconds delay before the loading sequence starts. This shouldn't be happening because I serve all my files locally, so I expect no delay at all. Also, this behavior does not occur in XP.

After some excessive searches, I found a forum post (forgot the URL, will update this when I hit the site again) that suggests uninstalling Zone Alarm will resolve the problem. I gave it a try since I was in nowhere in solving the problem. Surprisingly the uninstallation did cure the delay issue of Apache. Beware that you HAVE TO restart Vista after uninstallation, otherwise you will not see the changes.

That's right, I uninstalled my firewall. So replacement? I like Zone Alarm and enjoy using it, but it doesn't seem to be very stable on Vista. However, I've found another great firewall product, Comodo Firewall Pro, which is a commercial grade firewall free of charge.

The Five Most Precious Firefox Extensions for Web Developer

I develop web applications and test them in Firefox, for Firefox provides many extensions that are not only useful, but sometimes vital to the completion of my projects. Over a period of time, I have been continuously evaluating different Firefox extensions in attempting to sort out the valuable ones (for web development). At last, I come up with these five.

Continue reading

YUI Based Lightbox – Final

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 reported bugs and gave feedbacks after the release of previous image lightbox. As many have requested, I implemented navigation for the new lightbox. In addition to the navigation, numerous new features have been added and bugs have been fixed.

yui-gallery-ss1.gifyui-gallery-ss2.gif

Continue reading