code.dunae.ca

Web Toolkit

This toolkit is a collection of small scripts and settings that seem to make their way into most of my projects.

To integrate the scripts seamlessly there are some re-write rules in /.htaccess. That’s probably where you should start.

Check out the source in its repository.

.htaccess file

Run-time Javascript compression

All .js files are automatically run through Dean Edward’s JS packer, cached and then displayed.

Run-time CSS compression

All .css files are automatically run through iBloom Studio’s CSS compressor, cached and then displayed.

Run-time JPEG formatting

Images are transformed using ImageMagick, cached and then displayed. This is most useful for galleries with thumbnails and for handling user uploads.

Usage

  1. Add “modes” and conversion strings to scripts/jpeg_format.php
  2. Add modes to .htaccess
  3. When calling images, append the mode to the JPEG's querystring (e.g. /images/test.jpg?thumb)

Contact

Written by Alex Dunae (dunae.ca, e-mail 'code' at the same domain), 2007.