Batch add Picture Batch add Picture
 

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

Batch add Picture

Started by kenshiro, March 12, 2004, 04:31:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kenshiro

Hi, There are a way when i make batch add picture, add a title of image equal to filename ?

Joachim Müller

not with the batch-add function, but you can use the "resize pictures" link in the admin menu to batch-rename pics in a folder.

GauGau

sharks

lol, I was looking for this the day before you posted... I didn't expect it under 'Resize Pictures!'  :D

I may as well post the way I came up with in case anyone wants a quick way if they are adding pictures frequently to lots of albums.

It's an SQL query - you need to have phpmyadmin or some other access to run SQL queries on MySQL.

update cpg11d_pictures set cpg11d_pictures.title =
SUBSTRING_INDEX(cpg11d_pictures.filename, '.', 1);


It simply sets the title to the filename without the extension. It works for filenames with only one '.' in them

If you want to keep existing titles, this should work:

update cpg11d_pictures set cpg11d_pictures.title =
SUBSTRING_INDEX(cpg11d_pictures.filename, '.', 1)
where cpg11d_pictures.title = ''