Photo Gallery plugin for Movable Type gets some love.

Finally, the Photo Gallery plugin has been upgraded to work with Movable Type 4.2. At first I considered just upgrading the photo gallery templates, but after such a long time, I figured my patient users deserve a little bit more than that. So, over the past several days I have devoted a great deal of time to revamping the Photo Gallery plugin to provide additional and enhanced functionality for managing your photos and albums. Here is a brief list of changes for the Photo Gallery 2.1 plugin for Movable Type:

Manage Photos Screen

Photo Management Screen

View all your photos, or just the photos from a specific album. With this new screen, photo management is done as it should be: as a grid of thumbnails, and not a tabular list of entries.

Album Filtering in the Management Screen

Edit Photo Dialog

Edit Photo Dialog

Edit your photos, their title, caption, tags, and more, in a simple dialog triggered by clicking the photo's name on the photo listing screen.

Upgraded Templates

Doug Bowman's templates have been upgraded to work with the latest and greatest of Movable Type 4.2, including: enhanced javascript, comment threading, and more.

Template and CSS Fixes Galore

The templates and stylesheets used in your galleries will now work with any photo regardless of aspect ratio.

Menu and Navigation Enhancements

New Photo Gallery Menus

When working within a blog powered by Photo Gallery, unnecessary menu items are removed in order to optimize your workflow and movement around the application.

Enhanced Upload Process

Upload Dialog for Photo Gallery

The upload dialog has been enhanced to let you more easily create new albums as you upload new photos.

The new version of Photo Gallery is not 100% complete yet. I still have a lot of testing to do, fixes to apply to the HTML version of Doug Bowman's templates, and the usual rigmarole of bug fixes. If you are interested in helping me out, feel free to download the latest version of Photo Gallery 2.1 and let me know what you think.

Recommended Entries

45 Comments

Wow, that's good news. I was just about to upgrade my gallery, tonight. I'll give it a shot, anything I should look out for?

Specifically? No, I don't think so. As for known issues, here is my list:

  • I have spent most of my time working to improve the PHP gallery. The HTML gallery may still have bugs.

  • One of the feeds in the PHP gallery will not publish because it uses a tag that no longer exists.

  • Favorite photos does not work.

That's all for now. Let me know if you find any other problems.

That's good news as I was just about to upgrade to 2.01.

Sorry about the double post, I didn't see the first one and thought I hadn't hit 'Submit'.

OK, just downloaded the zip. I see a mt-static folder and a plugins folder and a META.yml file. The two folders are self explanatory, but where does that META.yml file go?

You can safely ignore that file. It should not be in the distribution. Bug #1. :)

uploaded files CHMOD-ed to 755 but still getting file permission error

main blog installation is in achockablog directory

photogallery in separate directory

Thanks, I'll pretend it's not there. As far as bugs go, extra files is pretty minor. :-D

OK, I uploaded and changed permissions on xp.cgi, but when I logged into MT, I got nothing. There's no settings or upgrade gallery or anything that I see, do I still need to do the URL hack you mentioned in your last Photogallery post?

@salguod - stupid question maybe, but have you applied the template set to a blog yet? Or are you trying to get your old templates to work with a newer version.

The upgrade process I think is still only invoked when you enter in the URL manually, but it something that should only be done once. It is not thoroughly tested, but it did work for me.

You can delete mt-xp.cgi, or ignore it. It is not used. Yet.

This is the first I've installed any of the PG versions in my MT 4.21 installation. I installed 4.21 fresh and never copied the old PG to the new install. I had never gotten around to upgrading my PG blog, it's simply sitting there in it's PG 1.7 state, untouched and unrebuilt since the upgrade.

So, I need to:

1 - Run the upgrade script as in the earlier post. 2 - Apply the template set to my PG blog. (BTW - Where does one find that in the MT interface?)

Does it matter what order I do it in?

OK, my PG blog is id 4, so I plugged that into the path indicated at the last post to upgrade my current gallery blog. The screen fairly quickly refreshed, but that was it. Was there supposed to be an upgrade routine or some kind of screen displayed?

I'm thinking that it didn't work properly. None of my photos are assets (they were supposed to be converted, right?), the blog still looks like a blog instead of a gallery (I still have 'categories' not 'albums') and, well,it just went to fast with no feedback at all.

Also, the original post refers back to the 1.7 install instructions which indicate setting permissions on gallery.cgi. The 2.01 zip contains a gallery.cgi, but the 2.1 zip does not. Was it replaced or is it missing?

None of my photos are assets (they were supposed to be converted, right?)

Yes. They should be if it worked. Obviously it did not. :-/

The blog still looks like a blog instead of a gallery (I still have 'categories' not 'albums')

This only happens when you apply the template set to your blog. The upgrade process as it stands does not reset your templates and set your blog to use the new fandangled "stopdesign photogallery php/html" template sets. That is a separate step.

Also, the original post refers back to the 1.7 install instructions which indicate setting permissions on gallery.cgi. The 2.01 zip contains a gallery.cgi, but the 2.1 zip does not. Was it replaced or is it missing?

Nothing. Those instructions are out of date. With MT4, the need for gallery.cgi has been removed.

On HTML build, here's what i get. on PHP build no errors but im getting Internal Server Error

One or more errors were found in this template.

* <MTEntry> at line 0 is unrecognized.
* <MTAddVar> at line 55 is unrecognized.
* <MTAddVar> at line 69 is unrecognized.
* <MTIfE> at line 117 is unrecognized.
* <MTCategory> at line 16507 is unrecognized.
* <MTCategory> at line 16507 is unrecognized.

Byrne has indicated that the HTML templates aren't yet ready. See his comments above (and the hint in the text of this post) and earlier PG posts.

I have upgraded MT from 3.33 to the latest and PhotoGallery to 2.1. I have used the blog upgrade link and now my gallery shows but doesn't show the images. I noticed that your PG did the same in the past. What am I missing? Thanks! PG is awesome so is MT4!

@Kevin and @salgoud - FYI, there is no automated upgrade process. Meaning, you will not go through the typical MT upgrade flow when you enter in that URL manually. I did not want to plug it into that framework until I could be assured that it would work.

In fact, do either of you have a sample MT3 export I could use for my own testing? I can work on automating the upgrade provided that I have good test data to work with. Email it to me at byrne at majordojo dot com.

Are you upgrading an existing gallery built in MT 3.x and PG 1.7 straight to MT 4.21 and PG 2.1? If so, what was your upgrade like, did you get an upgrade screen or dialog at all?

@salguod

Yes,I upgraded to MT 4.21 and PG 2.1. I used the upgrade link and it just went to a blank screen. I presumed it worked,but my photos are not shown under assets so i guess it didn't The gallery rebuilds but it doesn't show images. SO that supports that. I tried it on my test gallery from MT3.33 and PG 1.7 before I upgrade my main photo gallery with over 1100 photos. I'm very eager to get this working.

I wish I had made a test gallery first, I did it on my live gallery. :-( I haven't rebuilt the gallery yet, so it still is accessible. Comments were off so I'm good, I just can't add to it or anything.

I have back ups, but it's a full database backup that includes my other blog too. Not sure how I'll separate them, but there's got to be a way. I hope.

You should try the revised upgrade script above on your test gallery and see if you get the same results I did.

Yes, the revised script had the same results. Thanks for posting your progress here. I am eager to get my PG upgraded so that I can add more photos.

Have you tried to create a new gallery through MT 4.21 and PG 2.1? I have and I must be missing something because I cant get it to work.

I should have my MT 3.33 database at home and I can zip the folders of images for you. Not sure how to split the PG blog from my main blog, so you'll get both.

With 1,300 photos and 4 years of blogging, it's going to be a pretty big zip file ...

Oh, and should I try the conversion again? Maybe try IE vs. FF? Would hitting the upgrade URL more than once hurt anything?

For others looking to upgrade from an earlier version of PG ...

Well, I managed to get the import script to work. The path listed on the earlier page looks like it was botched by markdown, which interpreted the underscores as tags for italics. The upgrade was listed as:

http://yourdomain.com/cgi-bin/mt/mt.cgi?blogid=###&_mode=PhotoGallery.upgrade

It should be:

http://yourdomain.com/cgi-bin/mt/mt.cgi?blog_id=###&__mode=PhotoGallery.upgrade

However, while I did get the upgrade to work, it misinterpreted the path on all my photos when converting them to assets, breaking all 1,300 of my gallery entries and creating 1,300 assets with missing images. I've sent my database to Byrne and shared the output file from the conversion. Hopefully he'll be able to help me rescue my gallery.

In the mean time, don't run that upgrade script, it doesn't seem ready yet, or maybe I did something wrong, I dunno.

ok, the gallery works fine with my local linux pc.

problems you encounter might be host specific.

It is soooooo good to hear that it works for someone. I thought I was a fluke. :)

As for @salgoud and @kevin, don't worry, I will continue to work on getting things squared away for you.

Bryne,

I've installed the plugin however I'm getting the internal server error. Your install instructions note to configure the plugin by editing permissions of the " 'gallery/cgi file " I can't find this. If I manually change permissions of the index.php file to 755 it's fine but when I update anything the permissions default to 666. Help please?

Where are these instructions you are referring to? If they are associated with PhotoGallery 1.x, please ignore them as they are no longer valid. PhotoGallery 2.0 is completely different. In fact, you should consider removing the folder:

/path/to/mt/plugins/PhotoGallery

completely so that there is no confusion between the files from the new and old installation.

I upgraded to 4.2, then tried to go to 4.2.1 and that didn't work well, so I went back to 4.2 which is working fine. I installed it using the new directory method, not the upgrade/overlay method, so the old Photo gallery plugins weren't present.

Now I'm trying to install PG 2.1 and am just guessing on what to do, I don't see any clear instructions.

I ran the url mentioned in the previous post, and it seemed to work.
I refreshed the blog templates and chose the Stop Design PHP template set. I published the index and archive template files.

I get an error "Page Not Found Smarty error: [in mt:612 line 25]: syntax error: unrecognized tag '/php' (Smarty_Compiler.class.php, line 580)"

Any idea what I forgot to do?

I get this error and a few others:

"Can't call method "imagewidth" on an undefined value at /home/josedant/publichtml/cgi-bin/mt/plugins/PhotoGallery/lib/PhotoGallery/Plugin.pm line 166."

I am getting an error when I attempt to publish the new "photo gallery" blog...

ERROR: Publish error in template 'Gallery Index': Unknown tag found: IfE

I downloaded the latest version from this post. Then installed the "PhotoGallery" folder and files into the plugins folder in the cgi-bin/mt/plugins/ folder. CHMOD the .cgi and .pl files to 755.

I installed the PhotoGallery folder and files for the mt-static into its location.

I created a new blog and chose "Stop Design Photo Gallery HTML" The blog was created and I published the blog and got the error. I got the same error when trying on a different blog and posted a issue on the sixapart forum and it was thought I had the wrong version. On the other blog I tried both php and html version with the same error...

I really would like to use the photo gallery... any suggestions?

I tried the php version and it published and I tried to upload a photo and got the following result?

Can't call method "id" on an undefined value at /var/www/vhosts/cpch.org/cgi-bin/mt/plugins/PhotoGallery/lib/PhotoGallery/App/CMS.pm line 460.

PG 2.1 After creating a gallery I encountered on problem. when on gallery's main page I go to Gallery data - Galleries.

I just receive the following error messages:

Warning: main(...html/mt-static/plugins/PhotoGallery/meta/templates/modules/mod_footer.html) [function.main]: failed to open stream: No such file or directory in .../html/gallery/galleries/index.php on line 65

Warning: main(../html/mt-static/plugins/PhotoGallery/meta/templates/modules/mod_footer.html) [function.main]: failed to open stream: No such file or directory in /nfs/c03/h03/mnt/55766/domains/arelav-photo.com/html/gallery/galleries/index.php on line 65

Warning: main() [function.include]: Failed opening '.../html/mt-static/plugins/PhotoGallery/meta/templates/modules/modfooter.html' for inclusion (includepath='.:/usr/local/php-4.4.8-1/share/pear') in .../html/gallery/galleries/index.php on line 65

What does that supposed to mean? As far as I can see, meta/templates/modules/mod_footer.html is not a part of the installation. Am I right? How this can be fixed? Thanks!

hey, thanks for the plugin! i'm trying this for a personal site and I've got it working well. The problem I am having is with commenting, and I noticed the error also on your personal Galleries, Byrne.

Is anyone having trouble commenting? I'm willing to strip out the code and goto default templates for comments if it's just my fault, but if others are having it too maybe someone has a solution.

"Your comment submission failed for the following reasons: Invalid request"

with the following errors in console:

mtCommentFormOnFocus

mtCommentOnSubmit is not defined

the mt-site.js exists in the location expected.

Hey Byrne, great work on this plugin. It contains another plugin called PreviousNextInCategory. How did you get it to work in php? I installed this entire plugin and can see that it works in php in your templates. But I'd like it to work on a non-stopdesign template. Can you please tell me how to do this. I see you've used the same tags.

Hi,

Did a new installation of PhotoGallery on the latest verions of MT (4.23).

It all seemed to install correctly (eventually), and I can publish an initial blank site. However when I go to Manage Photos I get the same error as Jose above:

"Can't call method "image_width" on an undefined value at cgi-bin/mt/plugins/PhotoGallery/lib/PhotoGallery/Plugin.pm line 166.

any clues on this one?

Thanks! JN

Just to clarify, I got this after uploading some images with the built-in tool, after uploading some with Better File Uploader, and then again after deleting the images from the database altogether.

Using Photo Gallery and Better File Uploader together is not supported, and probably will not work.

Hi Byrne (and Neil), first of all thx for updating the PhotoGallery for MT4.x! Although it caused a complete breakdown of my (now previous) gallery-site due to which I now have to re-upload 805 photographs... :( ... I see it as an enormous improvement on the original version. My gallery loss was caused by the simultaneous upgrade from MT 3.3x to 4.2x.

However, and that is why I type this in reply to Neil's comment, I also have some questions concerning the "commenting" in PhotoGallery.

The "Comment preview" template gives these warnings:

  • * MTIfGreater at line 0 is unrecognized.
  • * MTSetVar2 at line 38 is unrecognized.
  • * MTAddVar at line 38 is unrecognized.
  • * MTGetVar2 at line 38 is unrecognized.
  • * MTIfNotEqual at line 49 is unrecognized.
  • * MTCategory at line 65 is unrecognized.

So I guess some plug-ins are not present or unsupported. Might this be the reason for getting the: "Invalid request" comment submission error?

Thank you for any response!

I would like to know if this plugin works only with the bundeled template or can it work with my current template.

Does it work something like NextGen Gallery for Wordpress or does it require me to use the included templates?

Thanks alot.

Right now, this is an entire photo blog theme. But I have gotten a lot of requests for the ability to embed mini-galleries into blog posts, so I expect that will be something I work on later.

Byrne, I know you said (in an email) that you would be adding prev/next links on the photo entries. What about the count, say 5 out of 19, or whatever. Is there an easy way to do that?

Ken

That should be something you could easily add yourself, yes. :)

I had this running OK on our 4.2 test bed, but when I installed in on our 4.3 production platform I keep getting an error, after the "edit photo" screen:

Can't call method "execute" on an undefined value

On the edit photo screen the thumbnail appears, and the image plus its thumbnails end up in the file system.

Where the heck is this error coming from? There's nothing in my javascript console, nothing in the server error log, and nothing in the MT error log, to give me a clue.

hi,im japanese. im sorry my poor english. i use MT4.261 with photogallery2.1. i think it very good plugin for gallery. i have trable on IE... upload photo, and select menu of photo list.i can see the thumbnail. layout is non-normality. but with FIrefox. it was normal. can you see the photo list on IE? if you know what solution for this problem. please tell me. im really embarrasses.. see you.

Leave a comment

what will you say?


Recent Comments

Close