forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: slinq on July 20, 2009, 11:28:30 pm

Title: Look at some cool features I've hacked into Coppermine
Post by: slinq on July 20, 2009, 11:28:30 pm
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 (http://slinq.com/gallery/features/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.



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 (http://slinq.com/gallery/).
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: jeepguy_1980 on July 20, 2009, 11:39:56 pm
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?
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: Pascal YAP on July 20, 2009, 11:55:29 pm
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.
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: slinq on July 21, 2009, 12:29:18 am
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 (http://slinq.com/blog/2009/07/16/geo-tagging-what-is-it-and-how-do-i-do-it/).

I've created an archive containing my Coppermine source - it's too big to upload to the board, but you can download it here (http://slinq.com/coppermine-1.4.18-slinq-hack.tar.bz2). 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.
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: slinq on July 21, 2009, 12:34:55 am
My code also relies upon the following additional database tables:

Code: [Select]
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`)
);

Title: Re: Look at some cool features I've hacked into Coppermine
Post by: Αndré on July 21, 2009, 10:42:58 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 (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.4.x/include/functions.inc.php?r1=4429&r2=4753).
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: Joachim Müller on July 21, 2009, 07:10:02 pm
In which aspect is this a feature request?
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: net on July 25, 2009, 08:33:27 pm
Amazing, i'd pay to get your SEF url support on my gallery, pm with a price if interested.
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: Joachim Müller on July 27, 2009, 07:22:16 am
Those are some really cool features. We'd love to see your code contribution.
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: sihijau on February 04, 2010, 04:55:50 am

  • 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 :)
Title: Re: Look at some cool features I've hacked into Coppermine
Post by: Joachim Müller on February 04, 2010, 08:18:03 am
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.