MoveableType Image Directory Show

show_dir|/home/web/htdocs/beergeek/photos/pictures/Best|5|1

Hey – look at me — I created a MoveableType plug-in that displays a directory of images in an entry. See the images below? Click MORE to see how I did it and get the source.

This is very specialized to my set up. No support is available. Your mileage may vary, don’t chew with your mouth open, look both ways before crossing the street.

I placed the following line in the Excerpt field for this entry:

show_dir|/home/web/htdocs/beergeek/photos/pictures/Best|3

This is a tag so that the plug-in knows there is a directory of images to show, and the number of images to show (3).

Then I created the plug in — named it mt-photodir.pl and placed it in the plugins directory of MoveableType. Source is here.

Then edit the templates you wish and place:

<MTPhotoDir>

Where you want the images to be displayed. For me, I placed it in the main index and all of the archive templates just below the lines that said <$MTEntryBody$>.

Simple, eh?

Feel free to take the code and modify it. I just request that you keep my name and contact info somewhere in the source and you send me the changes you make. I might want to include them in my copy.