In today's Movable Type hackathon I chose to focus on a Movable Type plugin of mine that has been neglected quite far too much since the release of MT4: the Photo Gallery plugin. I held off primarily because I knew that the template set feature in Movable Type 4.1 was going to make the user experience for the Photo Gallery plugin totally worth the wait.
What I have hacked together so far is far from perfect, but it serves as an excellent and fully functional preview of what is in store for this plugin in the coming weeks. Please, install it, use it and let me know what you think.
Instructions
- Make sure you have MTOS 4.1 or MT 4.1 installed.
- Download PhotoGallery-2.0.zip
- Follow the installation instructions.
- Create a new blog and use the "Stop Design Photo Gallery (PHP)" template set.
- From the Create menu select "Upload Photo."
The rest should be, I hope, self explanatory. If it is not, then that is a bug.
About Photo Gallery 2.0 (alpha)
This is not an official release. It is a preview and chance for me to hear some feedback from users.
In case you were wondering, here is an overview of some of the enhancements found in Photo Gallery 2.0:
- easy to install photo gallery - using MT's template set system you can install a PHP version of Doug Bowman's templates.
- photo album nomenclature - when you are in the administrative interface managing a photo gallery, the classic bloggish language of MT is replaced by more familiar photo related terminology, e.g. "Album" vs. "Category".
- faster publishing - the templates have been completely refactored to be faster to publish and faster to process new uploads.
- easy photo management UI - using Movable Type's built in asset management interface it is far simpler now to view all your photos from within the admin interface.
- better upload dialog - a better and simpler photo upload dialog has been provided to allow you to view the photo while you provide a title and caption for it.
- no hacked custom fields - data is now stored logically within an entry allowing users to realistically edit a photo even after it has been uploaded and saved.
But remember, I am not done yet. So expect the following soon...
- OpenID support for commenting
- a second plain HTML photo gallery option

What you updated so far looks great! However, since you're not done yet, I'd like to put in a plug for adding a Photo Credit field for the asset management in addition to the ones you've already made. :)
I assume Image::Magick is required?
HI,
first of all - thanks!
I installed the plugin without any problems, but when I try to view the newly created blog I get the following errors. Any ideas of how to fix this? Thanks!!!
Warning: include(/home/googeeor/publichtml/mt41/mt-static/plugins/PhotoGallery/meta/functions/all.php) [function.include]: failed to open stream: No such file or directory in /home/googeeor/publichtml/photos/index.php on line 10
Warning: include() [function.include]: Failed opening '/home/googeeor/publichtml/mt41/mt-static/plugins/PhotoGallery/meta/functions/all.php' for inclusion (includepath='.:/usr/lib/php:/usr/local/lib/php') in /home/googeeor/public_html/photos/index.php on line 10
Fatal error: Call to undefined function dochead() in /home/googeeor/public_html/photos/index.php on line 12
Is this a valid path on your system: /home/googeeor/public_html/mt41/mt-static/plugins/PhotoGallery/meta/functions/all.php
HI,
thanks! yes, that was the problem. The problem was that I installed "PhotoGallery" folders with the folder structure as in the zip file, which means that I placed mt-static/PhotoGallery folder in the mt-static folder of my MT install, but in actually needed to go into mt-static/plugins.
However, now I have a different problem. When I want to view my blog, I get the following errors:
SoftException in Application.cpp:238: File "/home/googeeor/public_html/photos/index.php" is writeable by group Premature end of script headers: index.php
I assumed the problem was in permissions, so I changed the index.php permissions from 666 to 644. I then got one more similar error, complaining that the folder "photos" (the new blog) is also writeable by group. After I changed the permissions of that folder to 644 too, I could view the blog.
I thought that would work, however, whenever I upload a photo, the permissions for main index.php (and all other index pages - galleries, albums...) get changed back to 666, which gives me the server error again.
Is it a permissions problem or something else?
Thanks!
Zrinka
I'm sure this is a silly question, but where do I go to choose the "Stop Design Photo Gallery (PHP)" template set? From your installation instructions, "Create Photo Gallery" should be under "Plugin Actions" but I don't see anything like either of those terms when I'm running MT.
Also, I see that the plugins are all there when I look under "Plugins" on the "System Overview" menu, but those plugins don't show up when I check the Plugins page on my individual blogs. Does this matter? I should note that I just installed Movable Type 4 and my server is GoDaddy, which has major issues so I had to do a workaround in order to get it to run at all. Could I still be missing a vital piece from my MT4 install and that might be causing these problems?
Any help would be greatly appreciated! I'm not a programmer; I'm just trying to muddle my way through all of this so I can have a pretty photo gallery on my website.
The instructions you are referencing are out of date. In MT 4.1 the photo gallery templates are installed via a feature we call "template sets."
To create a photo gallery, click the "Create Blog" link found in blog selector/pull down menu just below the Movable Type logo. MT will ask you to select a template set. Select "Stop Design Photo Gallery (PHP).
Does this answer your question?
helllo, firstly I apologize, I am new to all this and I am at the bottom of the learning curve! I have installed and managed to create a photo blog, however when I go to view it it comes back with 500 server error, and in the abscence of instructions I don't know where to turn next. Another thing is what is the build folder and where does it go and is it the answer to the 500 problem?
I am glad you started working on the Photo Gallery plugin for MT. I have run into a little problem and can't seem to figure it out. I have everything installed and setup as it should be (so I think) but I keep getting this error message:
Warning: main(/home/ohsnncom/publichtml/cgi-bin/mt/mt-static/plugins/PhotoGallery/meta/functions/all.php) [function.main]: failed to open stream: No such file or directory in /home/ohsnncom/publichtml/photogallery/index.php on line 10
Warning: main(/home/ohsnncom/publichtml/cgi-bin/mt/mt-static/plugins/PhotoGallery/meta/functions/all.php) [function.main]: failed to open stream: No such file or directory in /home/ohsnncom/publichtml/photogallery/index.php on line 10
Warning: main() [function.include]: Failed opening '/home/ohsnncom/publichtml/cgi-bin/mt/mt-static/plugins/PhotoGallery/meta/functions/all.php' for inclusion (includepath='.:/usr/lib/php:/usr/local/lib/php') in /home/ohsnncom/public_html/photogallery/index.php on line 10
Fatal error: Unknown function: dochead() in /home/ohsnncom/public_html/photogallery/index.php on line 12
Now, the path is there but it just won't work. I followed the folder structure and placed the "mt-static" folder into my mt-static/plugins folder - then I placed the "plugins" folder into my cgi-bin/mt/plugins folder. What did i do wrong? Help!!
Thanks
I figured out what the problem was... for some unknown reason I placed the folder into cgi-bin/mt/mt-static/mt-static/plugins/PhotoGallery. All is working now.
Installed everything, got the same errors as those above.
Although I KNOW my config file is pointing correctly at my mt-static folder this plugin insists its in the cgi-bin/mt folder rather than at root level.
So I copied the mt-static folder from this plugin into my mt folder and it worked.
That doesn't seem right to me, seeing as I now have two mt-static folders - hence me mentioning it here!
That said, it is working now, so yay!
include(/home/furtivem/publichtml/cgi-bin/mt/mt-static/plugins/PhotoGallery/meta/templates/modules/modfooter.html) [function.include]: failed to open stream: No such file or directory in /home/furtivem/publichtml/thephotos/galleries/index.php on line 50
Reason? I presume its because this file (mod_footer.html) is in this directory:
\mt\plugins\PhotoGallery\templates\html
and NOT in the mt-static folder.
Mia, I had this problem as well. Not sure what hosting service you are using but I managed to fix it on my website. I found out that I couldn't have the 'mt-static' folder within my cgi folder. Moving it to the root addressed my issue.
I also had the same 'mod_footer.html' error and noticed that for some reason my install didn't create the required sub-folders within my blog's folder for those files. Verify that the path stated within your error does exist within your blog's folder.
Byrne, I just looked back at the PhotoGallery-2.0.zip file and your package does not include the 'templates' sub-folder within 'PhotoGallery-2.0\mt-static\plugins\PhotoGallery\meta\''
I managed to create the folders and copy the file from your photos site and enter it into mine.
i have the latest MT 4.1 installed, installed the photo gallery plugin and chmod the gallery.cgi to 755, and still do not see the dropdown to select a template set when creating a new blog.
i can't find an answer anywhere i look.. banging head against wall at this point. any help is appreciated.
@rob - does the gallery plugin show up in your list of installed plugins?
FYI - the gallery.cgi file is no longer needed for MT4. I will remove that from the next distro.
these are the photo gallery related plugins that show up on the system plugin settings screen but not on any of my blogs plugin settings screens..
PhotoGallery/MTCategoyOfArchive.pl PhotoGallery/MTCollate.pl PhotoGallery/MTGrid.pl PhotoGallery/MTRelativeURL.pl Photo Gallery 1.7 PhotoGallery/PreviousNextInCategory.pl PhotoGallery/arithmetic.pl PhotoGallery/category.pl PhotoGallery/dirifyplus.pl PhotoGallery/entry.pl PhotoGallery/keyvalues.pl
should all of these show up or should it just be one for the entire Photo Gallery.
TIA / rob
Hi this is pretty stupid but do you have a step by step instruction readme file anywhere? I have to hack and slash my way through any install and the instructions you link to refer back to the install for the previous version and things have changed. Please help :)
Byrne,
Re: my earlier problem - Yes, that helped. Thank you.
My problem now is that whenever I upload a photo and publish it or try or try to change the design style, nothing shows up. It's still a blank gallery with the same design as when I originally installed everything. Any ideas? I'm still wondering if I'm missing some huge piece of the MT 4 install that I maybe didn't get right the first time. GoDaddy is really screwy and I can't afford to move to another hosting service right now.
Byrne,
thank you for this juvenescence of Bowman's templates. unfortunately I encounterd a problem migrating from MT3.2 and Photo Gallery 1.04 to MT4.1 and Photo Gallery 2.0. I am using the mt api to communicate to MT via a perl script which is uploading the Photos. Communications is well, but the Photos don't show up, only the text (excerpt,keywords etc). In the Old version the fields entrytext and entrytext_more where used to reference to the Photos. How is it done now, I cant't figure out?
Greetings,
Thorsten
This method no longer functions with Photo Gallery 2.0 and this definitely needs to be better documented.
The new Photo Gallery format uses Movable Type assets to extract the photo out of the post and then to generate all the various sizes (thumbnails, etc) of the asset. MT currently uses a special syntax for serializing/encoding/marking up an asset in a post.
Insert an asset into a post normally and replicate it's HTML.
Long story short, this is the new mapping:
There is no need to put the thumbnail and medium sized versions into different fields - just the one asset - a reference to the full size version - in the extended body field.
Is there a way then to add a photo gallery to an existing blog?
@Byrne thanks for the information
Thorsten
Photo galleries exist as a separate blog within Movable Type. So setup a blog dedicated to that purpose, then link to it from your existing blog. That is what I recommend.
Great plugin. I played around with the older MT 3.33 version but never full deployed on my blog. One of the reasons was I didn't like the use of Keywords instead of tags. I tried hacking the code - should have been easy to change, but was tired and gave up.
Most photo sites use "tags" not "keywords", i.e. Flickr.
Would allow users to do stuff like domain.com/photos/tag/disney world domain.com/photos/tag/bahamas domain.com/photos/tag/tower of terror (technically %20 for spaces in the URL)
I was able to edit each photo entry with the full editor and add the tags, but tedious since a 2-step operation. Plus the template only displays keywords not tags.
Any chance you can add tags field when creating the entry as well as adding the tags to the photo templates? Or at least instructions how to do it in the comments section?
Update:
Tried this version. nice Asset integration!
You do now display the Tags field when uploading a photo, but the resulting php page in the gallery webpage itself still only displays comma separated keywords.
tried editing photo.mtml and changing MTEntryKeywords to MTEntryTags but that didn't work. Hmmmm. Much be something simple to switch to tags.
I'm still getting a 500 error on my install, will continue to mess around with things.
However, my other question is, how can I FTP a bunch of photos up to the appropriate folder of the gallery without having to do it one-at-a-time as is currently how it is done. I've actually already done this, and I moved over all the PHP pages that were generated from a prior installation (for MT v.3.2), but none of the images nor the PHP pages are editable form within the MT 4.1 interface. So, that was a bust.
Ideas?
http://www.jinstonic.co.uk/phpphotoblog/
I have installed and everything works for uploading a photo - but the IMG tag in the templates never gets any information in it so no images show up in the gallery??
Any ideas.