Changeset 32397


Ignore:
Timestamp:
Jan 17, 2021, 10:00:06 PM (3 years ago)
Author:
ddtddt
Message:

[read_metadata] add XMP support thanks to executive

Location:
extensions/read_metadata
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/read_metadata/admin.php

    r32108 r32397  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Read Metadata                                                         |
    4 // +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
     3// | Read Metadata plugin for piwigo  by TEMMII                            |
     4// +-----------------------------------------------------------------------+
     5// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    176176                  'RM_EXIFWORDING' => 'EXIF Fields in ',
    177177          ));
     178         
     179        #
     180        #       Read and parse XMP metadata
     181        #       (ImageMagick PHP extension required)
     182        #
     183
     184        //      Check ImageMagick is installed
     185        if      (       extension_loaded(       'imagick' ) &&
     186                        class_exists(           'imagick' )) {
     187
     188                //create new Imagick object from image & get the XMP data
     189                $RM_IM =                        new imagick($filename) ;               
     190                $RM_XMP =                       $RM_IM -> getImageProperties( "xmp:*" ) ;
     191
     192                // Setup readout
     193                $headerTxt = 'XMP Properties:' ;
     194                $template -> assign('XMPdata', $RM_XMP) ;
     195        }
     196        else {
     197                $headerTxt = l10n('Unable to read XMP data. ImageMagick not loaded.') ;
     198        }
     199
     200        $template ->    assign('XMPheader', $headerTxt ) ;
     201
    178202
    179203       
  • extensions/read_metadata/admin.tpl

    r31747 r32397  
    3232            <br>{$rm.RM_KEY} = {$rm.RM_VALUE}
    3333          {/foreach}
    34     <p>
     34    </p>
    3535        <p style="text-align:left;">
    3636        <span style="font-size:1.2em;font-weight: bold;">{$readmetadata3.RM_EXIFWORDING} {$readmetadata.RM_FILE}</span><br>
     
    4242          {$rm.RM_KEY} = {$rm.RM_VALUE}<br>
    4343        {/foreach}
    44     <p>
     44    </p>
     45        <p style="text-align:left;">    {* XMP SECTION *}
     46        <span style="font-size:1.2em;font-weight: bold;">{$XMPheader}</span><br>
     47        {if isset ($XMPdata)}
     48                {foreach from=$XMPdata item=XMPprop key=XMPname}
     49                        <pre>{$XMPname}         {$XMPprop}</pre>
     50                {/foreach}
     51        {/if}
     52        <br>
    4553  </fieldset>
    4654 
  • extensions/read_metadata/initadmin.php

    r31747 r32397  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Read Metadata                                                         |
     3// | Read Metadata plugin for piwigo  by TEMMII                            |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
  • extensions/read_metadata/language/en_UK/plugin.lang.php

    r31747 r32397  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Read Metadata                                                         |
     3// | Read Metadata plugin for piwigo  by TEMMII                            |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    3131$lang['Photo admin page'] = 'Photo admin page';
    3232$lang['or'] = 'or';
     33$lang['Unable to read XMP data. ImageMagick not loaded.'] = 'Unable to read XMP data. ImageMagick not loaded.';
  • extensions/read_metadata/language/fr_FR/plugin.lang.php

    r31787 r32397  
    11<?php
    22// +-----------------------------------------------------------------------+
    3 // | Read Metadata                                                         |
     3// | Read Metadata plugin for piwigo  by TEMMII                            |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
     5// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    3131$lang['Photo admin page'] = 'Page d\'administration de la photo';
    3232$lang['or'] = 'ou';
     33$lang['Unable to read XMP data. ImageMagick not loaded.'] = 'Impossible de lire les données XMP. ImageMagick n\'est pas activé.';
  • extensions/read_metadata/main.inc.php

    r32273 r32397  
    1010
    1111// +-----------------------------------------------------------------------+
    12 // | Read Metadata                                                         |
     12// | Read Metadata plugin for piwigo  by TEMMII                            |
    1313// +-----------------------------------------------------------------------+
    14 // | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
     14// | Copyright(C) 2016-2021 ddtddt               http://temmii.com/piwigo/ |
    1515// +-----------------------------------------------------------------------+
    1616// | This program is free software; you can redistribute it and/or modify  |
     
    4343}
    4444
    45 // Plugin for admin
     45  // Plugin for admin
    4646if (script_basename() == 'admin')   
    4747{
Note: See TracChangeset for help on using the changeset viewer.