Herself's Webtools

Scripts, HowTos, Templates, Plugins, Widgets, Tips

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

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

Written by Linda MacPhee-Cobb

November 12th, 2007 at 5:00 am

Posted in coppermine,how to

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

Subscribe to comments with RSS or TrackBack to 'How to display a Coppermine most recent images badge in 3 easy steps'.

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

    hilts50

    27 Nov 07 at 8:33 pm

  2. [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.

    admin

    28 Nov 07 at 8:36 am

Leave a Reply

You must be logged in to post a comment.