BulkManage module

aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Tue, 2006-08-22 14:45

Hi everyone,

I've created a module to allow Site Admins to bulk edit item properties. E.g. mass file rename, mass title change, mass rescan (for manually edited images), etc.

It's very alpha, I haven't finished the rescan stuff, and I don't have much time to devote to improving it. If you'd like to see a certain property bulk manipulated, let me know and I'll see what I can do.

It's on Codex here: http://codex.gallery2.org/index.php/Gallery2:Modules:BulkManage

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Fri, 2006-08-25 09:28

Both the property editor and the image rescanner are implemented properly now. I've released this as version 0.2.0 and attached a zip to this post.

 
eduo

Joined: 2003-09-10
Posts: 107
Posted: Mon, 2006-08-28 09:35

This is a fantastic idea.

Have you considered mass-editing of comments as well? (especially deleting them :)

Eduo
---
www.eduo.info
www.eduo.info/gallery/
www.hamsterspit.com

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Tue, 2006-08-29 09:49

Hi eduo,

Glad someone likes it!

Bulk editing comments should be very easy to add, let me know what sort of options you'd like (delete all comments per item, per album, matching pattern, etc) and I'll see what I can get done.

 
eduo

Joined: 2003-09-10
Posts: 107
Posted: Tue, 2006-08-29 10:05

I have the module installed. Thank you so much for this. As soon as a high number of items (albums, photos, comments, users) creeps into any system any sort of mass-editing system is greatly appreciated.

On the comment part, in my case I wanted the same bulk selection rules that would appliccable to any other item (all the gallery, specific album(s), specific picture(s), specific users and specific text patterns (I'd personally look for every comment that tries to insert a URL and work on that list, as it's most probably a spammer).

From the selection comes a list, and that list would allows you to checkmark some or all the items and do something on them (most frequently delete, but maybe hide and move could be considered).

Eduo
---
www.eduo.info
www.eduo.info/gallery/
www.hamsterspit.com

 
andreste

Joined: 2006-06-02
Posts: 123
Posted: Sat, 2006-09-23 12:23

Hi, I installed this module hoping that I could also allow bulk creation of albums, but it doesn't. Are you planning to add such functionality? I think it'd be much appreciated by a lot of users.

 
ng_tim

Joined: 2006-08-10
Posts: 28
Posted: Sun, 2006-09-24 02:13

Hi aidanlister,

Just tried out your module and have a few comments on it.

1. For the Image Rescaner, I think it would be lovely if it can rescan the change of IPTC keyword as well as other metadata in pics also?

2. Is it possible to make is capable for bulk-watermark also?

Thanks for your hard work! :)

 
Credence_The _Hun

Joined: 2006-09-03
Posts: 19
Posted: Mon, 2006-09-25 15:45

Hi,

It's a great modul, but I don't understand, how can I make a pattern to the bulk rename.

Sorry, edit: I figured it out :), it's ok now, but... in the gallery data directory, the files are renamed, but in the album/picture view, the names are the old ones. I've try all the maintenance options, cleared the cache, but nothing. Any idea?

ps: Sorry for my poor english...

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Mon, 2006-10-02 07:37

andreste: Sure, I'd like to add all the functionality that people find useful. How do you want to control the new albums, i.e. Would you like to input a list of albums to be created? Or some other method?

ng_time: 1) It should re-read all the data associated with that picture, including the IPTC data. Are you sure that data isn't being cached somewhere?
2) Bulk watermarking is supported by the latest versions of Gallery already! :)

Credence: Make sure you blank the title as well, if your users uploaded with the Applet often the filename is stored in the title field.

I'm glad you've found the module useful!

 
ng_tim

Joined: 2006-08-10
Posts: 28
Posted: Mon, 2006-10-02 09:03
aidanlister wrote:
andreste: Sure, I'd like to add all the functionality that people find useful. How do you want to control the new albums, i.e. Would you like to input a list of albums to be created? Or some other method?

ng_time: 1) It should re-read all the data associated with that picture, including the IPTC data. Are you sure that data isn't being cached somewhere?
2) Bulk watermarking is supported by the latest versions of Gallery already! :)

Credence: Make sure you blank the title as well, if your users uploaded with the Applet often the filename is stored in the title field.

I'm glad you've found the module useful!

Hi aidanlister,

Thx for your reply.

Regarding to the IPTC re-read issue, I really has tried that out before but no success. Maybe I will try later again...when I am more free.

For the bulk watermarking, seems it will be available in version 2.2? But current release is 2.1.2, and 2.2 is still in SVN...anyway I can wait for that.

 
ng_tim

Joined: 2006-08-10
Posts: 28
Posted: Wed, 2006-10-04 14:06

Hi aidanlister,

Just had a test again just now and still the same, i.e. IPTC keyword haven't been re-read by using the rescan function. -__-"

So I think it is nohope for me to have a quick method to add keywords to all pics in my album...

 
keresztespok

Joined: 2005-01-08
Posts: 36
Posted: Fri, 2006-10-06 08:28

Hi,

This would be a great addition to gallery2. I am not a geek, so may I ask how should I install this module? Is there an easy way for this?

Thx.

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Thu, 2006-10-26 10:16

valiant: What API methods should I call to re-read IPTC data?

keresztespok: Just drop the bulkmanage folder in your modules folder, or wait until the new downloadable plugins support is available :)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2006-10-26 13:44

see modules/exif/Callbacks.inc

list ($ret, $exif) = GalleryCoreApi::newFactoryInstance('ExifInterface_1_0');
        if ($ret->isError()) {
           return array($ret->wrap(__FILE__, __LINE__), null, null);
        }
        if (isset($exif)) {
          list ($ret, $exifData) = $exif->getMetaData($ids);
          if ($ret->isError()) {
              return array($ret->wrap(__FILE__, __LINE__), null, null);
          }

that's code from:
http://www.google.com/codesearch?q=+gallery+ExifInterface_1_0+show:r1zN9KPezXI:Hi-d1hxhWwk:kdfs7KGTnrs&sa=N&cd=9&ct=rc&cs_p=http://gallery.menalto.com/files/map-module-0.4.4d.zip&cs_f=map/mapItemEdit.inc#a0

it's important to use the factory to fetch the extractor. never access other modules directly.

 
teethgrinder32

Joined: 2006-11-01
Posts: 9
Posted: Wed, 2006-11-01 17:06

I can't seem to figure out how to change the title of the pictures? I get a box saying apply this filter and blank title under edit properties but I cannot seem to change the title of the images.

Any suggestions?

Thanks in advance!

Relive The Memories
www.giggallery.net

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Thu, 2006-11-02 02:00

There's no way to set a title, I couldn't think of a reason you'd want the same title on multiple pictures.

 
teethgrinder32

Joined: 2006-11-01
Posts: 9
Posted: Thu, 2006-11-02 09:32

I would like to do it becuase I have users who upload pictures with default file names. eg. IMG123.jpg. This then is the title too due to the option they chose. No other details have been filled in.

This means adsense, search spiders do not know what images are on the page. If I change the title to the same name as the image, then this would sort it out.

Relive The Memories
www.giggallery.net

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Sun, 2006-11-05 01:57

Sorry, I don't mean to question what it is you're doing, but I still don't understand.

If they upload the file with a title of IMG123.jpg, then that's obviously the filename. Changing "the title to the same name as the image" wouldn't do anything?

 
teethgrinder32

Joined: 2006-11-01
Posts: 9
Posted: Mon, 2006-11-06 09:44

If they upload a file with IMG123.jpg then the title of the image is IMG123.jpg. I do not want this. I would like the title of the image to be the same as the title of the album unless they specifically specify iy.

Relive The Memories
www.giggallery.net

 
nathanaelb

Joined: 2006-11-13
Posts: 2
Posted: Mon, 2006-11-13 17:41

Hi
This seems like a really handy module!

My problem is that users upload photos to the gallery with IMG_$$$ names,
and then all the photos are given proper descriptions by editing the titles on the website.

But I would like to retrieve the files from the gallery (to put on CD) using the titles as filenames.
Can this module bulk-edit the filenames to contain the photos' titles?

Thanks,
Nathanael
su.nottingham.ac.uk/~explorer/gallery2/main.php

 
CCofCT

Joined: 2006-11-19
Posts: 5
Posted: Sun, 2006-11-19 15:07

Bulk Manager sounds exactly like something I need. I've read the supporting php documentation on how this works....but I'm lost.
I'm wanting to add copyright info into each photo. This needs to go into IPTC data
Would you mind telling how this might be done.
Thanks in advance

Creative Captures of CT
www.creativecapturesofct.com
www.creativecapturesofct.com/gallery/

 
nathanaelb

Joined: 2006-11-13
Posts: 2
Posted: Sun, 2006-11-26 20:54

Can this module bulk-edit the filenames to contain the photos' titles?

Could someone let me know please? Unfortunately I can't install it until I know if it does what is needed.

 
schlum

Joined: 2006-12-09
Posts: 1
Posted: Sat, 2006-12-09 15:58

Hello aidanlister,

I am going to vote on this new feature given that I think that is obviously THE one missing the most in G2. Thanks a lot for your module contribution.

Two top priorities I would add in mass edit are the following:
- rotate possibilities
- hide/unhide pictures.

I have not yet installed your module, but will do. I assume you have a checkbox system close to each picture, and, once selection is made, you can apply the mass edit function you decided.

If that's the case, the check box system could be used also for the "add to cart" function, don't you think ? because either to download a zip file, or to send pics to print, to have to select eah and every one of them, one by one, is extremely painful.

A million thanks in advance if you can find some way to input some or all of these features.

 
Iomega0318
Iomega0318's picture

Joined: 2007-02-05
Posts: 35
Posted: Sat, 2007-03-03 13:50

When you use this module, does it search for the files and then let you rename them.
Or does it rename them all based on what you input into the fields?

Gallery version = 2.1.2 core 1.1.0.2
PHP version = 4.3.11 cgi-fcgi
Webserver = Apache/1.3.33 (Unix) FrontPage/5.0.2.2510 mod_fastcgi/2.4.2
Database = mysql 4.1.14, lock.system=flock
Operating system = FreeBSD hostingprod.com

 
ckawalek

Joined: 2005-01-25
Posts: 104
Posted: Thu, 2007-03-22 19:16

Wonderful, this is just what I needed!
hope it someday works w keywords!

--
http://ChristianJamesPhoto.com

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Mon, 2007-04-09 11:00

Hi everyone,

Firstly thank you for taking the time to comment on the module.

I've finally had some free time and completely reworked the module. It's all plugin based now, so it's _really_ easy to add features. The core component now generates a progress bar and handles all the nasty stuff.

The module still has two plugins, one for rescanning of images, the other for editing the properties (blank title/summary/keywords/description, reset timestamps, shift timestamps, and enumerate filenames).

The module will be available shorly via DP (Downloadable Plugins).

 
iemand

Joined: 2007-03-12
Posts: 15
Posted: Thu, 2007-04-12 15:53

Where are the DP ?
And did you have time to add comment mass delete options? If so: Thanks!

Because yesterday some idiots have spammed ALL my pictures (thousands) with the same crap about replica handbags, and it's a pain to have to delete them by hand.. A search for "replica" in all comments would work wonders.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2007-04-12 16:30
 
iemand

Joined: 2007-03-12
Posts: 15
Posted: Fri, 2007-04-13 09:32
Quote:
please watch this video to learn how to use DP:

I know how to see and download those, but I don't see any Plugin remotely resembling BulkManage, so I assumed he was speaking of something other than the web-interface.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2007-04-14 00:13

it's in the "community" repository.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Sat, 2007-04-14 07:00

I've released another version of Bulk Manage, bringing the version up to 0.9.0 (gearing up for a 1.0.0) release.

The module now has true plugin architecture, allowing other modules to register bulkmanage handlers, and for even easier plugin creation. I've also moved the module out of the Site Admin. It's now available as an ItemAdmin option for anyone with core.edit permissions on the selected album. This is a lot more intuitive and saves having to scroll through 500 albums looking for the one you want.

I do expect to change the backend around some more, so don't start making mods yet.

I've also dropped back the required API versions, it should work with Gallery 2.1 now.

 
samwyse

Joined: 2007-04-04
Posts: 13
Posted: Mon, 2007-04-16 15:34

I'd love to test it with my G2.1 installation. How do I download it?

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Fri, 2007-04-20 07:13

If you don't have DP, you'll have to fetch the code from SVN and drop it into your modules folder.

 
erniecamacho

Joined: 2007-03-24
Posts: 5
Posted: Wed, 2007-05-09 23:32

I downloaded and installed ver. 0.9.0 of Bulk Manage, using DP. The Plugins list shows it installed. But, I can't find it to use it. It doesn't appear in the left-hand task list when I'm in "Site Admin".

I see where you said: "It's now available as an ItemAdmin option for anyone with core.edit permissions on the selected album.". I don't know where the ItemAdmin options are. Do you mean that Bulk Manage is an option under the Options heading, when I'm inside an album? And, does "core.edit permission" mean "In the Edit Permissions Page, under User or Group Permissions, the Action "[core] edit item"?

How do I invoke this plugin? Where is the link to fire it up?

I'm using: Gallery version = 2.2.1 core 1.2.0.1

Thanks, and thanks for creating this. I'm hoping to be able to do bulk image Title and Summary updates.

Ernie

 
gujarati

Joined: 2007-03-07
Posts: 6
Posted: Thu, 2007-05-10 10:53
aidanlister wrote:
If you don't have DP, you'll have to fetch the code from SVN and drop it into your modules folder.

Hi- This looks like a great mod, but I don't see how to download the latest stable from SVN (multiple versions and sets of files from what I could see, and no indication for which is the right set) and I am running 2.1.x so no DP for me. Is there any way to just download the latest stable version of this mod (like maybe a direct download location for wherever "DP" is downloading the files)?

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Sun, 2007-05-13 00:55

emiecamacho:
Browse to the album you want to bulkmanage, then hit Edit Album in the menu. From there, you should be able to see Bulkmanage Album in the menu.

gujarti:
Check out revision 1005, I think that's the latest stable version in there.

 
erniecamacho

Joined: 2007-03-24
Posts: 5
Posted: Sun, 2007-05-13 16:50

Aidanlister:
Thanks for your help on this. Unfortunately, I don't see the "Bulkmanage Album" item you refer to.

I have Bulk Manage 0.9.0 installed. To test, I created a new album. When I edit that album, the sidebar tasklist shows:
Add Album
Add Items
Delete Album
Edit Album (highlighted)
Edit Permissions
Move Album
View Comments

The Edit Album tabs are:
General
Album
Theme
Custom Fields
Watermark

In the Theme tab, the pulldown list showing blocks that can be added to the sidebar shows nothing like "Bulkmanage".

Here's my Gallery settings:
Gallery version = 2.2.1 core 1.2.0.1
PHP version = 5.2.2 cgi-fcgi
Webserver = Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.4.2
Database = mysql 5.0.24a-standard-log, lock.system=flock
Toolkits = jpegtran, Exif, Getid3, LinkItemToolkit, Thumbnail, ArchiveUpload, Ffmpeg, ImageMagick, NetPBM, Gd
Acceleration = none, none
Operating system = Linux wiggle 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mon Feb 7 13:23:30 PST 2005 i686
Default theme = matrix
gettext = enabled
Locale = en_US

So, why can't I see "Bulkmanage"?
Thanks in advance for your help with this.

Ernie

 
erniecamacho

Joined: 2007-03-24
Posts: 5
Posted: Sun, 2007-05-13 17:08

Oops. I just checked another Gallery installation that I manage. I've got this one set up the same, or so I thought. This second Gallery DOES show "Bulk Manage" right below "Add Items" in the sidebar task list.

Here are the settings for this album:
Gallery version = 2.2.1 core 1.2.0.1
PHP version = 4.4.7 cgi
Webserver = Apache/1.3.37 (Unix) mod_throttle/3.1.2 DAV/1.0.3 mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a PHP/4.4.7 mod_ssl/2.8.22 OpenSSL/0.9.7e
Database = mysql 5.0.24a-standard-log, lock.system=flock
Toolkits = ArchiveUpload, Thumbnail, Getid3, LinkItemToolkit, NetPBM, ImageMagick, Gd, Ffmpeg, Exif, jpegtran
Acceleration = none, none
Operating system = Linux wiggle 2.4.29-grsec+w+fhs6b+gr0501+nfs+a32+++p4+sata+c4+gr2b-v6.189 #1 SMP Mon Feb 7 13:23:30 PST 2005 i686
Default theme = matrix
gettext = enabled
Locale = en_US

I can see that there are several differences, which is surprising since I've been trying to keep these both the same. And, they're both part of the same account with my hosting service.

I'll start looking at how I can make these two the same. If you have any insight into which component in my first Gallery is blocking Bulk Mange, that would be helpful.

Thanks,
Ernie

 
philjung

Joined: 2004-05-18
Posts: 19
Posted: Wed, 2007-05-16 10:42

Ernie,

If the albums part of the same account, you should seriously consider converting to a multisite, which uses a single codebase for all your albums.

 
aidanlister

Joined: 2005-12-07
Posts: 56
Posted: Mon, 2007-06-04 12:40

I've changed the way the menu's are collected emiecamacho, if you're keen grab the latest version from SVN (r1099), that should solve your problems.

The current SVN version has been completely restructured again, and is now going through its second code audit.

 
myobie

Joined: 2006-05-30
Posts: 18
Posted: Mon, 2007-06-25 08:17

tried out your module..

which looks great,

BUT not what I need :(

Have you seen any modules/themes that allow editing of title/summary of multiple pics on one page.
either ajax, or submit once done...

Cheers
Craig

 
yuppicide

Joined: 2007-03-08
Posts: 17
Posted: Thu, 2007-07-19 19:44

Can I only blank keywords or can I bulk change keywords?

I need all keywords in a certain album to say "beth" and all keywords in another album to say "ann". I have others, but those were just two examples. But I know in the "Ganga" album I need all keywords to say "Ganga" and there's about 250 pictures! That would take me forever if I have to do it myself.

 
cybersnoop

Joined: 2007-08-05
Posts: 1
Posted: Wed, 2007-08-08 23:05

The 0.9 to 1.0 upgrade killed my Plugin listing due to the $this->setTemplateVersion(1) call in module.inc. I've commented out that line and everything seems fine now.

 
saidts

Joined: 2007-03-27
Posts: 44
Posted: Thu, 2007-08-09 12:51
Quote:
The 0.9 to 1.0 upgrade killed my Plugin listing due to the $this->setTemplateVersion(1) call in module.inc. I've commented out that line and everything seems fine now.

I love you cybersnoop!!! hehehehe

I have the same problem, and only now, 24 hours after, you solve it for me!

 
nemo2010

Joined: 2006-02-03
Posts: 84
Posted: Thu, 2007-08-09 17:43

had the same problem

Call to undefined function: settemplateversion() in ....../bulkmanage

As suggested above, commented out line #52, and it's working. Can anyone tell what are the consequences for commenting out the line?

 function BulkManageModule() {
        global $gallery;
        $this->setId('bulkmanage');
        $this->setName($gallery->i18n('Bulk Manage'));
        $this->setDescription($gallery->i18n('Facilitates the bulk editing of items'));
        $this->setVersion('1.0.0');
        $this->setCallbacks('getItemLinks|getItemAdminViews');
        $this->setGroup('gallery', $this->translate('Gallery'));
        $this->setRequiredCoreApi(array(7, 2));
        $this->setRequiredModuleApi(array(3, 0));
        //$this->setTemplateVersion(1); 
        $this->_bulkManageApiVersion = array(1, 0);
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2007-08-10 15:13

where are yoi getting the bulkmanage module from? the one in gallery-contrib project (the community repository) doesn't have this issue.
you should be able to get the working module through: site admin -> plugins -> get more plugins.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
nemo2010

Joined: 2006-02-03
Posts: 84
Posted: Fri, 2007-08-10 15:38

valiant,

THis is exactly where I got it from. site admin -> plugins -> get more plugins and I checked off community plugins. Since I have some time on my hands, I will remove it, and re-add it to see if I get the same error.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2007-08-10 15:43

ok, it seems that someone forgot to release the bugfix that was already in place.
i've triggered a new release and you should get the fixed bulkmanage plugin through "get more plugins" within the next 6 hours.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
nemo2010

Joined: 2006-02-03
Posts: 84
Posted: Fri, 2007-08-10 16:12

I'll wait 6 hrs, and get the plugin again. Thanks for your help.

 
skunker

Joined: 2005-02-04
Posts: 344
Posted: Sun, 2007-08-12 23:46

can someone get the SVN back up? It's down!

 
AXYPB

Joined: 2007-08-09
Posts: 6
Posted: Sun, 2007-09-30 04:38

Is this supposed to be good for anything other than stripping titles, descriptions, etc. of all items in an album? I'm not seeing any options in most of the fields save for a single check box.