Miscellaneous

  Home arrow Miscellaneous arrow Page 6 - 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 - conclusion


    (Page 6 of 6 )

    we should now have a fully functional image gallery. just keep the three files together, and edit the configuration file to point towards your image folder. there are a couple things we should note here. this project assumes that all images belong to a particular category, so having images in the same directory that contains sub-directories may not have the desired result. in my testing it just ignored the images and displayed the sub-categories. as long as we keep our gallery properly organized, updating should take no longer than uploading an image to the server =D

    TIP's:

  • in imgsrc.php, you can take advantage of imagejpeg's 2nd arguement and have it automaticaly make copies of thumbnails for you to the directory of your choice, then check to see if the thumbnail already exists and use the readfile() function to output it if it does. you could even go further as to overwrite old existing thumbnails with news ones if the sizes specified within the configuration file change (for portability). you would have to modify how images.php calls and handles images to make this work, but the pay off would be less stress on your PHP server, as it currently has to re-draw the thumbnails with every request.
  • if you plan on writing a control panel interface to this script in order to upload/delete via the web, i would recommend using the existing scheme rather than rewriting code. for example, if an admin is logged in, just modify the code to display a delete check box next to each category and image, along with upload/create fields within each category. right now, empty directories are not hyperlinked, but they should be linked for an admin so that they can get into it to make changes.about the author

    hi, i'm notepad.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.
    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 10 - Follow our Sitemap