forum.coppermine-gallery.net

No Support => General discussion (no support!) => Topic started by: T3rry on October 21, 2004, 10:17:23 pm

Title: a way to mass add comments?
Post by: T3rry on October 21, 2004, 10:17:23 pm
a way to mass add comments?

i did a batch file upload but in order for the shopping card mod to work the files need to have a descritpion entered, is there a way to have the batch upload thing automatically put the name of the file (or whatever) in the description section of each file....


or is there a way of doign it thought the DB or whatever so i dont ahve to click each file, enter the desc, and click save, that'll take for ever on the 1700 photos i have.
Title: Re: a way to mass add comments?
Post by: Joachim Müller on October 22, 2004, 08:21:08 am
you could run a database query (using a tool like phpMyAdmin or similar) like this
Code: [Select]
UPDATE `cpgprefix_pictures` SET `title` = 'Your title' WHERE `filepath` = 'the/folder/your/pics/reside/in/';or
Code: [Select]
UPDATE `cpgprefix_pictures` SET `title` = 'Your title' WHERE `aid` = '12345';You will of course have to set the proper table prefix and adjust the folder or aid to fit your needs. If you don't know your way around in phpMyAdmin, you should backup your database before running any queries against it, as improper use may break things.

Joachim

P.S. In the future, please post on the support board for the version of coppermine you're running, not on the "general discussion" board, as it is not meant for support requests like yours.
Title: Re: a way to mass add comments?
Post by: T3rry on October 22, 2004, 05:17:03 pm
thanks, and sorry about the misplaced post.
Title: Re: a way to mass add comments?
Post by: T3rry on October 22, 2004, 05:29:34 pm
FYI if anyone is intrested i found out that if you go in to admin tools and select to make the file name = the title this also works wihtout toying with the DB.