Rue Plumet

All alone, I walk with him till morning.


July 30, 2005

CoppermineSC 0.4 Released

Filed under: Plugins — Brad @ 1:42 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.4! 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.4:

  • 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 full 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 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.
  • Made additional changes to make CoppermineSC more compatible for users running many WordPress plugins.
  • A detailed list of all changes is available.

New Tags:

  • The following tags pull in images from the main database
    • This tag pulls in thumbnails of images from your entire gallery in the main database
      [cpg_galrand:1] - inserts 1 random thumbnail from all the images in the gallery
       
  • The following tags pull in images from an additional database
    • This tag pulls in thumbnails of images from your entire gallery from database named ‘mydbname’
      [cpg_galrand:mydbname,1] - inserts 1 random thumbnail from all the images in the gallery from database named ‘mydbname’

New Settings:

  • // set whether individual image links should link to the full size image or to the album they belong to (does not effect album, category, or gallery based thumbnails), comment out exactly one of the following two lines
    define ('CPGSC_SINGLEIMAGE_LINK', 'album');
    //define ('CPGSC_SINGLEIMAGE_LINK', 'fullsize');

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

11 Comments »

  1. Problem with random; it displays pictures from private albums, even though normally a user would have to login for such pictures.

    And, upon install, my dashboard is being flooded with

    Warning: Cannot modify header information - headers already sent by (output started at /home/shroomv/public_html/live/wp-content/plugins/copperminesc.php:955) in /home/shroomv/public_html/live/wp-admin/admin.php on line 10

    Warning: Cannot modify header information - headers already sent by (output started at /home/shroomv/public_html/live/wp-content/plugins/copperminesc.php:955) in /home/shroomv/public_html/live/wp-admin/post.php on line 397

    The plugin still works, as with my page, but the more I use it the more errors I get. Any ideas?

    Comment by Rob — August 2, 2005 @ 2:34 am

  2. I’m sorry to hear about your trouble. I’ve not had any dashboard problems reported before. Can you possibly send me a screenshot of your dashboard so I can see the errors and where they fall in the page? Are you using any other plugins that modify the dashboard? Is the problem only in the dashboard tab or is it throughout the admin area on other tabs as well?

    Also, regarding the private album problem. Are you seeing this problem when pulling random images from categories and/or from the entire gallery? If I can get confirmation of the tags you are using that end up pulling in random images from private galleries, I will attempt to fix the script to always exclude images from private albums. I had not considered that issue before (since I don’t use any private albums in my gallery), but it makes a lot of sense.

    Thanks again for your input and ideas.

    Comment by Brad — August 2, 2005 @ 8:53 am

  3. Rob’s problem has been solved. Apparently WordPress is very picky about extra whitespace at the beginning and end of a plugin file. The <?php tag needs to be the very first thing in the file and the ?> tag needs to be the very last thing. Rob’s plugin file had been inadvertently edited to add a few extra lines of whitespace at the end (after the ?> tag). With the extra whitespace removed, everything works properly again.

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

  4. I installed the new CoppermineSC plug-in and received the following error (one of many) after activating it. This message appears on the main WordPress page just after my first blog post with some Coppermine images:

    “WordPress database error: [Table 'cpg.wp_options' doesn't exist] SELECT option_value FROM wp_options WHERE option_name = ‘blogfilename’”

    Well, of couse the table cpg.wp-* doesn’t exist. Those tables live in the wordpress database on my system. Similiar errors are also present in other blog posts and every item in the sidebar. I have deactivated all other plug-ins to no avail. Any ideas? Thanks!

    Comment by Brandon — August 6, 2005 @ 9:06 pm

  5. Brandon,
    Sorry to hear about your trouble. I sent you an email asking for a little more information so I can try to resolve your issue. It would be helpful if you could tell which version of WordPress you are using and if you could email me a copy of the index.php file from your theme. Also, it would be helpful if you could navigate to a page in your blog that exhibits the problem and then choose to view the page source from your web browser and then email me a copy of the page source.

    Comment by Brad — August 7, 2005 @ 9:47 pm

  6. Brandon,
    I’ve released a new version of the plugin. I 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. Please contact me for details regarding how to enable the experimental reset if you are still getting database related errors.

    Comment by Brad — August 13, 2005 @ 11:19 am

  7. Hi Brad,

    I’ve been having some difficulties with your ‘copperminesc’ gallery plugin. Its looks to be a great plugin, but when I have installed it I get the following error on my gallery page:

    CoppermineSC database error: [Table 'coppermine_db.cpg_config' doesn't exist]
    SELECT value FROM cpg_config WHERE name=”ecards_more_pic_target” OR name=”fullpath”

    CoppermineSC database error: [Table 'coppermine_db.cpg_pictures' doesn't exist]
    SELECT filepath, filename, title, pid FROM cpg_pictures WHERE aid=1 ORDER BY filename

    I am running the latest version of coppermine, wordpress, and copperminesc.

    Could you give me a hand fathoming this problem out.

    THanks very much.

    james

    Comment by James Wilmington — January 17, 2007 @ 12:01 pm

  8. Sorry, should have mentioned:

    http://www.princesshouse.co.uk and click on the gallery button at the top.

    thanks

    Comment by James Wilmington — January 17, 2007 @ 12:02 pm

  9. James,
    There are several newer versions than the one listed on this page. I think 0.4.5 is the latest (this page is 0.4.0). The link to 0.4.5 is at the top of the page. If you are already running the latest, then it sounds like the database name (and/or user name or password) for the coppermine database are wrong in your config file for CoppermineSC (that’s the “coppermine_db” part). I would double-check that, assuming you have the latest version.
    Brad

    Comment by Brad — January 17, 2007 @ 8:19 pm

  10. re James problem, it has to do with line 161 in the copperminesc.php file:

    define (’CPGSC_TABLE_PREFIX’, ‘cpg_’);

    you’ll need to change ‘cpg_’ to be the same as the prefix your coppermine installation uses. For example, version 1.4 uses ‘1.4x’, therefore it should look like this:

    define (’CPGSC_TABLE_PREFIX’, ‘cpg14x_’);

    I highlighted the change. I use coppermine version 1.4, so that worked with me. Am unsure what previous coppermine versions use, but you can find out by checking out your phpmyadmin and checking what prefix your tables use.

    Comment by ghmercado — October 13, 2007 @ 12:22 am

  11. Hi Brad a quick question:

    thank you for your excellent plugin. Im already displaying the thumbnails properly on my wordpress’ sidebar.

    I’m looking for a bit of a hack. As you know, when a thumbnail is clicked it will lead to it’s page on my coppermine.

    Are you aware of a way that I can change where the link goes? I would like it instead to go to another site.

    This is my situation: I run a fashion site. I want the little thumbnails to show random pics of products I sell, which when clicked would instead go to my shopping cart (showing more details), instead of coppermine. Is this possible?

    Many thanks!

    Comment by ghmercado — October 13, 2007 @ 12:30 am

RSS feed for comments on this post. | TrackBack URI

Leave a comment