Module: Replace

mr.xy

Joined: 2011-09-20
Posts: 67
Posted: Wed, 2012-12-12 11:54

I've written a replace-module, that replaces photo- or movie-items. No need to delete and create a new one. No need to reenter description, title, iptc-data ...

Information and download here:
http://codex.gallery2.org/Gallery3:Modules:replace

 
Ser Moro
Ser Moro's picture

Joined: 2007-12-08
Posts: 79
Posted: Wed, 2012-12-12 18:36

Thank you.
To do: add link in main menus for photo page
SM

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-12-13 04:32

Cool!
Thanks for the contribution. I did not test much but on my test install I can't replace items in the root album. If the item is in a sub album it seems to work. Not sure why. I'll let you test that first and let me know before I start digging,

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-12-13 04:38

A bit more info:
if the item is on the 2nd page of the root album it works. The first page of the root album items don't get replaced.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2012-12-13 04:43

error logs attached. Hope it helps.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Ser Moro
Ser Moro's picture

Joined: 2007-12-08
Posts: 79
Posted: Fri, 2013-01-11 19:46

The module does not allow to change the file type.
It deletes the file on the disk, and the database record remains. And we get a photo with zero file size (if we close upload form manually).
I tried png to jpg
SM

 
mzibo

Joined: 2008-03-30
Posts: 12
Posted: Tue, 2013-05-21 20:20

The "Replace" menu item on the photo page was not appearing in my install, so I fixed it:
https://github.com/mr-xy/gallery3_replace_module/pull/1

The other thing I wanted to "fix" was forcing an update of the image dimensions (width, height) in the database after replacing an image, but so far I've been unsuccessful
https://github.com/mr-xy/gallery3_replace_module/issues/2
anybody have any idea on how I could achieve that?

jamaa

 
ztampfhung

Joined: 2006-02-27
Posts: 69
Posted: Sat, 2013-06-15 09:32

Anyone knows if this Replace Module is actually working now?

I had similar module used in my previous G2 and it was very useful. Definitely would love to have this on my current G3 too! But since I just had a disastrous result of installing/activating a defect module, I would like to make sure that a module is working before activating it.

Thanks!

~fhung~

 
mzibo

Joined: 2008-03-30
Posts: 12
Posted: Sat, 2013-06-15 10:06

It does work, although there are some things that could use some improvement, see my comment above

jamaa

 
ztampfhung

Joined: 2006-02-27
Posts: 69
Posted: Sat, 2013-06-15 10:27

Thanks, Jamaa :) Will give it a try!

~fhung~