Look at some cool features I've hacked into Coppermine Look at some cool features I've hacked into Coppermine
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Look at some cool features I've hacked into Coppermine

Started by slinq, July 20, 2009, 11:28:30 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

slinq

Okay I'm posting this here because all of the relevant boards are locked (GRR).

Basically I've been working on some custom hacks for Coppermine for a gallery website for a project I'm doing on an outstanding area of natural beauty called Cuckmere Haven. I'm afraid I've literally hacked them in rather than following the proper plugin architecture (to be honest I'm not even sure if it would have been possible to do a lot of what I've done as a plugin). Anyway, there's really two reasons I'm posting this here - firstly I thought the guys working on Coppermine might be interested to see some of the clever things I'm doing with it, and secondly, although I haven't got time myself to contribute these hacks back into the base Coppermine code; in the spirit of opensource I want to make it known that the source code of my website is available to anyone wishing to integrate some or all of the features I've implemented.

So here's a quick list of the features I've added on top of Coppermine. Some of them may be available as plugins, but either the plugins don't do exactly what I want, or weren't available at the time I started the work.


  • Ajax thumbnail browsing - no page refreshes (for thumbnails.php and index.php)
  • Ajax image browsing
  • Filmstrip that visibly slides along as you skip between images in displayimage.php (Javascript)
  • Fading between images in displayimage.php (Javascript)
  • Geotagging for editpics.php which adds the Geotag to the EXIF data of each image
  • Google maps for the geotagged images
  • Automatically generate printable PDFs of single images or an entire album
  • Automatically generate ZIP files containing an entire album for download
  • Automatic watermarking of each image with my logo
  • Image tagging very similar to the way it's implemented by Panoramio (in Javascript - very quick)
  • Images browsable by tag as well as by album
  • Captchas generated using images from Coppermine as the background
  • All text in a custom font, rendered server-side
  • RSS feeds for images and galleries
  • Search engine friendly URLs

Those are the ones I can think of off the top of my head, there's probably more. Anyway, as I say the code's available if you want to see it. You can see all this stuff in action on my website.

jeepguy_1980

That is some really neat stuff. The transitions between pictures is really smooth.

Is the Geotagging feature able to parse files with geotag exif data that have been uploaded? Or is it added after the fact.

Would you mind just posting all of your CPG files into a zip for examination?

Pascal YAP

Interresting, but you have deleted our Copyright, secondly your Coppermine is totally out date   ???
Update to CPG 1.4.25 (yours is 1.4.18)

Please we need to see Powered by Coppermine Photo Gallery. Thanx.

slinq

The geotagging feature doesn't read the geotag out of the EXIF data - it puts it in there, but it also stores a copy of it in a database table. That's because I can't afford/don't want the nasty contraption I'd have to attach to my EOS 40D to make it automatically geotag images, so I do it manually by hand. I've actually written a blog entry about the process here if you're interested.

I've created an archive containing my Coppermine source - it's too big to upload to the board, but you can download it here. I would ask that if anyone uses any of my hacks in their website that they provide appropriate credit to me and ideally a link back to my website. Similarly if any of this code gets merged into the Coppermine source or used in a plugin - I'd appreciate attribution and a link. That said - if my code is useful to you, please do use it!

In reply to Pascal YAP: Apologies about the copyright notice; I hadn't removed it intentionally - the div it's in was just being obscured by my template. I've fixed it now.
I'm running version 1.4.18 - it's not exactly ancient, seeing as I've changed most of the core PHP files, doing a full upgrade isn't a particularly simple process. I have been applying security patches wherever possible. Actually I would appreciate a little more information about the vulnerability that's fixed in version 1.4.19 as the fix involves replacing functions.inc.php and that's not something that I can do easily.

slinq

#4
My code also relies upon the following additional database tables:

CREATE TABLE `picture_keywords` (
 `pid` int(11) NOT NULL,
 `kid` int(11) NOT NULL,
 PRIMARY KEY (`pid`,`kid`),
 KEY `pid` (`pid`),
 KEY `kid` (`kid`)
);

CREATE TABLE `keywords` (
 `kid` int(11) NOT NULL AUTO_INCREMENT,
 `keyword` varchar(255) NOT NULL,
 `description` text NOT NULL,
 PRIMARY KEY (`kid`),
 UNIQUE KEY `keyword_2` (`keyword`),
 KEY `keyword` (`keyword`)
);

CREATE TABLE `geolocations` (
 `pid` int(11) NOT NULL,
 `latitude` varchar(255) DEFAULT NULL,
 `longitude` varchar(255) DEFAULT NULL,
 `altitude` int(11) DEFAULT NULL,
 PRIMARY KEY (`pid`)
);

CREATE TABLE `captcha_tickets` (
 `id` int(32) NOT NULL AUTO_INCREMENT,
 `word` varchar(255) NOT NULL,
 PRIMARY KEY (`id`)
);


Αndré

Quote from: slinq on July 21, 2009, 12:29:18 AM
Actually I would appreciate a little more information about the vulnerability that's fixed in version 1.4.19 as the fix involves replacing functions.inc.php and that's not something that I can do easily.
See diffs here.

Joachim Müller


net

Amazing, i'd pay to get your SEF url support on my gallery, pm with a price if interested.

Joachim Müller

Those are some really cool features. We'd love to see your code contribution.

sihijau

Quote from: slinq on July 20, 2009, 11:28:30 PM


  • Ajax thumbnail browsing - no page refreshes (for thumbnails.php and index.php)
  • Ajax image browsing
  • Filmstrip that visibly slides along as you skip between images in displayimage.php (Javascript)
  • Fading between images in displayimage.php (Javascript)
  • Geotagging for editpics.php which adds the Geotag to the EXIF data of each image
  • Google maps for the geotagged images
  • Automatically generate printable PDFs of single images or an entire album
  • Automatically generate ZIP files containing an entire album for download
  • Automatic watermarking of each image with my logo
  • Image tagging very similar to the way it's implemented by Panoramio (in Javascript - very quick)
  • Images browsable by tag as well as by album
  • Captchas generated using images from Coppermine as the background
  • All text in a custom font, rendered server-side
  • RSS feeds for images and galleries
  • Search engine friendly URLs


Whoaa... really great share....
After follow the advice from admin here..about board rules  ;)

Finally i found customizing copppermine filmstrip using ajax driven.
Thanks for sharing your hacks :)

Joachim Müller

The drawback of ready-to-consume archives like the one provided: it's based on cpg1.4.18 and subsequently contains all security flaws from cpg1.4.18, so we can't really recommend to use this unless you make a diff comparison and apply only the changed stuff.