Miscellaneous

  Home arrow Miscellaneous arrow Creating an Image Gallery
MISCELLANEOUS

Creating an Image Gallery
By: notepad
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 13
    2003-10-24

    Table of Contents:
  • Creating an Image Gallery
  • getting started
  • moving along
  • review and organize
  • thumbnails
  • conclusion

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Creating an Image Gallery


    (Page 1 of 6 )

    The goal of this tutorial is to give the reader an idea of how to construct a basic/dynamic image gallery from start to finish.

    Note: This tutorial is outdated and no longer supported. For the updated/supported version, click here.

    the goal of this tutorial is to give the reader an idea of how to construct a basic/dynamic image gallery from start to finish, not to imply that this is the only way, or even the best way to build a gallery; just a simple approach without all the bells and whistles. at the time of writing, this tutorial assumes a version of PHP >= 4.3 and GD 2.

    scenerio - okay, so i've got a crap load of images that i need to display in a user-friendly manner, and i know that more images are soon to come. i want to do the least amount of work possible, and when i say "least" i mean that i upload the picture and i'm done. i also want the script to be very portable, because i expect galleries to change often.

    plan of action - no databases, there is no reason whatsoever that we can't just use the existing file system to store and retrieve our data. we're going to build a category based system, each folder will be a category, and sub-folders will be sub-categories. when we're viewing images, i want to be able to restrict the amount of images being shown at once, therefore we need to split each gallery into multiple pages, but we'll also give the user an option to view all the images of a particular gallery at once. i don't want to mess with manually creating/deleting thumbnails either so we'll be using the GD library for that. we should be able to easily change how many images display at a time, as well as what size our thumbnails should be.

    building an admin interface would more appropriately be built as an extension onto an existing control panel, this way you don't end up with 100 different login screens for each section of your site. so for now we'll just plan on uploading/deleting images the old fashion way, via ftp or whatever your preference. our focus is simply to display.

    our gallery will consist of three scripts: - config.php (contains setup information) - images.php (display's our galleries) - imgsrc.php (draws our thumbnails)

    More Miscellaneous Articles
    More By notepad

    blog comments powered by Disqus

    MISCELLANEOUS ARTICLES

    - Oracle Database XE: Indexes and Sequences
    - Modifying Tables in Oracle Database XE
    - Oracle Database XE: Tables and Constraints
    - More on Oracle Databases and Datatypes
    - Oracle Database XE Datatypes: Datetime and L...
    - Oracle Database XE Datatypes: Character and ...
    - From Databases to Datatypes
    - Firefox 3.6.6 Released with Improved Plug-in...
    - Attention Bloggers: WordPress 3.0 Now Releas...
    - Reflection in PHP 5
    - Inheritance and Other Advanced OOP Features
    - Advanced OOP Features
    - Linux from Scratch V.6.6 Review
    - Linux Gaining in Strength
    - Install Slackware on Your Old PC


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 5 - Follow our Sitemap