Miscellaneous
  Home arrow Miscellaneous arrow Creating an Image Gallery
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
JMSL Numerical Library 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Creating an Image Gallery
By: notepad
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 7
    2003-10-24

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

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    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


       · if your larger images are dead, and you right-click to see the properties of the...
       · ... or#4 - You may not have the gd library properly installed or PHP compiled...
       · At first I was confused as to why TYPE was serialized in config.php only to be...
       · right, it actually says in the tutorial "we'll define an array of valid...
       · *blush* I guess I should have "thoroughly" read through the text...
       · thanks this will help me make my gallery, i already started but this will help me...
       · as i add improvements to this gallery over time, i'll make them available...
       · new bug found that might be causing dead thumbnails.. if the names are odd,...
       · i dunno why i bothered to post that, considering i fixed it, and the post before...
       · Thank you for this great tutorial, it helped my understanding a lot!
       · Thank you for this great tutorial, it helped my understanding a lot!
       · Thank you for this great tutorial, it helped my understanding a lot!
       · alright the old update site has been shutdown. further updates for this gallery...
       · I found that i can't login to this admin panel. The rest of the script works, apart...
       · within your config file, make sure the HOST value is your domain. otherwise it will...
       · if you haven't gotten the updated script from the code library, definately do...
       · Make the thumbs pop up in new window? Some images viewed in full size torture my my...
       · Great tutorial.I am somewhat new to PHP. I managed to get the script working no...
       · Great tutorial.I am somewhat new to PHP. I managed to get the script working no...
       · Hi, im kinda new in PHP, and here is my (must be simple) problem: I putted the hole...
       · so i started over, from scratch. a revised tutorial will be published in phparch.com...
       · adding the revised code to the code section, again. the "new...
       · 
       · error in line "$size = getimagesize($dir.$file);" of...
       · error in line "$size = getimagesize($dir.$file);" of...
       · 
       · 
     

    MISCELLANEOUS ARTICLES

    - Stopping CSRF Attacks in Your PHP Applicatio...
    - Quick and Dirty AJAX Tutorial
    - Flickr Puzzle Mashup
    - The PAVISE of Security
    - Creating a CAPTCHA with PHP
    - Sending SMS Thru HTTP
    - The Postal Fix - Part 2
    - Adding Mail with Exim
    - The Postal Fix - Part 1
    - Create Your Own Custom API
    - Adding Drop Shadows with PHP
    - Writing a Basic Authentication System in PHP
    - Overlapping Images with GD
    - Using Sockets in PHP
    - Dynamic CSS with PHP






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway