Herself’s Webtools

Webtools for Webmasters: Scripts, HowTos, Templates, Plugins, Widgets, Tips and Useful Information

Herself’s Webtools header image 1

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

November 12th, 2007 · 2 Comments

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\”>”;

Tags: coppermine · how to

2 responses so far ↓

  • 1 hilts50 // Nov 27, 2007 at 8:33 pm

    Can you use this with widgets? I’m having some difficulties. Nothing is showing up.

  • 2 admin // Nov 28, 2007 at 8:36 am

    [update Mon. am] Widget version is up link at bottom of post above or just click on Widgets link in header.

    [ update Fri am]… I have a working widget of the plugin. Let me do a few more tests and re-write directions and all. I will post it Monday am and put a link here as well.

    [update Thur am]… working on it and making progress, if time allows I should have it working early next week. It just depends on how much free time I have this weekend.

    [update Wed am]…Possibly, I think I understand the basics of it. Give me a few days ( I’ve other sites to run too ) and I’ll post a note back here if all works out.

    [original response ]
    I’ve never used widgets, I’m used to getting into the code of everything.

    Let me set up a WP with widgets on my home computer and play a bit and see what I can do and I’ll get back to you on this shortly.

You must log in to post a comment.