Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Add keywords while batch-adding  (Read 2814 times)

0 Members and 1 Guest are viewing this topic.

serviceplus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Add keywords while batch-adding
« on: February 10, 2014, 08:53:50 am »

Hi everyone,

I already used the search and found a few topics related to my question but no real answer. I am searching for a way (best a plugin) that allows me to add keywords while batch-adding images. I usually add many pics at ones and adding keyword seperately for every pictures takes a lot of time. Also I don't have a keyword for the whole album but when I batch-add my images all of them share some special keywords that I want to add during that process.

Is there a way to do this? I know other people asked for this as well  :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Add keywords while batch-adding
« Reply #1 on: February 10, 2014, 01:41:19 pm »

As you probably already noticed, that's not possible out of the box in cpg1.5.x. As far as I know there doesn't exist a mod or plugin yet that adds this feature. I assume the answer to the other threads was something like "add the keywords to the pictures' IPTC data before upload and enable IPTC in the Coppermine config", as this already works as a workaround. If this is no option for you, let me know and I'll have a look if I can create a mod.

However, this feature might be useful. If you want to see it in a future version of Coppermine, please start a new thread in the feature requests board (if there's no such thread yet).
Logged

serviceplus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Add keywords while batch-adding
« Reply #2 on: February 11, 2014, 02:16:55 pm »

If you could create a mod that would be fabulous. I am not working in the gallery alone and I doubt that the other people would remember to do the workaround. I will also check out the feature request board, thank you!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Add keywords while batch-adding
« Reply #3 on: February 13, 2014, 03:30:57 pm »

Open searchnew.php, find
Code: [Select]
$warning;and replace with
Code: [Select]
'<tr><td class="tableh2" valign="middle" align="right" colspan="4">Add the following keyword(s) to all new inserted files (separated by "'.$CONFIG['keyword_separator'].'") <input type="text" class="textinput" name="keywords" id="keywords" /></td><tr>' . $warning;
open js/searchnew.js, find
Code: [Select]
url += '&aid=' + qm.aid;and replace with
Code: [Select]
url += '&aid=' + qm.aid + '&keywords=' + document.getElementById('keywords').value;
open include/picmgmt.inc.php, find
Code: [Select]
if ($CONFIG['read_iptc_data']) {and above, add
Code: [Select]
        $superCage = Inspekt::makeSuperCage();
        if ($superCage->get->keyExists('keywords') && trim($superCage->get->getEscaped('keywords')) != '') {
            $keywords = trim($superCage->get->getEscaped('keywords'));
        }


Note: this change will disable the import of IPTC data (if enabled) if one or more manual keywords are submitted.
Logged

serviceplus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Add keywords while batch-adding
« Reply #4 on: February 18, 2014, 09:39:43 am »

Hi Αndré,

that worked well, thank you!

For the future: If you ever include this into coppermine I would suggest maybe adding keywords by a drop-down list so that you cannot spell words wrong. Then it would be perfect  :)
Logged

astrasuite

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 22
Re: Add keywords while batch-adding
« Reply #5 on: February 19, 2014, 04:07:33 pm »

Very useful, will implement it too ...
Logged
Pages: [1]   Go Up
 

Page created in 0.053 seconds with 19 queries.