Coppermine badge plugin for Wordpress

Posted by ljmacphee on November 14, 2007 under coppermine, wordpress | 21 Comments to Read

Coppermine WP Plugin

This plugin creates a Flickr like badge from your Coppermine Gallery. ( See my personal blog bottom right sidebar for a demonstration. )

1 ) First edit the wp_coppermine.php file. You need to enter the hostname, login, database name, and password for the Coppermine database.

If you do not know this information then ftp to your website, cd into your coppermine directory, cd to the includes directory and download config.inc.php. All this information is in there.

Then if your Coppermine is not installed in /coppermine change this to be what ever directory you installed Coppermine into. Lastly enter the url of your website.

2 ) Upload the coppermine_badge folder to your plugin directory

3 ) Activate the plugin

4 ) In your side bar enter: <?php echo coppermine_gallery() ?>

OR

4 ) Enter : <– copperminegallery –> in your template or in the code section of a post or page.

It is set up to display 5 thumbnails vertically. To change the number of images change the number at the end of this line:

$query = “select filepath, filename, ctime from cpg_pictures order by ctime desc limit 5;”;

If you want a horizontal list remove the

<br> from this line:
echo “\n<br><img src=\”$url/$directory/albums/$path” . “thumb_$name\”>”;

(Widget version of Coppermine Badge)

How to display a Coppermine most recent images badge in 3 easy steps

Posted by ljmacphee on November 12, 2007 under coppermine, how to | 2 Comments to Read

1 ) Edit wp_coppermine.php

2 ) Put wp_coppermine.php into the same directory as the webpage you want to put your badge.

3 ) Cut and paste all of the coppermine_gallery.php file into the webpage where you want your badge.

Coppermine Badge files

You can see this up and running on my personal blog.  I’m working on a WP plugin check back in a few days it should be up on the side bar and a blog entry posted with more information.

Easy hacks you can do:

It is set up to display 5 thumbnails vertically.

To change the number of images change the number at the end of this line:

$query = “select filepath, filename, ctime from cpg_pictures order by ctime desc limit 5;”;

If you want a horizontal list remove the \n<br> from this line:

echo “\n<br><img src=\”$url/$directory/albums/$path” . “thumb_$name\”>”;

So it looks like this:

echo “<img src=\”$url/$directory/albums/$path” . “thumb_$name\”>”;