Navigation
 - Home
 - Programming
 - Astronomy
 - Places
 - Essays
 - Friends and Family
 - Music
 - Food
 - Resume

  Other Stuff
 - Message Board
 - Cancun Weather

 

Sites of Interest :

Your Site Here Your Site Here Your Site Here Your Site Here Your Site Here

GalleryGen

An Image Gallery generator w/Source in C#

07/02/2003

I've tried a bunch of different gallery generator programs out there and I've never been happy with any of them. Included is the source code, sample template files, and some buttons that I stole from another app.

There are no real instructions, so I'm going to simply provide them here in brief. The program uses two template files: A letter template file and a gallery template file. It separates all the galleries by letter. So, it works kind of like this: Let's assume I have picture in a bunch of directories with the name of the person in the pictures. Say, directories called Mary, Tom, Sam, Andrew, Jennifer, etc. Letter templates would be used to create an A gallery, J gallery, M gallery, S gallery, and T Gallery. Why? Because thats the way I wanted it. If you want it different, change the code.

So, in the A page, you'll have Andrew. Thumbnails will be generated from all the pictures in the "Andrew" directory and placed in a thumbnail directory. Then, an Andrew page is created with all the thumbnails and links to the original images. Pretty simple.

GalleryGen looks for an XML file called galgen.xml, in the same directory as the application. This XML file tells it where the original photos are, where the thumbnails go, and where the HTML files go. It also points to the first, previous, next, last, and up buttons, which are used for navigating from page to page.

The sample templates will provide a pretty good example of how things work. All the codes are in double square brackets. For example, if gallerygen sees: [[Previous]] in the HTML, that will be replaced with a link to the "Previous" button.

I wrote this thing in an afternoon, so don't expect much. It works for my needs and I don't really care if anyone else uses it or not, but if you do, enjoy.

By downloading this program and source, you recognize that this is my work and that you will not redistribute it. Period. If you want someone to have it, send them to my page to download it. If you want to derive an application from it to sell or redistribute, you must obtain my prior approval. Otherwise, you're free to use it for your own personal use, as you see fit. If you're unsure of where your use falls, contact me.

The Code



Copyright 2003, 2004 Pete Davis. Site Designed by http://www.quickness.uni.cc. All Rights Reserved.