Rue Plumet

How have you come to grief in a place such as this?


July 21, 2005

CoppermineSC 0.3.5 Released

Filed under: Plugins — Brad @ 9:58 pm

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.3.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.

New Features in Version 0.3.5:

  • 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.
  • 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 category in the main database
      [cpg_cat:5] - inserts thumbnails for all images in category id 5
      [cpg_cat:5,12] - inserts thumbnails for the first 12 images in category 5
      [cpg_catand:5] - inserts thumbnails for all images in category id 5 in random order
      [cpg_catrand:5,12] - inserts 12 random thumbnails from the images in category id 5
       
  • The following tags pull in images from an additional database
    • These tags pull in thumbnails of images from a specific category in an alternate database
      [cpg_dbcat:mydbname,5] - inserts thumbnails for all images in category id 5 from database named ‘mydbname’
      [cpg_dbcat:mydbname,5,12] - inserts thumbnails for the first 12 images in category 5 from database named ‘mydbname’
      [cpg_dbcatrand:mydbname,5] - inserts thumbnails for all images in category id 5 in random order from database named ‘mydbname’
      [cpg_dbcatrand:mydbname,5,12] - inserts 12 random thumbnails from the images in category id 5 from database named ‘mydbname’

Instructions for use in Sidebar or Template:

  • Use a snippet like the following in your sidebar or template:
    <?php if (function_exists('cpgsc_sidebar')) {
        cpgsc_sidebar('any_standard_tag'); }
    ?>

     
  • For example, to insert thumbnails for all images in album id 4:
    <?php if (function_exists('cpgsc_sidebar')) {
        cpgsc_sidebar('[cpg_album:4]'); }
    ?>

New Settings:

  • // set sort order for images when including non-random images from an album, comment out all but one of the following four lines
    //define ('CPGSC_IMAGE_SORT', 'database');
    //define ('CPGSC_IMAGE_SORT', 'date');
    define ('CPGSC_IMAGE_SORT', 'filename');
    //define ('CPGSC_IMAGE_SORT', 'title');

     
  • // set sort order for albums (within the selected category) when including non-random images from a category, comment out all but one of the following three lines
    //define ('CPGSC_ALBUM_SORT', 'database');
    define ('CPGSC_ALBUM_SORT', 'albumorder');
    //define ('CPGSC_ALBUM_SORT', 'title');

     
  • // optional text for category link (blank text means no link will be created), comment out exactly one of the following two lines
    //define ('CPGSC_CATEGORY_TEXT', '');
    define ('CPGSC_CATEGORY_TEXT', 'view more images from this category');

14 Comments »

  1. Dude, you rock. Exactly what I was looking for. A++++ Will do buisness with again!

    Sorry, thought I was leaving eBay feedback for a sec…

    Comment by bitweever — July 22, 2005 @ 3:29 pm

  2. Just a word of caution to other readers… the tick marks in the sidebar code above need to be replaced with actual ‘ (single quotes).

    Comment by bitweever — July 22, 2005 @ 4:05 pm

  3. Bitweever,
    Thanks for pointing out the problem with the quotes. They were actually normal quotes in the HTML source for the entry and I’m not really sure why they were being automatically turned into angled quotes. I went ahead and replaced the normal quote characters with literals so that things will display properly.

    Comment by Brad — July 22, 2005 @ 5:40 pm

  4. Excellent stuff. The permanent ID link is great, thanks.

    By the way, it would be nice to get the link on the image to go to the image in Coppermine instead of the album.

    It’s unfortunate that WP themes tend to be thin as images get scaled down in posts which doesn’t look so nice but there’s not much that can be done about that short of having 400 pixel width images created when images are loaded into Coppermine. I already do 600 width images for Coppermine’s thinner Kubrick theme anyway.

    Comment by Tim — July 24, 2005 @ 9:42 am

  5. Actually I’ve worked out the link to the image, at least for imagefix tagged images. Just link to the permanent ID…

    $res = ‘<a href=”‘.$config[0].$separatorslash.’displayimage.php?pos=-’.$permanentimageid.’” rel=”nofollow”>title.’” title=”‘.$image->title.’” /></a>’;

    Comment by Tim — July 24, 2005 @ 9:55 am

  6. [...] http://www.55rueplumet.com/2005/07/21/copperminesc035/ [...]

    Pingback by sirjohn.co.uk » Blog Archive » CoppermineSC plugin for WordPress — July 24, 2005 @ 9:57 am

  7. Tim,
    That’s a great idea. In the next version I will add a customizable setting to determine if the single image links to the full-size copy of the image itself or to the album that the image comes from. That way you can make it work however is best for you. Thank you for your feedback.

    Comment by Brad — July 24, 2005 @ 4:26 pm

  8. i’m loving this. the only thing that i would love to see is the ability to show a random image from my whole gallery rather then just 1 single album on the sidebar extension. maybe something like album 0 uses all the albums or something like that.

    Comment by Chris — July 26, 2005 @ 6:36 pm

  9. Chris,
    I can add that in the next version. I’ll add a new tag for pulling from the entire gallery instead of a specific album or category. That shouldn’t be a problem at all.

    Comment by Brad — July 27, 2005 @ 10:35 am

  10. When I activate the plug-in, my side bar gets all jacked up. Shows tons of “Table ‘coppermine.wp_posts’ doesn’t exist” errors. Did I do something wrong???

    Comment by MoonDogg — July 29, 2005 @ 12:17 pm

  11. MoonDogg,
    Sorry you are having problems. Can you tell me what other plugins you are using? Are you trying to use the sidebar command for CoppermineSC? Maybe you can also email me your index.php template so I can take a look at it?

    Comment by Brad — July 30, 2005 @ 11:19 am

  12. MoonDogg,
    I’ve changed the database access strategy in the newest version of CoppermineSC. Please try downloading version 0.4 and see if that fixes your problem.

    Comment by Brad — August 3, 2005 @ 1:49 pm

  13. I’m an idiot as far as php and mysql go, and my coppermine database is a separate database, so I was trying to figure out how to use the two files - copperminesc.php and alternate-copperminesc.php.

    Do I upload both files to my plugin directory? Do I put my WP database info into the copperminesc file and my coppermine database info into the alternate one?

    I uploaded just the first file and that didn’t work, I got all kinds of database error messages.

    Can you please let me know how I’m supposed to do this? I’d like to use this plugin rather than using a flickr account.

    Thanks very much.

    Comment by jafer — September 10, 2005 @ 7:03 pm

  14. Jafer,
    I sent you an email with further instructions. Please just email me back if there is anything else I can help you with.

    Comment by Brad — September 11, 2005 @ 10:20 pm

RSS feed for comments on this post. | TrackBack URI

Leave a comment