Stop Design Photo Gallery Plugin for Movable Type 4.1
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
Filed in Blogging, Design, Movable Type, Personal Projects and tagged design, doug bowman, movable type, photo gallery, photography, plugins, stop design
46 Comments
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. :)
Tami at 2008-02-15T20:46:59-08:00
I assume Image::Magick is required?
Jerm at 2008-02-18T06:07:29-08:00
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
Zrinka at 2008-02-18T12:13:10-08:00
Is this a valid path on your system: /home/googeeor/public_html/mt41/mt-static/plugins/PhotoGallery/meta/functions/all.php
Byrne at 2008-02-19T13:12:24-08:00
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
Zrinka at 2008-02-19T16:19:35-08:00
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.
Laurie at 2008-02-29T19:13:46-08:00
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?
Byrne at 2008-03-04T10:19:35-08:00
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?
Russell at 2008-03-08T04:59:31-08:00
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
Tony Valentine at 2008-03-16T16:02:35-08:00
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.
Tony Valentine at 2008-03-17T06:28:03-08:00
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!
mia at 2008-03-22T06:52:42-08:00
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 at 2008-03-22T07:06:51-08:00
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.
http://openid.aol.com/mrbalderas at 2008-03-25T12:48:11-08:00
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.
http://openid.aol.com/mrbalderas at 2008-03-25T12:55:23-08:00
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 at 2008-03-29T18:56:14-08:00
@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.
Byrne at 2008-03-30T21:02:32-08:00
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
rob at 2008-03-31T09:51:22-08:00
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 :)
x-opher at 2008-03-31T12:34:38-08:00
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.
Laurie at 2008-03-31T14:58:33-08:00
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
Thorsten at 2008-04-08T10:12:20-08:00
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.
Byrne at 2008-04-13T21:51:45-08:00
Is there a way then to add a photo gallery to an existing blog?
Dan at 2008-04-14T05:32:17-08:00
@Byrne thanks for the information
Thorsten
Thorsten at 2008-04-14T10:20:12-08:00
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.
Byrne at 2008-04-14T14:31:06-08:00
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?
Tom Keating at 2008-04-18T19:39:07-08:00
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.
Tom Keating at 2008-04-18T20:31:24-08:00
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?
alstone at 2008-04-30T07:30:05-08:00
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.
Janine at 2008-05-08T01:21:03-08:00
Hi, I have the Photo Gallery running on my current MT3.1 blog.
I installed MT4.13 on a separate path to test Photo Gallery. After installation and creation of a Gallery called Military, I created some test posts.
There are some PHP files created. But some strange reason, from IE or FF, the pages are blank!
Help?
regards Alfred
Alfred at 2008-05-27T03:33:14-08:00
I have downloaded 2.0 zip, and uploaded plugin files to my cgi-bin/mt/plugin dir and my static files to my mt-static dir. I've also made all scripts in cgi-bin/mt/plugin/PhotoGallery executable since gallery.cgi from the instructions no longer exists. I've created a new blog at the location public_html/galleries according to the instructions and added one photo. Then I've published my new blog. When I try to browse my blog I get an error similar to Tony Valentine above. It seems like it looks for my mt-static in my cgi-dir instead of the mt-static what's up with this?
Warning: include(/home/web28126/domains/bitwalk.com/publichtml/cgi-bin/mt/mt-static/plugins/PhotoGallery/meta/functions/all.php) [function.include]: failed to open stream: No such file or directory in /home/web28126/domains/bitwalk.com/publichtml/galleries/index.php on line 10
Any tips?
Andreas Thorsén at 2008-05-27T14:50:16-08:00
Andreas,
Here is my directory structure;
/public_html/cgi-bin/mt/mt-static/plugins/PhotoGallery "Plugins"
/public_html/mt-static/plugins/PhotoGallery "mt-static"
for some reason this was very confusing for me, but I finally got it.
~tv
Tony Valentine at 2008-05-29T21:30:54-08:00
Hi Tony,
If swap the folders around, wouldn't the templates break? For example no "Upload Photos" in the Create menu.
Yes I saw the strange include in the index.php. I did a switch around cgi-bin and mt-static folders to no success.
AL
Alfred at 2008-06-01T20:56:22-08:00
I'm running MT 3.33 and I upgraded Plugin Manager from 1.02 to 1.05 and now when I click on Plugin Manager from MT Home screen I get "End tag mismatch (head != meta) [Ln: 35, Col: 6]" anyone have any ideas?
Question 2: I was wondering if there is a way to completely backup the photo galleries and everything in MT related to it? Or duplicate it under a new folder. I want to experiment with the MT4.1 and Photo Gallery 2.0 features without worrying about loosing or having to upload another 1132 one by one.
Kevin Barnett at 2008-06-18T18:50:54-08:00
Hi,
I just installed your plugin, created a new blog with it, and I'm having a weird variation on the error everyone else is getting:
Warning: include() [function.include]: open_basedir restriction in effect. File(/home/htdocs/mt-static/plugins/PhotoGallery/meta/functions/all.php) is not within the allowed path(s): (/f1/content/krisjacque/:/nfsn/content/krisjacque/:/nfsn/apps/php5/lib/php/:/nfsn/apps/php/lib/php/:/nfsn/content/content/nfsn/) in /f1/content/krisjacque/public/art/index.php on line 10
Warning: include(/home/htdocs/mt-static/plugins/PhotoGallery/meta/functions/all.php) [function.include]: failed to open stream: Operation not permitted in /f1/content/krisjacque/public/art/index.php on line 10
Warning: include() [function.include]: open_basedir restriction in effect. File(/home/htdocs/mt-static/plugins/PhotoGallery/meta/functions/all.php) is not within the allowed path(s): (/f1/content/krisjacque/:/nfsn/content/krisjacque/:/nfsn/apps/php5/lib/php/:/nfsn/apps/php/lib/php/:/nfsn/content/content/nfsn/) in /f1/content/krisjacque/public/art/index.php on line 10
Warning: include(/home/htdocs/mt-static/plugins/PhotoGallery/meta/functions/all.php) [function.include]: failed to open stream: Operation not permitted in /f1/content/krisjacque/public/art/index.php on line 10
Warning: include() [function.include]: Failed opening '/home/htdocs/mt-static/plugins/PhotoGallery/meta/functions/all.php' for inclusion (include_path='.:/nfsn/apps/php5/lib/php/:/nfsn/apps/php/lib/php/') in /f1/content/krisjacque/public/art/index.php on line 10
Fatal error: Call to undefined function DocHead() in /f1/content/krisjacque/public/art/index.php on line 12
I checked and double-checked the path, and it IS valid. Any ideas?
Kris at 2008-07-03T21:07:39-08:00
I have installed the Photo Gallery plugin for MT4. I need to put the mt-static folder in the cgi-bin to work. So far every works find. Except for mass import. That is totally broken.
Highdiver at 2008-07-10T19:39:34-08:00
Hi I love these galleries.
I just tried to install v2.01 on MT 4.2, and the install went fine and I can create a photoblog, but when I view it I get a 500 error.
Any ideas for how I should troubleshoot? I am an abolute rookie, by the way.
Thanks!!
Scott
Scott at 2008-08-19T08:22:43-08:00
@Scott if youll try to browse your Plugins directory, you will find that the meta folder is missing in v2.01.
Download the 2.0 version and upload it from there.
tildemark.com at 2008-08-19T17:09:50-08:00
ohh, sorry my mistake i was looking at the wrong folder.
and now im getting 500 error on my mt4.2 installation
tildemark.com at 2008-08-19T17:16:56-08:00
sorry for the multiple post but i have found the solution on my install.
try to change the permissions on your folders and index.php scripts removing the write permissions. making your folder permission as 755 and your index.php 644. then after hit refresh button on your browser.
the only problem is were going to change the permissions every after publishing the site. we might be able to change this on the code somehow. i dont know where
tildemark.com at 2008-08-19T18:27:37-08:00
Thanks a million - this worked for me too. I agree it is a bit of a hassle, but I am so pleased.
Are you suggesting that we need to re-add the write permissions everytime we want to publish to the site?
Scott at 2008-08-19T22:06:57-08:00
yes, ive tried adding another photo and the script placed the +w permissions again ang the 500 errors were back. i have re edited the .php files and it runs again.
we need to find a fix before uploading in more photos.
tildemark.com at 2008-08-20T01:35:16-08:00
I think that the problems may be more than just the permissions errors.
Even after I adjusted the permissions, I noticed some of the icons did not load. When I looked, the path where the page was looking for the icon did not even exist ("meta" - within the generated folder).
I don't have the expertise to troubleshoot/debug this. I'll just hope that a new version comes along that supports MT 4.2. I'll look for some alternatives in the meantime.
Thanks for all of your help.
Scott at 2008-08-20T12:28:42-08:00
I am running Photo Gallery 2.01 with MTOS 4.21-en - The creation of the gallery blog just took one second and everything gone fine.
However, I cannot find the Create > Upload Photo menu item: any idea or check I can perform?
Thanks in advance. Cheers, --Federico
phretor.myopenid.com at 2008-08-25T00:49:26-08:00
Not sure if anyone is still reading these but here goes anyway. Installed Photo Gallery 2.01 on MT4.21-en without a problem and created a new blog using the (PHP) option. Was able to create albums, upload files and view the pages.
Decided to try the (HTML) option to see what it offered so created a new blog but when trying to publish it got the following:
An error occurred publishing entry '2172111.jpg': Publish error in template 'Individual Photo': Error in tag: Unknown tag found: Category
If I select the 'Edit template' option in the error window I get:
One or more errors were found in this template.
Can anybody shed light on what might be wrong.
Cam at 2008-09-30T05:10:28-08:00
You don't need to update permissions every time. Just set in the mt-config.cgi:
HTMLPerms 0644 DirUmask 0022
This will set the right permissions (directory:755, file:644).
Halász Sándor at 2010-04-06T13:19:45-08:00
i am so sorry to hear that,my web building with Movable Type 4.1 must update now,thanks!bouvier des flandres
blue heeler at 2011-02-24T23:16:54-08:00