Herself’s Webtools

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

Herself’s Webtools header image 1

Coppermine Badge Widget for WP

December 3rd, 2007 · 25 Comments

* Note: Coppermine table names changed in 1.4, so download the proper version for the Coppermine you are running on your website.

Download for Coppermine Widget for Coppermine

This widget 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/widgets directory ** widgets MUST be in this directory to work **

3 ) Activate the plugin

4 ) Go to Presentation->Widgets and add the widget to your sidebar and set your preferences.

Tags: coppermine · wordpress

25 responses so far ↓

  • 1 admin // Mar 19, 2008 at 8:38 am

    I updated the widget so you can adjust the table prefix. The widget has the default prefix for Coppermine 1.4 or Coppermine prior to 1.4 depending on which version you download.

  • 2 AndrewRH // Mar 25, 2008 at 4:36 pm

    I didn’t see where you change the table prefix. I ended up editing (version 1.1) of “ttc_coppermine_badge_widget.php”. I searched for “14x” and changed it to “149″ (I originally started using coppermine at version 1.4.9, and that is the table prefix it defaulted to).

  • 3 AndrewRH // Mar 25, 2008 at 4:37 pm

    Is there anyway to make the widget go to the specific picture in coppermine, instead of the base URL of the coppermine gallery?

  • 4 AndrewRH // Mar 25, 2008 at 4:38 pm

    How do I get the list of coppermine categories / albums like on your page?

  • 5 herself // Mar 25, 2008 at 7:38 pm

    It is in the file where you put your user name, password etc. You’ll see a line at bottom for the table prefix. If you don’t see that line - download the plugin again. I fixed this just last week.

  • 6 herself // Mar 25, 2008 at 7:39 pm

    No - Coppermine is supposed to fix it in the next version so you can link directly to photos. Right now Coppermine changes the order of the photos every time you upload a photo so the link is always changing.

    Many people have been bugging Coppermine to fix this. It was done to make Coppermine faster.

    I think, but am not sure, it may be possible to make it go to a specific album. I will investigate that when I get a chance.

  • 7 herself // Mar 25, 2008 at 8:19 pm

    Back, now.

    In Coppermine you have albums and categories. If you are looking at the photos on my personal blog you are seeing categories on front page, not albums.

    On the houseplants album I don’t have categories, just albums. Albums display with thumbnails -categories do not but I think you can change those settings?

    In ‘admin mode’ go to Config->album list view and you can change how deep and what shows on each page.

  • 8 travelerinside.com // Mar 28, 2008 at 2:50 pm

    Hi, I am trying to get the plugin to work but i get this error:

    Warning: mysql_numrows(): supplied argument is not a valid MySQL result resource in /home/travele5/public_html/wp-content/plugins/coppermine-widget-1.4/ttc_coppermine_badge_widget.php on line 70

    What am i doing wrong here? I’m a newbe at this so i might be entering password or something else wrong…

    Thank you for any help

  • 9 AndrewRH // Mar 28, 2008 at 4:46 pm

    Hi again,

    Downloaded the widget for cpg 1.4 just now from top of this page; but it doesn’t have anything changed in it - i.e. the table prefix entry isn’t in the wp_coppermine.php file.
    ~Andrew~

  • 10 AndrewRH // Mar 28, 2008 at 4:48 pm

    Hi again, again,

    I set the widget to just show 1 photo. However, the frame around it includes whitespace at the top. Can you make the frame snap to the photo all the way around?
    ~Andrew~
    see it on my site: http://www.Reeves-Hall.net

  • 11 ljmacphee // Mar 28, 2008 at 4:54 pm

    Hi Traveler,

    That means nothing was returned from the Coppermine db - double check your username, password, host, table prefix. Table prefix is most likely.

  • 12 ljmacphee // Mar 28, 2008 at 4:54 pm

    Hi Andrew,

    Ok, fixed - download new or just check your mail - will email you copy as well.

  • 13 travelerinside.com // Mar 28, 2008 at 6:29 pm

    What is “table prefix’?

  • 14 travelerinside.com // Mar 28, 2008 at 7:22 pm

    This is a new error:

    Warning: mysql_connect() [function.mysql-connect]: Host ‘box413.bluehost.com’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’ in /home/travele5/public_html/wp-content/plugins/coppermine-widget-1.4/ttc_coppermine_badge_widget.php on line 40
    Can not connect to server

  • 15 ljmacphee // Mar 29, 2008 at 6:29 am

    The table prefix information is in the Coppermine login file ( coppermine/include/config.inc.php ) along with user name and other database information.

    That is the same error - something in your file user-name, password, or table prefix is not correct.

  • 16 travelerinside.com // Mar 29, 2008 at 3:03 pm

    Hi ljmacphee,

    I think i’m really lost here, i tried doing the above info but i can’t seem to get it to work without a error coming up. Is their a way i can email you and have you set it up on my site…?If not now worries. thanks for your help.

  • 17 travelerinside.com // Mar 29, 2008 at 8:20 pm

    Oee i just figured it out. Thanks again.

  • 18 ljmacphee // Mar 29, 2008 at 8:40 pm

    Sry - I was out buying a car today. Here in the USA that’s about as much fun as a root canal.

    Will help you - tomorrow or Monday as time allows. I’ll send an email.

  • 19 travelerinside.com // Mar 31, 2008 at 7:46 pm

    Hi,

    When you click on my gallery photos on my site you are forwarded to the coppermine theme. How do i get it like your site as it looks like coppermine is within your webpage, not brought to new page with different them like i have. My site: http://www.travelerinside.com

    Thank You

  • 20 ljmacphee // Apr 1, 2008 at 5:34 am

    I converted the WP theme I’m using on this site to work with Coppermine.

    Cutline for Coppermine.

    How are you with CSS?

    There is a link on that page with instructions on how tp convert themes. Your theme looks nice and simple - it should convert easily.

  • 21 travelerinside.com // Apr 1, 2008 at 5:29 pm

    Well not sure with css, i’ll try to give it a read. thank you for your help.

  • 22 ljmacphee // Apr 1, 2008 at 6:02 pm

    I was going to try to see which theme you are using and download a copy but the nameserver for your site must be down.

    Can you send a copy to the original theme ? If I get a chance I’ll see what I can do. Some are easy some aren’t to convert.

  • 23 travelerinside.com // Apr 1, 2008 at 6:27 pm

    Hi,

    The coppermine part of my site is working. you can click on the Gallery link or the badge widget. The coppermin theme i have on is “project vii”. For some reason the widget is not pulling my pictures.

    The theme to my site is:

    http://themes.wordpress.net/?s=Blue+Box+0.1+by+Bob

  • 24 ljmacphee // Apr 1, 2008 at 8:42 pm

    Thanks, it’ll probably be the weekend before I have a chance to mess with it. Let me see what I can do then.

    Coppermine needs better themes and I’ve no gift for art so converting WP themes is a way to add in new ones.

  • 25 ljmacphee // Apr 3, 2008 at 6:49 am

    Coppermine Blue-box Theme

You must log in to post a comment.