Bulk uploading with Gallery Remote, setting title, keywords, etc.

Sunbeam25
Sunbeam25's picture

Joined: 2007-03-24
Posts: 32
Posted: Fri, 2007-11-23 09:43

Hi All

We've got Gallery2 integrated with VBulletin and working just the way we want it.

Now we've reached the point where we want to upload 1000s of photos. Gallery Remote works perfectly for this, but it doesn't copy the filename into the title, so all the data in the filename isn't available for search. For instance:

Sunbeam 25hp SL3605 water pump.JPG

How can I get Gallery Remote to fill in the title, or is there another way to do this. It would also be good to fill in the keywords, I can pull them out of the standard filenames we use for photos.

By the way, Gallery2 is FANTASTIC. Just amazing what we've achieved in a short time with little experience.

Thanks All!

Alan

Login or register to post comments
Sunbeam25
Sunbeam25's picture

Joined: 2007-03-24
Posts: 32
Posted: Fri, 2007-11-23 14:52

Answering my own questions again, still someone else might find this useful ;o)

I've put the following italicised lines into GalleryRemote.inc, it populates the title from the file name, stripping off the ".JPG". I'll have to make it more "sophisticated" if we start to use .JPEG, but it works for now. Only the Gallery Administrators will be using Gallery Remote, so I'll just tell them only to use three letter suffixes :o)

$title = isset($form['caption'])?$form['caption']:NULL;
/*
* Alan
*/
$title = substr(basename($itemName),0,strlen(basename($itemName))-4);
/*
* Alan
*/

The next challenge is to load keywords at the same time. I expect this will be an update of some sort after the addItemToAlbum in GalleryRemote.inc completes. i.e. at some point after after the following line.

list ($ret, $newItem) = GalleryCoreApi::addItemToAlbum(
$tmpFile, basename($itemName), $title,
$summary, $description, $mimeType, $parentId);

Login or register to post comments
Sunbeam25
Sunbeam25's picture

Joined: 2007-03-24
Posts: 32
Posted: Fri, 2007-11-23 16:03

STILL answering my own questions :o)

I found this thread:

http://gallery.menalto.com/node/60370

Using this code, I have now tweaked GalleryRemote.inc so that any text typed into the Summary field on GalleryRemote is diverted into keywords. We never use summary, so no problem there.

This forum is a brilliant resource. Dig long enough and you'll probably find what you need to know!

Login or register to post comments
Shai

Joined: 2003-12-10
Posts: 34
Posted: Sun, 2008-08-31 07:21

How did you tweak GR to divert words in summery to keywords?
Can you tell me exactly what I need to change where in GalleryRemote.inc ?

Login or register to post comments