Photopress

Photopress is a plugin that adds a set of helper tools to WordPress to make working with images easier. It adds a pop-up uploader and a pop-up image browser to the posting page, a groovy random image function for your template, and a simple album to display the photos you’ve uploaded.

Latest version: photopress-1.1.zip or photopress-1.1.tar.gz

Older version: photopress.zip or photopress.tar.gz.

Requirements:

Photopress is tested to work with the latest version of WordPress. You must have the GD module for PHP installed and working, but it should let you know if you don’t.

Installation:

To install, download and extract the archive in your WordPress plugins folder, or make a folder called “photopress” in your plugins folder and upload the files. Create a folder called “photos” in your wp-content folder and make it writable. Activate the plugin. A new table will be created in your database to store image information. If you used a previous version of Photopress your table will be modified if necessary, and your data should be imported. Configure the plugin at the Options:Photopress admin page. There is information there about what each option does. If you enable permalinks, make sure to update your permalink structure at Options:Permalinks.

To upload images, click the new button at the end of your toolbar. Photopress saves information you enter about your images during upload in a table in your database. The information is used in the album and for alt and title text. You can edit the information at Manage:Photopress. To create a new category just give an image one that doesn’t exist yet. You can also rename categories and category slugs at Manage:Photopress.

Random Images:

By default the plugin inserts a link to the album and a random image in the sidebar at the bottom of the Meta list, but you can change that in the options. To insert a random image in a different spot, add < ?php pp_random_image_bare(); ?> to your template (I like to put it at the top of sidebar.php in the default theme). By default it will have the CSS class “centered,” but you can change that at Options:Photopress. You can feed the function some options. Here’s a list:

pp_random_image_bare($number_of_images,$before,$after,$class,$category_slug);

Customizing the Album:

The album may not look very good with your theme at first - might not even work at all. To fix it, make sure the template file specified at Options:Photopress exists. The default is page.php, which is included with the default WordPress theme. You may wish to modify page.php to remove the “edit this page” code - you can name your template something like photos.php and let Photopress know about it on th Options page. To change the colors and layout, modify pp_album_css.php. You can keep the customized file in your theme’s folder - Photopress will find it there and you won’t have to worry about writing over it during an upgrade.

Localization:

The latest Photopress downloads include a POT file that can be used to translate Photopress into your language. Rename the file “photopress-(your locale).po” and translate the messages. (your locale) should match what you’ve set WPLANG to in wp-config.php. You can send the file to me to convert to a machine object file (and share), or convert it yourself if you know how. Put the machine object file in your plugins folder and it should work.

Hans has made a Dutch translation for Photopress 0.8.4: photopress-nl_NL.mo. Using this for a later version will work, but won’t translate any new messages I’ve added. Get photopress-nl_NL.po if you’d like to update the translations.

Pedro Cuenca has made a Spanish translation for Photopress 0.9.2: photopress-es_ES.mo. Get photopress-es_ES.po if you want to update the translations.

Andreas has made a German translation for Photopress 0.9: photopress-de_DE.mo. Get photopress-de_DE.po if you want to update the translations.

Development:

You can browse the Subversion repository here at familypress.net for Photopress versions 1.0+. This is a good place to go if you’ve made changes to Photopress and want to find out exactly how the code has changed. Older releases are also archived there, which might be helpful if you’re trying to make Photopress work with an older version of WordPress. You can subscribe to this RSS feed if you really want to keep up to date. Earlier versions can be found at dev.wp-plugins.org/browser/photopress/.

Credits:

Photopress uses code from all over the place. Florian Jung’s Image Browser plugin was the inspiration for the popup tool’s image browser. Alex King’s JS Quicktags (via the ContactForm plugin) added buttons to the toolbar for a while, but now Owen Winkler’s buttonsnap library is doing the job. The built-in Wordpress upload functions, along with the excellent php.net, gave shape to the uploader. The WordPress Codex has been invaluable. Many people have contributed bug reports, fixes and suggestions, including Randy, RobotDan, Alex, Jono, Paula, Frank, Roge, SHRIKEE, Hans, Marcus, and Claus. I appreciate your help!

Known issues and possible fixes:

  • Broken album: If you’re getting a “file not found” error when you try to view the album it’s probably because you need to update your permalinks at Options:Permalinks.
  • Broken blog layout: Using the alignleft and alignright classes for images in posts may break your blog layout. They’re apparently intended to be used for images in paragraphs of text. Use centered or a custom class when posting images without (much) text.
  • Missing options: see this post for details, but you really should just upgrade WordPress.
  • Broken button: a weird browser problem… try enabling the ‘failsafe button’ at Options:Photopress - it appears below the posting area but should work with old, clunky browsers.
  • Broken album layout: edit pp_album.php and pp_album_css.php, in the photopress folder, to match your theme (look at your theme’s index.php for inspiration). You can save the files in your theme’s folder to avoid overwriting when upgrading (PP looks there first, then reverts to the default).
  • Bad paths and/or addresses: the plugin tries to guess the right paths and addresses, but it sometimes fails - you can set the paths and addresses manually at Options:Photopress.