Herself's Webtools

Scripts, HowTos, Templates, Plugins, Widgets, Tips

Coppermine badge plugin for WordPress




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)

  •      
  •      
  •      

  •      
  •      
  •      
  •