Categories
General

Fixing the sidebar

When the option to list the posts containing an image is turned on the default WordPress sidebar template thinks an image page in the Photopress album is a search page (it is – that’s how we know if an image is used in a post). While correct, this makes the sidebar ugly. But it’s such a neat feature, it’d be a shame to disable it. Here’s how to fix the default template’s sidebar.php:

1. Look for is_search() and add && empty($_GET['pp_image']) to that elseif statement. (this suppresses the search stuff when it’s displaying an image)

2. look for is_home() and add || !empty($_GET['pp_image']) to that if statement. (this shows the normal homepage sidebar when it’s an image)

Here’s a zipped replacement sidebar.php if you don’t want to do this yourself.

Categories
General

Photopress 0.7.2

This version fixes more of the bugs introduced with 0.7 and the database table. Thanks to Roge especially for spotting bugs and suggesting fixes. I also added a mass image info updater to Manage:Photopress Album for quicker data entry. If you’ve been waiting for a relatively stable 0.7, this is probably it.

Download Photopress 0.7.2: photopress.zip OR photopress.tar.gz

Right now deleting an image doesn’t delete the original – should it? Also, I’m wondering if I need to write some sort of cleanup function to fix any bad entries in the database that the buggy earlier versions may have introduced. With hundreds of images the mass updater gets slow – I think I’ll either do pages of 50 or so or split it by category.

Categories
General

Photopress 0.7.1

This version fixes a bunch of bugs introduced with the database table. No more errors with zero or one image uploaded. There’s now an option to retain the original images (disabled by default – see Options:Photopress to enable it). Finally, Photopress should now produce valid XHTML. Note that this required putting the album CSS in a separate file, so if you’ve customized album.php you’ll want to move your CSS from there to pp_album_css.php.

Download Photopress 0.7.1: photopress.zip OR photopress.tar.gz

Here’s what I’m planning on doing next:

  • Multiple-file uploader – I’ve got the Javascript to make the form but need to write the PHP to process the files.
  • Optional paths in Options – if Photopress guesses your path info badly there should be an easier way to set it manually.
  • Thinking about how Photopress might fit into WP 1.6.
Categories
General

Photopress 0.7

There’s a lot still wrong with this version, but I think it’s working well enough for testing now. The major change in this version is that Photopress now installs a table in the database. Information entered in the uploader form actually gets saved now.

For a new install, just extract the archive in your WP root folder, make the wp-content/photos folder writable, and activate the plugin. Upload at least two images to make the errors go away (I promise I’ll fix this soon!).

For an upgrade, just make sure you de-activate then re-activate the plugin. That should install the table and import your data.

Download the new version: photopress.zip OR photopress.tar.gz

Try an older version if this one doesn’t work for you: photopress-0.5.1.zip OR photopress-0.5.1.tar.gz

You can find older Photopress code and view code changes between versions at wp-plugins.org.

Thanks a ton to Claus for the db code and ideas.

Categories
General

Photopress is moving

See isaacwedin.com for a new version of Photopress. I figured it could use a home of its own. Might be nice to have something like a forum there too.