Changeset 5040


Ignore:
Timestamp:
03/04/10 22:35:22 (10 years ago)
Author:
grum
Message:

Install process make a default config (select metadata, add a predefined group, set default values for filters)

Location:
extensions/AMetaData
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/AMetaData/amd_aip.class.inc.php

    r4999 r5040  
    10321032          "label" => L10n::get($row['name']), 
    10331033          "nb"    => $row['numOfImg'], 
    1034           "pct"   => ($numOfPictures!=0)?sprintf("%.2f", 100*$row['numOfImg']/$numOfPictures):"-", 
     1034          "pct"   => ($numOfPictures!=0)?sprintf("%.2f", 100*$row['numOfImg']/$numOfPictures):"0", 
    10351035          "tagChecked" => ($row['checked']=='y')?"checked":"" 
    10361036        ); 
     
    12721272            'numId' => $row['numId'], 
    12731273            'nbItems' => $row['numOfImg'], 
    1274             'pct'   => sprintf("%.2f", 100*$row['numOfImg']/$numOfPictures) 
     1274            'pct'   => ($numOfPictures==0)?"0":sprintf("%.2f", 100*$row['numOfImg']/$numOfPictures) 
    12751275          ); 
    12761276        } 
  • extensions/AMetaData/amd_install.class.inc.php

    r4931 r5040  
    3939    public function install() 
    4040    { 
     41      global $user, $lang; 
     42 
    4143      $tables_def=array( 
    4244"CREATE TABLE `".$this->tables['used_tags']."` ( 
     
    8284      $tables_def = create_table_add_character_set($tables_def); 
    8385      $result=$this->tablef->create_tables($tables_def); 
     86      unset($tables_def); 
     87 
     88      $tables_insert=array( 
     89"INSERT INTO `".$this->tables['groups']."` VALUES(1, 0)", 
     90"INSERT INTO `".$this->tables['groups_names']."` VALUES(1, '".$user['language']."', '".$lang['g003_default_group_name']."')", 
     91"INSERT INTO `".$this->tables['selected_tags']."` VALUES 
     92    ('magic.Camera.Make', 0, 1), 
     93    ('magic.Camera.Model', 1, 1), 
     94    ('magic.ShotInfo.Lens', 2, 1), 
     95    ('magic.ShotInfo.Aperture', 3, 1), 
     96    ('magic.ShotInfo.Exposure', 4, 1), 
     97    ('magic.ShotInfo.ISO', 5, 1), 
     98    ('magic.ShotInfo.FocalLength', 6, 1), 
     99    ('magic.ShotInfo.FocalLengthIn35mm', 7, 1), 
     100    ('magic.ShotInfo.Flash.Fired', 8, 1)" 
     101      ); 
     102      foreach($tables_insert as $sql) 
     103      { 
     104        pwg_query($sql); 
     105      } 
    84106 
    85107      return($result); 
  • extensions/AMetaData/amd_root.class.inc.php

    r5005 r5040  
    5353      'amd_NumberOfItemsPerRequest' => 25, 
    5454      'amd_GetListTags_OrderType' => "tag", 
    55       'amd_GetListTags_FilterType' => "", 
    56       'amd_GetListTags_ExcludeUnusedTag' => "n", 
     55      'amd_GetListTags_FilterType' => "magic", 
     56      'amd_GetListTags_ExcludeUnusedTag' => "y", 
    5757      'amd_GetListTags_SelectedTagOnly' => "n", 
    5858      'amd_GetListImages_OrderType' => "value" 
  • extensions/AMetaData/language/fr_FR/plugin.lang.php

    r5005 r5040  
    6666$lang['g003_add_delete_tags'] = "Ajouter/Supprimer des métadonnées"; 
    6767$lang['g003_confirm_group_delete'] = "Etes-vous sur de vouloir supprimer le groupe de métadonnées %s ?"; 
     68$lang['g003_default_group_name'] = "Conditions de la prise de vue"; 
    6869 
    6970$lang['g003_ok'] = "Ok"; 
Note: See TracChangeset for help on using the changeset viewer.