Changeset 31555


Ignore:
Timestamp:
Apr 18, 2016, 11:06:31 AM (9 years ago)
Author:
ddtddt
Message:

[extensions] - read_metadata - Beta 2 - test format file + ass thumbnail

Location:
extensions/read_metadata
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/read_metadata/admin.php

    r31552 r31555  
    5959if (isset($_POST['submitreadmetadata'])){
    6060  if (isset($_POST['idreadmetadata']) and is_numeric($_POST['idreadmetadata'])){
    61         $query = 'select name,file,path FROM ' . IMAGES_TABLE . ' WHERE id = \''.$_POST['idreadmetadata'].'\';';
     61        $query = 'select id,name,file,path FROM ' . IMAGES_TABLE . ' WHERE id = \''.$_POST['idreadmetadata'].'\';';
    6262        $result = pwg_query($query);
    6363        $row = pwg_db_fetch_assoc($result);
     
    6767          redirect($admin_base_url);
    6868        }
     69        if(exif_imagetype($filename) != IMAGETYPE_JPEG and exif_imagetype($filename) != IMAGETYPE_TIFF_II and exif_imagetype($filename) != IMAGETYPE_TIFF_MM){
     70          $_SESSION['page_infos'] = array(l10n('This file type isn\'t use metadata'));
     71          redirect($admin_base_url);           
     72        }
     73        $rd_image = new SrcImage($row);
    6974        $name=$row['name'];
    7075        $file=$row['file'];
     
    7479                  'RM_NAME' => $name,
    7580                  'RM_FILE' => $file,
     81                  'RM_SCR' => DerivativeImage::url(IMG_THUMB, $rd_image),
    7682        ));
    7783        /*IPTC*/
  • extensions/read_metadata/admin.tpl

    r31552 r31555  
    1616  <fieldset id="mainrm">
    1717    <legend>{'Informations are read from'|@translate} {$readmetadata.RM_NAME} - {$readmetadata.RM_FILE}</legend>
    18     <p style="text-align:left;">
    19         {$readmetadata2.RM_IPTCWORDING} {$readmetadata.RM_FILE}<br>
    20     {foreach from=$rm_iptc item=rm}
    21           <br>{$rm.RM_KEY} = {$rm.RM_VALUE}
    22         {/foreach}
     18        <p style="text-align:left;">
     19          <img src="{$readmetadata.RM_SCR}" alt="{'Thumbnail'|translate}"><br>
     20          <br>
     21          <span style="font-size:1,5em;">{$readmetadata2.RM_IPTCWORDING} {$readmetadata.RM_FILE}</span>
     22      {foreach from=$rm_iptc item=rm}
     23            <br>{$rm.RM_KEY} = {$rm.RM_VALUE}
     24          {/foreach}
    2325    <p>
    2426        <p style="text-align:left;">
  • extensions/read_metadata/language/en_UK/plugin.lang.php

    r31551 r31555  
    2727$lang['Choise id photo'] = 'Choise id photo';
    2828$lang['Informations are read from'] = 'Informations are read from';
     29$lang['This file type isn\'t use metadata'] = 'This file type isn\'t use metadata';
  • extensions/read_metadata/language/fr_FR/plugin.lang.php

    r31551 r31555  
    2727$lang['Choise id photo'] = 'Choissisez une ID de photo';
    2828$lang['Informations are read from'] = 'L\'information est lue depuis la photo';
     29$lang['This file type isn\'t use metadata'] = 'Ce fichier n\'utilise pas les métagonnées';
Note: See TracChangeset for help on using the changeset viewer.