Changeset 31747


Ignore:
Timestamp:
Mar 7, 2017, 1:20:19 PM (8 years ago)
Author:
ddtddt
Message:

[extensions] - read_metadata - select photo in liste

Location:
extensions/read_metadata
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • extensions/read_metadata/admin.php

    r31592 r31747  
    33// | Read Metadata                                                         |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2016 ddtddt                    http://temmii.com/piwigo/ |
     5// | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    5353  $_POST['submitreadmetadata']=1;
    5454}
     55if(isset($_POST['idreadmetadata2']) and $_POST['idreadmetadata2']!=-1){
     56  $_POST['idreadmetadata']=$_POST['idreadmetadata2'];
     57}
    5558
    5659if(isset($_POST['idreadmetadata'])){
     
    6366    array('RM_ID' => ''));     
    6467}
     68if(isset($_POST['idreadmetadata'])){ echo $_POST['idreadmetadata']; }
     69    $tab_picture = pwg_query('SELECT id,name FROM ' . IMAGES_TABLE . ' order by id;');
     70        if (pwg_db_num_rows($tab_picture)) {
     71        while ($info_photos = pwg_db_fetch_assoc($tab_picture)) {
     72                        $items = array(
     73                                        'PHOTOID' => $info_photos['id'],
     74                                        'PHOTOINFO' => $info_photos['id'].' - '.$info_photos['name'],
     75                                );
     76                        $template->append('info_photos', $items);
     77        }
     78    }
     79
    6580if (isset($_POST['submitreadmetadata'])){
    6681  if (isset($_POST['idreadmetadata']) and is_numeric($_POST['idreadmetadata'])){
  • extensions/read_metadata/admin.tpl

    r31567 r31747  
    66        <fieldset id="mainrm">
    77          <legend>{'Choose photo ID'|@translate}</legend>
    8           <input type="number" name="idreadmetadata" value="{$read.RM_ID}">
     8          <input type="number" name="idreadmetadata" value="{$read.RM_ID}"> {'or'|@translate}
     9            <select name="idreadmetadata2">
     10                        <option value="-1">-----</option>
     11                 {foreach from=$info_photos item=infophoto}
     12                        <option value="{$infophoto.PHOTOID}">{$infophoto.PHOTOINFO}</option>
     13         {/foreach}
     14                </select>
    915          <p>
    1016            <input class="submit" name="submitreadmetadata" type="submit" value="{'Submit'|@translate}">
  • extensions/read_metadata/initadmin.php

    r31593 r31747  
    33// | Read Metadata                                                         |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2016 ddtddt                    http://temmii.com/piwigo/ |
     5// | Copyright(C) 2016-2017 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

    r31567 r31747  
    33// | Read Metadata                                                         |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2016 ddtddt                    http://temmii.com/piwigo/ |
     5// | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    3030$lang['Show metadata'] = 'Show metadata';
    3131$lang['Photo admin page'] = 'Photo admin page';
     32$lang['or'] = 'or';
  • extensions/read_metadata/language/fr_FR/plugin.lang.php

    r31567 r31747  
    33// | Read Metadata                                                         |
    44// +-----------------------------------------------------------------------+
    5 // | Copyright(C) 2016 ddtddt                    http://temmii.com/piwigo/ |
     5// | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
    66// +-----------------------------------------------------------------------+
    77// | This program is free software; you can redistribute it and/or modify  |
     
    3030$lang['Show metadata'] = 'Voir les métadonnées';
    3131$lang['Photo admin page'] = 'Page d\'administration de la photo';
     32$lang['or'] = 'ou';
  • extensions/read_metadata/main.inc.php

    r31551 r31747  
    1212// | Read Metadata                                                         |
    1313// +-----------------------------------------------------------------------+
    14 // | Copyright(C) 2016 ddtddt                    http://temmii.com/piwigo/ |
     14// | Copyright(C) 2016-2017 ddtddt               http://temmii.com/piwigo/ |
    1515// +-----------------------------------------------------------------------+
    1616// | This program is free software; you can redistribute it and/or modify  |
Note: See TracChangeset for help on using the changeset viewer.