In the MegaGallery project, we used the EXIF library in PHP to extract the thumbnails from the image itself. However, what do we do if we do not have EXIF installed or available through our web server provider? One possibility is to use the GD library. The GD library will allow us to create a thumbnail using the image itself. Continue reading
In the previous two tutorials on XTemplate, I discussed the basics of tag assignment and dealing with dynamic blocks, but the real power of using a templating system comes when you are able to use the same basic layout template on more than one page while displaying different content. XTemplate allows us to import template files into an existing template, allowing us to maintain a site structure on each page, but the true power comes when we need to make changes to the layout. Edit one file and the changes go into effect for all the pages using that template. Continue reading
In the first part of this tutorial, we designed an XML file that contained categories and resources for reference links. In this part, we will use PHP to extract the information from the XML document and generate an HTML file from the information. Continue reading
I have found many situations where being able to read the information in a XML/RSS file has come in handy. For example, putting a block on a page with the latest entries from a blog. Since XML files are basically structured flat databases, I use them sometimes for short collections that do not require security.
XML files are not difficult. You don’t need a fancy, expensive program to generate them, and PHP has functions built in to read and manipulate them. Continue reading
In the last entry on the MegaGallery project, I suggested checking for directories in the file list as a way to improve the project. In this Quick Tip, I am going to show you a possible solution. This solution will work in any situation where you need a list of files only. Continue reading