My Portfolio

Upcoming Books and DVD's at the Library

This project utilizes the Amazon API to provide the item information for books and DVD’s, such as reviews, rating, book and DVD covers, author, actors etc. It was developed with the help of Ms. Lisa Coker the Materials Management head for the Sterling Municipal Library. She provided feedback on how she wanted the admin interface to look like and work, since she is the only user for this project; it was tailored to fit her needs. This project was developed as more and more of our patrons started to visit the website and we wanted to let them know the new acquisitions for the library and allow them to reserve those items in advance.

It uses a flash file for displaying items similar to that of iTunes Coverflow, this flash file uses an xml file that is generated based on the contents of the application database.

Ajax is used where applicable and for the DVD part of the project a datagrid class was used from the Zebra framework.

For a demo of the patron display page please visit http://www.baytownlibrary.org/newbooks/ and http://www.baytownlibrary.org/movies, I will try to get the admin backend and source code available online soon.

I also implemented the Upcoming Books project on the Chamber County Library website.

Picasa RSS Photo Gallery

Image processing consumes a lot of resources and CPU time, since I'm using a free web host, sometimes when the images are too large thumbnail generation would fail. So I decided to create a version of the Photo Gallery that uses RSS feeds from Picasa.

All you need is an RSS feed link from picasa, pass it to the picasa.php file and it will fetch all the albums, selecting an album displays all the image from that album.

The gallery uses Lightbox, Prototype and Scriptaculous. The previous Paginator class I created is also used here to provide item pagination.

Picasa Gallery Demo

PHP Photo Gallery

This is a personal project for my portfolio and also to show family pictures to my friends and family online. I do have an account with flickr and picasa but I just love having my own personal gallery. I'm going to add functionality in the future to allow the gallery to read feeds from those photo services.

You just basically create a folder and place all your pictures in there and then point the Photo Gallery config.php file to read this folder and voila! Instant photo gallery :) a drop down navigation is provided, similar to nautilus and Windows 7 explorer style. Images are preloaded using javascript and thumbnails are generated on the fly. It uses the built in GD library for generating thumbnails and can be configured to use a different script with a different library if needed.

The gallery uses PHP SPL Directory Iterators and it also uses lightview for displaying images and a slideshow. It uses ajax when switching between pages.

Click here to see a demo of my PHP Photo Gallery.

PHP Photo Gallery

Paginator Class

The paginator class basically takes an array of items and then paginates it and returns an array with the current page range. You can then create a table or do whatever you want with the current array set. You can set the items per page and use the pagination control method to create a pager.

The Picasa Gallery also uses this class to paginate the albums and photos retrieved through RSS feeds.

Pagination Class Demo

PHP Thumbnail Generator

You can use this script as the location for your image and it will generate a thumbnail.

					
					
					
					

You can then link back to the original image, no need to use a graphics editor to create thumbnails for you. This script is also used in my PHP Gallery and in the Picasa Gallery to generate thumbnails as needed.

Once they are generated they are read from file, and they can also be cached to save your site some bandwidth. It uses the PHP GD library which is installed on most web host, you can get fancier thumbnails with Image Magick but I haven't found a host that offers it for free.

It's important for me that the thumbnails were only generated as they are requested by a page since I'm using a free web hosts and they put a cap on how much CPU cycle you can use. And image processing takes a lot of CPU cycles so I try to convserve it if I could.

Passing Special Characters as URL Parameter

Ever had to pass a url parameter with special characters and then your application has trouble decoding it back? Or maybe you need to pass this parameter to a shell script, I've encountered this situation with the PHP Photo Gallery, sometimes some galleries would contain ampersands, single quotes or double quotes, so I created two simple functions to handle this in the gallery.

Personal Links

Favorite Links