Post History For CoppermineSC:

  • View version 0.4.6 announcement
  • View version 0.4.5 announcement
  • View version 0.4.3 announcement
  • View version 0.4.2 announcement
  • View version 0.4.0 announcement
  • View version 0.3.5 announcement
  • View original CoppermineSC announcement (version 0.3)

Version History:

Version 0.4.6 – June 22, 2008

  • Fixed compatibility problem with WordPress 2.5 and newer. Special thanks to Brian Jarrett for finding both the problem and the solution. The fix was a small change to the MySQL connection code. You can read about the problem and fix in Brian Jarrett’s post on the issue.

Version 0.4.5 – April 18, 2006

  • Added new tags to pull the most recently uploaded images from albums, categories, or from your entire gallery (you can set the maximum number of images to include).
  • Added new tags to pull in full-size (original size) images from albums, categories, or from your entire gallery (previous versions were limited to thumbnails only when pulling from albums, categories, or from the entire gallery).
  • Added new setting to indicate whether clicking on an image should open the link in a new window (or tab depending on your browser) or just navigate to the link using the current window.
  • Added new setting to indicate whether you want images to be left aligned, right aligned, centered, or if you want them to follow the CSS classes that CoppermineSC makes available. Previous versions always followed the CSS classes, so that is the default. In order for the left, right, or center options to work (they will not work properly by default), you will need to set the next new setting appropriately, as described below.
  • Added new setting to indicate whether container elements should be div tags or span tags. Span tags are used by default because they will generate XHTML 1.0 Transitional output in a default WordPress setup (but the left, right, and center options described above will not work). In order to use the left, right, or center options in the previous settings, you will have to change this to use div tags. Everything will still render properly if you use div tags, but the output will no longer be compliant with the XHTML 1.0 Transitional specifications (because WordPress will end up putting the div tags inside a p tag because all posts are wrapped in p tags, and you can’t put a div inside a p according to the specifiations). I’m not a CSS genius, so if anyone has a clever way to get an image to align left, right, or center by styling only the img itself, please let me know!

Version 0.4.3 – September 12, 2005

  • Added a wpdb connection reset at the end of main plugin function to help with database related errors experienced by some users.
  • Added new setting to optionally allow CoppermineSC tags to work in comments left on your blog. This feature is disabled by default.

Version 0.4.2 – August 13, 2005

  • Changed plugin to always exclude images from private albums when using tags that pull from categories or from the entire gallery.
  • Changed wording for the setting that indicates whether individual image links should link to the normal size image or to the album they belong to (in order to clarify functionality).
  • Added an experimental wpdb connection reset at the end of main plugin function to possibly help with database related errors for users running older versions of WordPress. The connection reset is intentionally commented out by default because it is not compatible with current versions of WordPress. Please contact me for details regarding how to enable the experimental reset if you are getting database related errors running an older version of WordPress.

Version 0.4 – July 30, 2005

  • Added new tags to pull random images from your entire gallery (these work the same way as the album and category tags, you can set the maximum number of images to include).
  • Added new setting to indicate whether individual image links should link to the normal size image or to the album they belong to (thumbnails from album, category, and gallery based tags still link to the full size image, this new setting is just for the single image based tags).
  • Changed processed output of CoppermineSC to generate HTML that validates as transitional. A default installation of WordPress will validate as transitional and I wanted to match that. Previous versions used div tags to wrap sets of thumbnails and it turns out that div tags won’t validate properly when used within posts using typical WordPress themes. I changed the thumbnail wrapping elements to be span tags instead.
  • Made additional changes to make CoppermineSC more compatible for users running many WordPress plugins. These changes primarily involved creating a mirror of the WordPress MySQL database access class so that CoppermineSC no longer calls the built-in WordPress wpdb class at all. Looking around at other WordPress plugins, I have seen several problem reports where it appeared that calls into the wpdb class to connect to a database other than the WordPress database were causing problems (and I had one report of a similar problem with CoppermineSC, though I have not been able to confirm it in detail). Since the wpdb class has several variables declared as global, I determined it would be safer to create my own class to perform database access for CoppermineSC so there was no chance of interfering with normal access to the WordPress database.

Version 0.3.5 – July 21, 2005

  • Added new tags to pull images from categories (these work the same way as the album tags, you can optionally set the maximum number of images and choose if you want random images or not).
  • Added a new function that can be called from anywhere in your template so that you can include images in a sidebar.
  • Added new setting to customize the order of images (choices are database id, filename, title, or date) when including non-random images from albums.
  • Added new setting to customize the order of albums (choices are database id, assigned album order, or title) when including non-random images from categories.
  • Added more error handling code to keep the script from trying to process malformed tags.
  • Added more CSS classes for better formatting flexibility.
  • Changed function, constant, and variable names, as well as indentation, to match WordPress plugin guidelines.
  • Added pages in my blog to more permanently hold information about CoppermineSC.

Version 0.3 – July 17, 2005 (first version rewritten by me)

  • The original version supported only one Coppermine database. I have several galleries and really wanted to be able to link to any of them from WordPress. I realize that most people probably don’t have multiple galleries, so I added the multiple database feature as something that’s completely optional (and it won’t get in your way if you have only one gallery). If you have just one gallery, you can enter the connection information in the constants section at the top of the script and everything will work just fine. If you want to use multiple databases, you will have to set up a small configuration file for each database that you want to connect to and place the file in the “wp-content” folder in your WordPress setup. I created a separate set of new tags to use if you want to reference a configuration file. The new tags all start with “[cpg_db” instead of “[cpg_”.
  • The original version used integers to indicate you wanted the “4th” image in the “2nd” album. It used a SQL “OFFSET” statement to accomplish that, which broke down under several scenarios. First, there was no way to pull back the very first image in an album. If you tried to include the first (i.e. “0th”) image, the SQL statement choked trying to run the select statement with an offset of -1. Second, if you ran Coppermine with a default sort order other than filename, the positional index of the image in the database did not necessarily match what you saw when you viewed the album thumbnails in the gallery itself. That made it almost impossible to know what image index you were supposed to use in order to include the image you wanted. To address this issue, I switched the image indicator to be the filename, which works for all images (even the first) regardless of the sort order set in Coppermine.
  • The original version had constants defined where all images were always pulled in either as thumbnails, normalized, or original size. In my WordPress entries I found that I sometimes wanted thumbnails and sometimes wanted full size images. To address this issue, I created three different tags to let the plugin know explicitly what size image you want.
  • The original version always pulled back original size images as truly full size. I found that some of my original size images ended up being significantly wider than the column width I use in WordPress, so they really messed up my layout. To address this issue, I added an optional maximum full size image width setting which can be used to make sure that even the largest images still fit within your WordPress layout.
  • The original version used a Java popup window to display the original size image when you clicked on an image in a group of album thumbnails. I wasn’t crazy about the popup window so I changed the script to navigate to the actual image in Coppermine instead.
  • The original version used some tags that were not compatible with the Markdown plugin, so I altered the problematic tag names.
  • The main structure for the original plugin used multiple loops: one looking for album tags, one looking for image tags, etc. I changed the overall structure to use just one main loop that looks for all tags. This should be more efficient, especially if most of your WordPress posts don’t actually link images with the plugin.
  • The original version didn’t have much handling in place for malformed calls to the plugin. I will grant you that the syntax for the plugin calls isn’t all that tricky, but I went ahead and changed the code to be a little more robust in processing the calls. This new version should ignore most malformed calls instead of trying to actually process them. I need to give credit to Richard Rosalion for first noticing that the original routine in Matthias Jell’s plugin might read right past the ending “]” character when looking for a comma. Once he pointed that out, I added few other tweaks to catch similar problems.
  • The original version assumed that the URL location of your Coppermine Gallery, as set in the configuration screen for Coppermine, did not have a trailing “/”. According to the official Coppermine documentation, that setting is supposed to have a trailing “/”. To address this issue, I changed the code to check to see if the trailing “/” is already there and add it if necessary.
  • The original version assumed that your prefix for normalized images was “normal_” and your prefix for thumbnails was “thumb_”. To address this issue, I defined those values as customizable constants in case you use alternate prefixes in Coppermine.
  • I didn’t see any reason for the $cmdb variable to be global, so I made it not global. I fully admit that I am brand new to PHP, so if there is some reason this variable needs to be global that I just don’t understand, please let me know.

Matthias Jell released version 0.2 of his original plugin – June 30, 2005

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s