WordPress UnGallery

UnGallery dynamically publishes directories of images and embeds them into your WordPress blog.  The name describes the goal of the plugin to stay out of your way and allow you to manage your images with no administration in WordPress.

This approach allows your powerful administration tools like FTP, SCP, automation scripts, and image editors to directly manage your image library.  Changes are automatically reflected in WordPress.  There are no web forms to select files for upload.  There is no importing or modifications to the database.  The gallery files are accessed remotely by WordPress and remain accessible and manageable, outside the WordPress environment.

If you’ve ever had to reorganize where your photos are stored, remove a few from a large set, or edit the red-eye of a dozen pictures after uploading, you know how inconvenient it is to return to the website management UI to update everything.  With UnGallery, all these add/remove/edit changes you make to your library are automatically rolled into WordPress.

 

 

Features:

  • Unlimited depth, breadth, and number of photos. The gallery here has approximately 25,000.
  • Photo library is managed outside of WordPress.  Simply update via FTP, SCP, etc.  UnGallery displays changes automatically.
  • Multiple gallery views:  Top level marquee (optional), thumbnails, browsing previous and next pictures.
  • Gallery hierarchy breadcrumbs with links to parent, present, and sub-galleries
  • Optional and default banner captions
  • Unbrowsable, hidden galleries
  • Caching for faster page reloads
  • Support for MP4 movies embedded within WordPress
  • Automatic image rotation of jpegs with exif orientation, if available

Notes:

  • The layout is configured for the default WordPress installation.  I use the excellent Atahualpa theme and increase the page width to a modern browser standard.  The sizes of all thumbnails, images, and columns are configurable.
  • Feel free to use it, extend it, or contact me with questions.

Download:

  • Grab the current version at WordPress.org.
  • The installation steps are mostly standard, though there are couple simple, extra steps, noted in the instructions.

Screencast:

UnGalleryScreencast

182 comments to WordPress UnGallery

  • Don

    Nice WP site. Very clean and professional. I like it. When I get to that stage I’m also going to “tinker” with this plug. But, in the meantime, I do have a question. How did you get the “anti-spam” line (6+0=?) in your Leave a Reply form. I like this too, very clean. Thanks in advance.

  • mark

    Hi Don,

    It’s the wp-num-captcha plugin. It eliminated the spam comments I was receiving and I find it much easier as a user, than the visual CAPTCHAs. I also use the Atahualpa theme, which I consider an indispensable WP addition.

    Thanks for your comment on the gallery extension. I’m working to make it a native plugin now. If you do give it a try, I’ll be interested in any feedback you have.

    Take care,
    Mark

  • Works great, thank you

  • i got much error by this PLUGIN

    perhaps..my mistake.. please help me
    LOOK HERE: http://masterpiece.esanstudio.net/gallery

    nothing picture were view..how ever i had upload into the “pics” directory

    i try to read the “To Do” but i’m not understand

    i currently use WordPress 2.8

  • mark

    Hi baron and thanks! I’d love to see your gallery. Could you post a link?

    Hi esanstudio.net. I have tested on 2.8 now and UnGallery works. From the link you posted it looks like maybe you did not create a WordPress “page” called “Gallery”. Can you check the installation steps?

    1. Upload the ungallery directory to your /wp-content/plugins/ directory.
    2. Activate through the ‘Plugins’ menu in WordPress.
    3. Enable Permalinks: Settings -> Permalinks -> Custom Structure -> /%category%/%postname%
    4. Create a blank WordPress Page called “Gallery”.
    5. Your picture files go in a ./pics/ subdirectory of plugins/ungallery or symlink to your own picture directory.

    Let me know if I can help to get you online!

  • Stan Alachniewicz

    Hi,

    I’m trying to install this, but am unsure what a symlink is or how to create it? Can you give me a little more detail on actually using your plugin? I got it installed automatically via the dashboard, but cannot figure out how to add photos. Please help!

    Thanks,
    Stan

  • mark

    Hi Stan,

    No problem. UnGallery looks into its own plugin directory for a pics/ subdirectory. You can either create a directory there called pics and fill it with your photos or create a symlink to the directory where your photos already live.

    A symlink is a Unix/Linux shortcut to another location. You can create one for UnGallery by running the following command from the ./plugins/ungallery/ directory:

    ln -s /path/to/your/photos/ pics

    Of course, substitute the /path/to/your/photos part with the actual path of your photo directory. Remember the top directory should have a single introductory photo. I use it for things like a welcome or ‘picture of the week’, etc.

    Let me know if you have any more questions or how I can help!

  • Stan Alachniewicz

    Thanks for the quick reply,

    Ok, so this all has to be done on the back end, not via the WordPress Interface correct?

    Still not sure how to add a symlink, is it a folder I name with the path you mentioned above? Or a text file???

  • mark

    Stan,

    Yes. I plan to add an administration page but it will not be for some time.
    ** Updated **
    UnGallery now uses an admin page. Please see later posts.
    ** Update **

    The symlink is pointer to anything, but in this case we use it to point to directory (the one with your pictures in it) This allows you to organize your photos into those directories and subdirectories, and the gallery will just pick it all up.

    Let’s say your photos are located at “/home/users/stan/photography/”. Go to your WordPress plugins/ungallery directly with a commond like:

    cd ./wordpress/wp-content/plugins/ungallery

    Then the command to create the link:

    ln -s /home/users/stan/photography/ pics

    This will make it look to the WordPress install (or you when browsing the backend) that the pics directory is right there in the plugin directory. It allows UnGallery to browse your photo directories and display them.

    Best,
    Mark

  • Stan Alachniewicz

    I’m using windows so I’m not using a command line, it looks like you are, am I right?

    I think I need to edit the PHP file directly to point ungallery at a different directory. I’m going to try to figure that out, but if you know exactly what line I need to edit that would be helpful.

  • Stan Alachniewicz

    So I basically edited these two lines in ungallery.php

    $dir = “wp-content/plugins/ungallery/”;
    $pic_root = $dir.”pics/”;

    to say

    $dir = “wp-content/photogalleries/”;
    $pic_root = $dir;

    which I think is still wrong because it isn’t working.

  • mark

    Stan, You are right that my development and testing is on Linux and it is differences in the Windows file system that is probably causing the problem. Rather I should say the UnGallery script and pathing process does not support it, I expect.

    I’m happy to check into the options to extend it to work there but it will likely be a big (not near-term update) If I confirm UnGallery is not compatible on a Windows WordPress installation, I’ll update the documentation.

    Best,
    Mark

  • Stan Alachniewicz

    hmmmm, no dice, I even tried absolute pathing the dir variable like so

    $dir = “http://www.theforceproductions.com/wordpress/wp-content/plugins/ungallery/”;

    but nothing is showing.

    Just to be clear, I literally just make a page called, “Gallery” (case-sensitive?) and if the paths are correct it should show my images on that page right?

  • mark

    I do not think you will be able to absolute path the $dir variable because WP is going to start it with a relative path and that will need to be kept intact for the script to run.

    But the larger issue is I use a Linux pathing scheme to connect to the directories and build the url links. I’m looking now at how to account for the Windows scheme. Until I do, things like slashes in the script will break when I read your directory like this: ./these/slashes/dont/work. It needs to be recoded to produce a request like .\these\slashes\will\work and a few other changes.

    I’m looking at it now and would be happy to update you when I have a Windows candidate. It could take less time than estimated earlier.

    Regarding the Page name, you can call it “Gallery” and the permalink for it will convert it to lower case for the URL like: http://yoursite.com/gallery. It will still be upper case “Gallery” in the browser view.

  • sam

    Hi Mark,
    I have looked through ungallery.php readme.txt and your web page here, and i dont see any example of how to call your plugin from a wp page or post or widget. Is there a simple way to impliment the show. How do i call it from a post etc?
    Thanks

  • mark

    Hi Sam,

    Great question. It is the step where you create the WP Page called “Gallery” that calls the plugin. Your gallery root address will be that WP page, so your URL will look something like this: http://yourblog.com/gallery. UnGallery looks for that in the URL and displays the pictures when that page is called. It will continue to load your gallery and all subgalleries as your visitors navigate the photos.

    The real strength of UnGallery is after installing, you don’t need to call it or manage the gallery or your photos from WordPress. It makes the most sense for a high volume of pictures. For example, I’m traveling to Chicago and just FTP’d 100 photos to this site. That was it; no editing a post, etc. They are automatically organized and displayed in my blog.

    For inserting an individual picture into a page or post, I still often use the WP default method or other gallery plugins. To answer your question directly though, you can can call UnGallery from anywhere with the following format:


    img src="http://yourblog.com/wp-content/plugins/ungallery/thumb.php?src=pics/path/to/the/pic/ImageName.JPG&w=300" alt=""

    The w=300 designates the size of the displayed pic. I use this method accompanied by a link so clicking on the embedded thumbnail, takes you over to the gallery and any related photos.

    I hope this answers your question. Feel free to let me know if I can assist.

    Best,
    Mark

  • I’m pretty sure I’ve done everything listed in readme as well as the tips here but still have a ton of errors..http://famousbydefault.net/gallery not sure if the fact that this is a masked/forwarded domain has anything to do with this or if it is just not applicable with the wordpress theme I have? Thx.

  • mark

    Hi alexx,

    Thanks for checking out the plugin. I don’t suspect your domain or theme, but I’m happy to troubleshoot that if it turns out to be the issue.

    It looks there may be a path format conflict. In your link, UnGallery is calling for its files using backslashes, which should happen using the Windows version. The path to ungallery.php though, looks to be forward slashes, which would suggest it’s a Linux server.

    Is is possible the files from the ungallery/windows/ directory were copied to the main ungallery/ directory? If you’re on a *nix server, you skip the final install step of overwriting the main directory files, with the windows files.

    I hope that helps. If not, just let me know!
    Best,
    Mark

  • Okay so, I reinstalled it without writing over the files and it kind of works, there’s a couple of problems though.

    The automatic marquee on the main page doesn’t show up, nor does the one photo put in the plain pics album for a banner
    The thumbnails aren’t showing up – is there any additional step we have to process these?
    It has errors past the 3rd subcategory. Only the photos on the second subcategory, like this one, will reveal the photo, if clicked on an empty thumbnail?

    http://famousbydefault.net/gallery?src=pics/Rachel%20Hurd-Wood/rhw004.jpg

    Thanks for your help

  • mark

    alexx,

    It looks like your server does not have the php exif library installed. I’ve added a no-rotation-exif version option.

    There is a new file called ungallery_without_exif.php in the distribution. You can download that file by itself here: http://svn.wp-plugins.org/ungallery/trunk/ungallery_without_exif.php

    If you remove the current ungallery.php and rename ungallery_without_exif.php to ungallery.php, the thumbnails will render properly.

    The errors displayed on the other directory are due to the apostrophe in that directory name. I try to handle some special characters like spaces, but not all work. If you remove the “‘” in the directory name it will load correctly.

    Hope this helps,
    Mark

  • mark

    I posted an update to automatically handle the exif library not being installed on the WordPress server. Now Windows and Linux servers each support image rotation if available, and leave images in their original orientation when not available.

    The file overwrite patch from the post above is no longer necessary.

  • Very nice idea to have such a simple way to publish pictures on a wordpress blog. As far as I understand the usage of your plugin is restricted to blogs with the specified permalink structure set. What about other permalink structures? In my case I cannot change that because of other plugins requirements. Thank you.

  • mark

    Hello Karimun and thanks for your feedback.

    I think your point is a good one. Even without a plugin conflict, users may have a external links pointing in to existing WP install links. Changing all your links to satisfy another plugin is not always practical and probably stops people from being able to add or try UnGallery.

    I looked briefly at changing UnGallery to allow users set their permalink url format. I think it is possible but not trivial. I’ll give it some time over the next week and follow up here.

    Do you use the default permalink option? They end with urls like: ?p=123

    Thanks,
    Mark

  • Yes, I referred it to the default permalink option but I have other blogs with different permalink structures. So flexibility would be a big advantage.

  • mark

    Karimun,

    Ok, so each permalink option except the default will work. All non-defaults leave your Page URLs alone and only write the day/month/category/etc data into the URL of Posts. Since UnGallery uses a Page as its home, it works for each custom permalink setting.

    The WP default permalink though and UnGallery, share the “?” format to designate Page locations in the URL. To support the WP randomized …/?p=123 format as the top URL would change the way UnGallery works. It could be done using sessions or cookies to navigate, but one of the plugin goals was to be able to link in directly to certain galleries and pictures. Another was allow simple, descriptive gallery titles and URLs, neither of which is easily done with the default WP formatting.

    So, I don’t have an immediate fit for that one configuration, but I do appreciate your input and feedback.

    Best,
    Mark

  • Great plugin. I just added it to my list of favorite plugins at http://www.wpexplorer.com/wordpress-plugins.html

  • Wil

    I feel like an idiot and am sure I am missing something simple that I hope you can point out to me. On a test site I installed WP 2.8 I did the setup and got the site working. I then copied the Ungallery folder to the wp-content/plugins. I also created another subd directory called pics and placed a few image folders in that directory (wp-content/plguins/ungallery/pics). This is a hosted site and I’m pretty sure they are using a linux OS so I did not copy the files from the windows directory. I activated the plugin. I also added a blank page by clicking on page – > add new in the WP-admin screen. I type the name gallery (only) and published it. I also created the custom permalink that was mentined in your setup. I then navigate to the page and just get a 404 error. I can browse to a picture on the server by going to http://wp.dwimor.com/wp-content/ungallery/pics/bgside.jpg. Any suggestions would be appreciated. Thanks, Wil

  • mark

    Hi Wil,

    It looks you are on a Windows server. Your 404 page mentions Internet Information Services (IIS). UnGallery works on Windows at the time I tested last, but it will require using the files in the /windows subdirectory.

    This should not have caused your 404 though. Even the plugin does not work, you should have still seen the blank page you created, so it sounds like there may still be a permalink or other problem. I got other 404′s clicking on some of the main links at your site.

    I think when you get your sample/test pages displaying ok, you can take the next steps to publishing the gallery pictures.

    Let me know if I can help!
    Mark

  • Wil

    Mark, Thanks so much much for taking a look at the site. It was fairly simple. The issue is that since it was running IIS the permalink structure wasn’t working. I found some items on a WP site that include some fixes to allow permalink to work. I got the page to mostly work it at least now navigates the pics folder structure. Again, thanks for the help.

  • Hi Mark, I’m excited to get your plugin going but I’m stuck… I’ve done all the steps including creating the pic folder and the “Gallery” page (by the way, is it case-sensitive? Because all my other pages are lower-case), but I don’t know where to go from there. The gallery page isn’t picking up anything. I’ve even put a few pics in the “pics” folder in my FTP client. Please help! Thanks, jess

  • mark

    Hello Jess,

    Thanks for checking out the UnGallery. Yes, it is case sensitive and the permalink should be all lower case. When you name the page “Gallery”, it will retain the capital “G” when displaying the page title for readability, but the permalink URL should read: “http://yourwebsite/gallery/”. WordPress should default to this.

    Other things to check are that UnGallery is activated on your plugins settings page and the permissions allow you to read the pics directory. If these don’t help, please let me know more about your environment like the server and WordPress versions, and your web site, if available.

    Best,
    Mark

  • Hi there,

    after installation, Firefox wants to install a plugin. But no plugin was found for ungallery.

    Whats wrong?

    Iam using WP 3.01

    sers, Frank

  • btw. IE8 also shows no images…….

    Frank

  • mark

    Hi Frank,

    Thanks for checking out UnGallery. The 2 errors (no plugin found and no images) you are seeing are due to the plugin not seeing any picture files in the target gallery directory. (There is no actual plugin needed for any browser)

    Some things to check are:
    Is the shortcut/symlink to the picture directory set up?
    Is there at least one picture in the directory?

    I’ll add logic to the UnGallery plugin that more accurately describes the error.

    If you’d like to post the URL of your gallery here or send me the link at mark@markpreynold.com, I’m happy to look at it further.

    Best,
    Mark

  • Hi Mark,

    i have put some pictures in “pics” and some in a sub directory. Now i got no more plugin error.

    But i cant see any pictures.

    you can test it on the above domain in the menu “Gallery”.

    Passwort is: justatest

    Dont know whats wrong.

    Sers, Frank

  • oh, i see, passwort protecting doesnt work with ungallery. A Bug?

    So i must remove it.

    I send you another link via email.

    Frank

  • mark

    Hi Frank,

    I dug around a bit and it looks like your site is set up fine. The plugin displays the pictures when a standalone link is used, but when the are embedded into the blog neither the thumbnail pictures or the links is displayed. In the html for the non-working gallery page, I see all the correct href= links and scr= picture references in the source.

    I tried installing your theme to my demo site and it works there. I’m using out-of-the-box WP 3.0 and the Wallow theme. Any other changes or customizations on your site? I could try and reproduce them here. Otherwise, I’m not sure what else to try.

    Best,
    Mark

  • The plugin isnt working on my blog :(
    I followed the instructions exactly… what could it be?

  • mark

    Frank,

    Thanks for all the troubleshooting info helping to run UnGallery on your site! I’ve added a lot of changes to the plugin based on your feedback to help in run more smoothly for others.

    Hi Tanya,

    It looks like your site uses a custom WordPress addressing option. (the /blog/ is added to the URLs). UnGallery did not handle that but I’ve updated the plugin and it should support your site address format now. Feel free to download an update and let me know if you run into any trouble.

    Best,
    Mark

  • Sers Mark,

    thx.

    And it would be a great, if i can change the name in the Page. Gallery i cant use in a german site. In german its called Galerie.

    I think, everyone wants to use a own title for the page.

    Greetz
    Frank :-)

  • Billy

    Hey Mark..

    Great plugin!

    I have bounced thru the initial setup and the pics show up fine!! :)
    (hit the missing plugin stuff for empty directories, so put a marquee pic in top level)

    .. but..

    then I made a new subfolder called Video, uploaded a small mp4 file, and here I get the missing plugin error again.
    (put a pic in the video folder, and it shows up, but no video)
    tried a few different video clips, formats, extensions, etc.. but no luck.
    (looked at a bunch of other stuff too.. but won’t bore you with the details.. yet…)

    any suggestions?

    thanks!

    Billy

  • @Billy
    Folder writable by the server?

  • mark

    That’s a good point Frank. I’ll see if I can abstract “gallery” to a configurable string. Currently everything in the plugin keys off it being in the URI, so it may not be a trivial/quick update. I’ve actually started the process and have a ‘Galerie’ going already. But there are lot of dependencies so it needs some debugging.

    Hi Billy, I think you’re seeing the MP4 / mp4 issue. I’m having trouble streaming the lower case due to some kind of header issue, so currently I have the plugin set to match only upper case. I think if you rename the file extension to upper, it will work. I’ll try and add case-insensitivity back asap. Thanks for checking out UnGallery!

  • Billy

    Hi Mark..

    wow.. you’re up early or really late (like me)

    I had actually tried the upper case MP4 (and adding mp4 in the code..)

    With the file extension set to MP4, I get the video clips listed, but they throw the Mime Plugin error again.

    when I added the mp4 to the code.. it listed the clips too, clicking the link downloaded the video clip.. but didn’t play. (got a broken icon)

    thanks for the reply.

  • Billy

    oh.. one thing… I’m trying this on my Mac with Safari 4.0.3, and it gives the error.. but with Firefox.. it just sits there.. no error.

  • mark

    Yeah I had both in the code before but removed it until I corrected it. If you’d like to send me a link to an example site, I’m happy to take a look.

    (I’m somewhere in the middle of up late/early. Just up. =)

  • Billy

    sent you off a quick email with the page source and screenshot..

    thanks for looking into this..

    time for me to crash.. 5 am!

  • Hi Mark, i got absolutly the same error with mp4…. you can see it on my site

    cu
    Frank

  • mark

    No problem guys. I’ve been able to reproduce. It is some level of OS/browser/QuickTime version issue.

    Franky, your site worked fine using OSX/Firefox. For XP/Internet Explorer, I got your error and had to install QuickTime, then your video worked there too.

    OSX/Safari and XP/Firefox do not work via UnGallery but do work when I link the browsers directly to the file, so it seems like a header/MIME type thing.

    I’ll look at this and correcting the annoying ‘install plugin’ message.

    Best,
    Mark
    ______________________

  • Hi Mark,

    you are the best! :-) )

Leave a Reply

 

 

 

*

Subscribe without commenting