keywords for all files in an album keywords for all files in an album
 

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

keywords for all files in an album

Started by arun, August 24, 2006, 03:03:07 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

arun

Hi,

here is a quick hack, so that you can add a keyword to all files in an album via the editpics page.
Not sure if this is done in a way that could be used for future versions, support for other languages would need to be added.

cheers
     ARUN

Generated with "diff -u"...

--- editpics.php_old    2006-08-23 17:28:34.000000000 -0700
+++ editpics.php        2006-08-23 17:37:43.000000000 -0700
@@ -104,7 +104,7 @@
                 $aid         = (int)get_post_var('aid', $pid);
                 $title       = get_post_var('title', $pid);
                 $caption     = get_post_var('caption', $pid);
-                $keywords    = get_post_var('keywords', $pid);
+                $keywords    = $_POST['common_keywords']." ".get_post_var('keywords', $pid);
                 $user1       = get_post_var('user1', $pid);
                 $user2       = get_post_var('user2', $pid);
                 $user3       = get_post_var('user3', $pid);
@@ -602,7 +602,18 @@
                             </span>
                         </td>
                     </tr>
+                   <tr>
                 </table>
+                <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-top:5px;padding-bottom:5px">
+               <tr>
+                  <td class="tableb" style="white-space: nowrap;">
+                        Common keywords to all files
+                    </td>
+                    <td width="100%" class="tableb" valign="top">
+                        <input type="text" style="width: 100%" name="common_keywords" maxlength="255" value="" class="textinput" />
+                    </td>
+               </tr>
+               </table>
             </td>
         </tr>
EOT;

Joachim Müller

Thanks for your contrib. Windows user are not familiar with diff notation, that's why I converted it to the notation that is common in coppermine:

Edit editpics-php (using a plain-text editor, notepad.exe is fine). Find $keywords    = get_post_var('keywords', $pid);and replace with$keywords    = $_POST['common_keywords']." ".get_post_var('keywords', $pid);

Find                </table>
            </td>
        </tr>
(around lines 605-607) and add after it (into a new line)        <tr>
          <td class="tableb" colspan="3" align="center">
            <table border="0" cellspacing="0" cellpadding="0" width="100%" style="padding-top:5px;padding-bottom:5px">
              <tr>
                <td class="tableb" style="white-space: nowrap;">
                  Common keywords to all files
                </td>
                <td class="tableb" valign="top">
                  <input type="text" style="width: 100%" name="common_keywords" maxlength="255" value="" class="textinput" />
                </td>
              </tr>
            </table>
          </td>
        </tr>


Save the file, upload it to your server and test.

Hein Traag

Modded editpics.php and with good result. It works.

Thanks guys

Cheers!
Hein

p.s. editpics.php with dutch mod attached for the dutch users. Just unpack, backup your existing editpics.php and replace with the one in the zip.