Add keywords while batch-adding Add keywords while batch-adding
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Add keywords while batch-adding

Started by serviceplus, February 10, 2014, 08:53:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

serviceplus

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  :)

Αndré

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).

serviceplus

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!

Αndré

Open searchnew.php, find
$warning;
and replace with
'<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
url += '&aid=' + qm.aid;
and replace with
url += '&aid=' + qm.aid + '&keywords=' + document.getElementById('keywords').value;

open include/picmgmt.inc.php, find
if ($CONFIG['read_iptc_data']) {
and above, add
        $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.

serviceplus

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  :)

astrasuite

Very useful, will implement it too ...