UPDATE: Version 0.4.6 has been released. Please see this entry or my CoppermineSC page for the latest information.

I’ve just released CoppermineSC version 0.4.5! You can download the new version or visit my CoppermineSC page for complete details about the plugin. You can also view a sample of what CoppermineSC can do. Feel free to post comments and feature requests to this entry.

This version of CoppermineSC should work with WordPress 2.0.1 and with Coppermine 1.4.3 (as well as with some older versions of both programs). More information regarding compatibility can be found in this post.

New Features in Version 0.4.5:

  • 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!
  • A detailed list of all changes is available.

New Tags:

  • The following tags pull in images from the main database
    • These tags pull in thumbnails of images from a specific album in the main database
      [cpg_albumnew:4] – inserts thumbnails for all images in album id 4 in order from newest to oldest
      [cpg_albumnew:4,10] – inserts thumbnails for the 10 latest uploads from the images in album id 4
    • These tags pull in full size / original images from a specific album in the main database
      [cpg_albumfullsize:4] – inserts full size / original images for all images in album id 4
      [cpg_albumfullsize:4,10] – inserts full size / original images for the first 10 images in album 4
      [cpg_albumnewfullsize:4] – inserts full size / original images for all images in album id 4 in order from newest to oldest
      [cpg_albumnewfullsize:4,10] – inserts full size / original images for the 10 latest uploads from the images in album id 4
      [cpg_albumrandfullsize:4] – inserts full size / original images for all images in album id 4 in random order
      [cpg_albumrandfullsize:4,10] – inserts 10 random full size / original images from the images in album id 4
       
    • These tags pull in thumbnails of images from a specific category in the main database
      [cpg_catnew:5] – inserts thumbnails for all images in category id 5 in order from newest to oldest
      [cpg_catnew:5,12] – inserts thumbnails for the 12 latest uploads from the images in category id 5
    • These tags pull in full size / original images from a specific category in the main database
      [cpg_catfullsize:5] – inserts full size / original images for all images in category id 5
      [cpg_catfullsize:5,12] – inserts full size / original images for the first 12 images in category id 5
      [cpg_catnewfullsize:5] – inserts full size / original images for all images in category id 5 in order from newest to oldest
      [cpg_catnewfullsize:5,12] – inserts full size / original images for the 12 latest uploads from the images in category id 5
      [cpg_catrandfullsize:5] – inserts full size / original images for all images in category id 5 in random order
      [cpg_catrandfullsize:5,12] – inserts 12 random full size / original images from the images in category id 5
       
    • This tag pulls in thumbnails of images from your entire gallery in the main database
      [cpg_galnew:3] – insert thumbnails for the 3 latest uploads from all the images in the gallery
    • These tags pull in full size / original images from your entire gallery in the main database
      [cpg_galnewfullsize:3] – insert full size / original images for the 3 latest uploads from all the images in the gallery
      [cpg_galrandfullsize:3] – inserts 3 random full size / original images from all the images in the gallery
       
  • The following tags pull in images from an additional database
    • These tags pull in thumbnails of images from a specific album in an alternate database
      [cpg_dbalbumnew:mydbname,4] – inserts thumbnails for all images in album id 4 in order from newest to oldest from database named ‘mydbname’
      [cpg_dbalbumnew:mydbname,4,10] – inserts thumbnails for the 10 latest uploads from the images in album id 4 from database named ‘mydbname’
    • These tags pull in full size / original images from a specific album in an alternate database
      [cpg_dbalbumfullsize:mydbname,4] – inserts full size / original images for all images in album id 4 from database named ‘mydbname’
      [cpg_dbalbumfullsize:mydbname,4,10] – inserts full size / original images for the first 10 images in album 4 from database named ‘mydbname’
      [cpg_dbalbumnewfullsize:mydbname,4] – inserts full size / original images for all images in album id 4 in order from newest to oldest from database named ‘mydbname’
      [cpg_dbalbumnewfullsize:mydbname,4,10] – inserts full size / original images for the 10 latest uploads from the images in album id 4 from database named ‘mydbname’
      [cpg_dbalbumrandfullsize:mydbname,4] – inserts full size / original images for all images in album id 4 in random order from database named ‘mydbname’
      [cpg_dbalbumrandfullsize:mydbname,4,10] – inserts 10 random full size / original images from the images in album id 4 from database named ‘mydbname’
       
    • These tags pull in thumbnails of images from a specific category in an alternate database
      [cpg_dbcatnew:mydbname,5] – inserts thumbnails for all images in category id 5 in order from newest to oldest from database named ‘mydbname’
      [cpg_dbcatnew:mydbname,5,12] – inserts thumbnails for the 12 latest uploads from the images in category id 5 from database named ‘mydbname’
    • These tags pull in full size / original images from a specific category in an alternate database
      [cpg_dbcatfullsize:mydbname,5] – inserts full size / original images for all images in category id 5 from database named ‘mydbname’
      [cpg_dbcatfullsize:mydbname,5,12] – inserts full size / original images for the first 12 images in category 5 from database named ‘mydbname’
      [cpg_dbcatnewfullsize:mydbname,5] – inserts full size / original images for all images in category id 5 in order from newest to oldest from database named ‘mydbname’
      [cpg_dbcatnewfullsize:mydbname,5,12] – inserts full size / original images for the 12 latest uploads from the images in category id 5 from database named ‘mydbname’
      [cpg_dbcatrandfullsize:mydbname,5] – inserts full size / original images for all images in category id 5 in random order from database named ‘mydbname’
      [cpg_dbcatrandfullsize:mydbname,5,12] – inserts 12 random full size / original images from the images in category id 5 from database named ‘mydbname’
       
    • This tag pulls in thumbnails of images from your entire gallery from database named ‘mydbname’
      [cpg_dbgalnew:mydbname,3] – insert thumbnails for the 3 latest uploads from all the images in the gallery from database named ‘mydbname’
    • These tags pull in full size / original images from your entire gallery from database named ‘mydbname’
      [cpg_dbgalnewfullsize:mydbname,3] – insert full size / original images for the 3 latest uploads from all the images in the gallery from database named ‘mydbname’
      [cpg_dbgalrandfullsize:mydbname,3] – inserts 3 random full size / original images from all the images in the gallery from database named ‘mydbname’

New Settings:

  • // optional forced horizontal alignment for images (blank means follow css tags as listed in Layout section above), comment out all but one of the following four lines
    define ('CPGSC_ALIGNMENT', '');
    //define ('CPGSC_ALIGNMENT', 'left');
    //define ('CPGSC_ALIGNMENT', 'center');
    //define ('CPGSC_ALIGNMENT', 'right');

     
  • // set whether or not clicking on an image should open a new window, comment out exactly one of the following two lines
    define ('CPGSC_NEWWINDOW', 'no');
    //define ('CPGSC_NEWWINDOW', 'yes');

     
  • // set whether the image containing element is a span or a div tag, comment out exactly one of the following two lines
    //define ('CPGSC_CONTAINER_ELEMENT', 'div');
    define ('CPGSC_CONTAINER_ELEMENT', 'span');

     
  • // set whether or not you want to use a containing element for tags that include individual images, comment out exactly one of the following two lines
    //define ('CPGSC_CONTAINER_INDIVIDUAL', 'no');
    define ('CPGSC_CONTAINER_INDIVIDUAL', 'yes');

This release contains a significant number of changes to the code (mostly to support all of the new tags). Please let me know if you have any trouble with the plugin. I’ve tested each tag and all of the new settings and everything seems to be working properly. However, with the volume of changes involved in this version, I’m ready for feedback if I accidentally broke something. If you run into something I will work with you to resolve it as quickly as possible.

Advertisements