March 13, 2008 23:17 by
jwendl
I am providing a "pre-release" version of my photo gallery control for BlogEngine. There were a few things I considered when making this control (and not going with other solutions that exist).
-
No third party assemblies (that means everything written from scratch).
-
Keep business logic and control logic inside one contained .DLL file.
-
The interface with BlogEngine will be through an extension.
-
Follow the BlogEngine method of abstracting data types and resource files.
-
Make the gallery control easy to setup and use.
With these goals in mind, I hope that my assembly + extension will be considered as part of the core of BlogEngine. If I do not accomplish this goal, well then I have a pretty kick arse photo gallery for my personal use.
Installation:
-
Place the Jwendl.PhotoGallery.dll file into ~/Bin
-
Place the PhotoGallery.cs file in ~/App_Code/Extensions
-
Add the handler code to web.config : <add verb="*" path="PhotoHandler.axd" type="Jwendl.PhotoGallery.PhotoHandler, Jwendl.PhotoGallery" validate="false"/>
-
Add the handler code to web.config : <add verb="*" path="/admin/ImportHandler.axd" type="Jwendl.PhotoGallery.ImportHandler, Jwendl.PhotoGallery" validate="false"/>
-
Place PhotoDataSet.xsd inside ~/App_Data/gallery.
-
Place photos inside ~/App_Data/gallery (and make sure gallery is writable)
-
-
Wait until it redirects you to your main home page.
-
Create an empty page with a title and put [ gallery ] (no spaces) in the body.
Features:
-
Role based security (this is 85% complete)
-
Easy to install and setup.
-
Completely separate from BlogEngine (delete the .axd references and the .dll file and you are back to normal)
-
DataSet driven to allow for an abstraction and greater control of the data.
Items Missing (only for now):
-
Only finds files that end in .jpg (yes I know this needs to get fixed)
-
Uses XmlDataSource right now, and at some point needs to use a Provider model so SqlData, Xml, and other sources can be used.
-
Need to make a slide show of some sort, probably in Ajax, Silverlight or Flash.
-
It is missing an upload control, right now it requires photos to be in the ~/App_Data/gallery directory (even though it does not matter how convoluted of a directory structure you have, it will find your photos

).
-
Reliance on source code for a QueryString class. Actually a reliance on query strings in general. I do not want post back either, so I doubt I will be able to fix this.
-
Photo MetaData and EXIF data.
-
Missing the comment system (although the dataset is ready to go with it, just got to build the code logic).
-
Assembly built for .NET 2.0 32 bit right now, I will release source later so people can make their own versions.
-
Make it so you don't have to modify the web.config file (this will probably not happen).
So if you are daring feel free to try it out, you can see mine at http://www.jwendl.net/page/Photo-Gallery.aspx. Please comment here on this post with your feedback and or issues. Also if you want the source code used to create the assembly just ask using my contact form.
Jwendl.PhotoGallery-Alpha-0.1.zip (23.48 kb)
Edit: I forgot to mention I had to hard code the next, previous, last and first images. Place them in your /images/ directory as the following (I got mine from FamFamFam):
this.firstImageURL = "/images/resultset_first.png";
this.prevImageURL = "/images/resultset_previous.png";
this.nextImageURL = "/images/resultset_next.png";
this.lastImageURL = "/images/resultset_last.png";
I totally apologize for that, it will definitly get fixed. I was planning on putting the image settings inside the web.config file. These settings would be similar to how Elmah does it.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5