Changeset 6919 for extensions/AMetaData
- Timestamp:
- Sep 14, 2010, 7:14:43 PM (14 years ago)
- Location:
- extensions/AMetaData
- Files:
-
- 2 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/AMetaData/admin/amd_metadata_display.tpl
r6722 r6919 153 153 { 154 154 resizable: true, 155 width: 480,155 width:640, 156 156 height:120, 157 157 modal: true, … … 212 212 { 213 213 resizable: true, 214 width: 480,214 width:640, 215 215 height:120, 216 216 modal: true, … … 280 280 { 281 281 resizable: false, 282 width: 480,283 height: 320,282 width:640, 283 height:480, 284 284 modal: true, 285 285 draggable:true, -
extensions/AMetaData/admin/plugin_admin.php
r5935 r6919 20 20 if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); } 21 21 22 include(AMD_PATH."amd_aip.class.inc.php");23 24 22 global $prefixeTable; 25 23 … … 28 26 $main_plugin_object = get_plugin_data($plugin_id); 29 27 30 $plugin_ai = new AMD_AIP($prefixeTable, $main_plugin_object->getFileLocation()); 28 /* 29 * if the plugin is newly installed, display a special configuration page 30 * otherwise, display normal page 31 */ 32 33 $config=Array(); 34 GPCCore::loadConfig('amd', $config); 35 36 if($config['newInstall']=='n') 37 { 38 include(AMD_PATH."amd_aip.class.inc.php"); 39 $plugin_ai = new AMD_AIP($prefixeTable, $main_plugin_object->getFileLocation());} 40 else 41 { 42 include(AMD_PATH."amd_aip_install.class.inc.php"); 43 $plugin_ai = new AMD_AIPInstall($prefixeTable, $main_plugin_object->getFileLocation()); 44 } 45 31 46 $plugin_ai->manage(); 32 47 -
extensions/AMetaData/amd_aip.class.inc.php
r6891 r6919 48 48 49 49 $this->tabsheet = new tabsheet(); 50 $this->tabsheet->add('database', 51 l10n('g003_database'), 52 $this->getAdminLink().'&fAMD_tabsheet=database'); 53 $this->tabsheet->add('metadata', 54 l10n('g003_metadata'), 55 $this->getAdminLink().'&fAMD_tabsheet=metadata'); 56 $this->tabsheet->add('search', 57 l10n('g003_search'), 58 $this->getAdminLink().'&fAMD_tabsheet=search'); 59 $this->tabsheet->add('help', 60 l10n('g003_help'), 61 $this->getAdminLink().'&fAMD_tabsheet=help'); 50 51 if($this->config['amd_interfaceMode']=='basic') 52 { 53 $this->tabsheet->add('metadata', 54 l10n('g003_metadata'), 55 $this->getAdminLink().'&fAMD_tabsheet=metadata'); 56 $this->tabsheet->add('help', 57 l10n('g003_help'), 58 $this->getAdminLink().'&fAMD_tabsheet=help'); 59 } 60 else 61 { 62 $this->tabsheet->add('database', 63 l10n('g003_database'), 64 $this->getAdminLink().'&fAMD_tabsheet=database'); 65 $this->tabsheet->add('metadata', 66 l10n('g003_metadata'), 67 $this->getAdminLink().'&fAMD_tabsheet=metadata'); 68 $this->tabsheet->add('search', 69 l10n('g003_search'), 70 $this->getAdminLink().'&fAMD_tabsheet=search'); 71 $this->tabsheet->add('help', 72 l10n('g003_help'), 73 $this->getAdminLink().'&fAMD_tabsheet=help'); 74 } 62 75 } 63 76 … … 155 168 if(!isset($_REQUEST['fAMD_tabsheet'])) 156 169 { 157 if($this->getNumOfPictures()==0 )170 if($this->getNumOfPictures()==0 and $this->config['amd_interfaceMode']=='advanced') 158 171 { 159 172 $_REQUEST['fAMD_tabsheet']="database"; … … 168 181 169 182 if(!($_REQUEST['fAMD_tabsheet']=="metadata" or 170 $_REQUEST['fAMD_tabsheet']!="help" or 171 $_REQUEST['fAMD_tabsheet']!="database" or 172 $_REQUEST['fAMD_tabsheet']!="search")) 183 $_REQUEST['fAMD_tabsheet']=="help" or 184 $_REQUEST['fAMD_tabsheet']=="database" or 185 $_REQUEST['fAMD_tabsheet']=="search") 186 or 187 $this->config['amd_interfaceMode']=='basic' and 188 ( 189 $_REQUEST['fAMD_tabsheet']=="database" or 190 $_REQUEST['fAMD_tabsheet']=="search" 191 ) 192 ) 173 193 { 174 194 $_REQUEST['fAMD_tabsheet']="metadata"; … … 180 200 if($_REQUEST['fAMD_tabsheet']=="metadata") 181 201 { 182 if(!isset($_REQUEST['fAMD_page'])) $_REQUEST['fAMD_page']="select"; 202 if(!isset($_REQUEST['fAMD_page'])) 203 { 204 if($this->config['amd_interfaceMode']=='basic') 205 { 206 $_REQUEST['fAMD_page']="display"; 207 } 208 else 209 { 210 $_REQUEST['fAMD_page']="select"; 211 } 212 } 183 213 184 214 if(!($_REQUEST['fAMD_page']=="personnal" or 185 215 $_REQUEST['fAMD_page']=="select" or 186 $_REQUEST['fAMD_page']=="display")) $_REQUEST['fAMD_page']="select"; 216 $_REQUEST['fAMD_page']=="display") 217 or 218 $this->config['amd_interfaceMode']=='basic' and 219 ( 220 $_REQUEST['fAMD_page']=="select" 221 ) 222 ) 223 { 224 if($this->config['amd_interfaceMode']=='basic') 225 { 226 $_REQUEST['fAMD_page']="display"; 227 } 228 else 229 { 230 $_REQUEST['fAMD_page']="select"; 231 } 232 } 187 233 } 188 234 … … 281 327 l10n('g003_personnal'), 282 328 $this->getAdminLink().'&fAMD_tabsheet=metadata&fAMD_page=personnal'); 283 $statTabsheet->add('select', 284 l10n('g003_select'), 285 $this->getAdminLink().'&fAMD_tabsheet=metadata&fAMD_page=select'); 329 if($this->config['amd_interfaceMode']=='advanced') 330 { 331 $statTabsheet->add('select', 332 l10n('g003_select'), 333 $this->getAdminLink().'&fAMD_tabsheet=metadata&fAMD_page=select'); 334 } 286 335 $statTabsheet->add('display', 287 336 l10n('g003_display'), -
extensions/AMetaData/amd_ajax.php
r6891 r6919 318 318 319 319 320 321 320 322 /* 321 323 * check public.makeStats.doPictureAnalyze values … … 1495 1497 1496 1498 1497 1498 1499 } //class 1499 1500 -
extensions/AMetaData/amd_install.class.inc.php
r6891 r6919 50 50 $this->loadConfig(); 51 51 $this->config['installed']=AMD_VERSION2; 52 $this->config['newInstall']='y'; 52 53 $this->saveConfig(); 53 54 … … 121 122 unset($tables_def); 122 123 123 $tables_insert=array( 124 125 $tablesInsert=array( 124 126 "INSERT INTO `".$this->tables['groups']."` VALUES(1, 0)", 125 127 "INSERT INTO `".$this->tables['groups_names']."` VALUES(1, '".$user['language']."', '".$lang['g003_default_group_name']."')", … … 135 137 ('magic.ShotInfo.Flash.Fired', 8, 1)" 136 138 ); 137 foreach($tables _insert as $sql)139 foreach($tablesInsert as $sql) 138 140 { 139 141 pwg_query($sql); 140 142 } 143 141 144 142 145 return($result); … … 279 282 pwg_query($sql); 280 283 } 281 282 $listToAnalyze=Array(Array(), Array());283 /*284 * select 25 pictures into the caddie285 */286 $sql="SELECT ti.id, ti.path287 FROM ".CADDIE_TABLE." tc288 LEFT JOIN ".IMAGES_TABLE." ti ON ti.id = tc.element_id289 WHERE tc.user_id = ".$user['id']."290 AND ti.id IS NOT NULL291 ORDER BY RAND() LIMIT 25;";292 $result=pwg_query($sql);293 if($result)294 {295 while($row=pwg_db_fetch_assoc($result))296 {297 $listToAnalyze[0][]=$row;298 $listToAnalyze[1][]=$row['id'];299 }300 }301 /*302 * if caddie is empty, of is have less than 25 pictures, select other303 * pictures from the gallery304 */305 if(count($listToAnalyze[0])<25)306 {307 if(count($listToAnalyze[0])>0)308 {309 $excludeList="WHERE ti.id NOT IN(".implode(",", $listToAnalyze[1]).") ";310 }311 else312 {313 $excludeList="";314 }315 $sql="SELECT ti.id, ti.path, ti.has_high316 FROM ".IMAGES_TABLE." ti ".$excludeList."317 ORDER BY RAND() LIMIT ".(25-count($listToAnalyze[0])).";";318 $result=pwg_query($sql);319 if($result)320 {321 while($row=pwg_db_fetch_assoc($result))322 {323 $listToAnalyze[0][]=$row;324 }325 }326 }327 328 /*329 * analyze the 25 selected pictures330 */331 if(count($listToAnalyze[0])>0)332 {333 // $path = path of piwigo's on the server filesystem334 $path=dirname(dirname(dirname(__FILE__)));335 336 foreach($listToAnalyze[0] as $val)337 {338 if($val['has_high']===true and $this->config['amd_UseMetaFromHD']=='y')339 {340 $this->analyzeImageFile($path."/".dirname($val['path'])."/pwg_high/".basename($val['path']), $val['id']);341 }342 else343 {344 $this->analyzeImageFile($path."/".$val['path'], $val['id']);345 }346 347 }348 349 $this->makeStatsConsolidation();350 }351 284 } 352 285 -
extensions/AMetaData/amd_root.class.inc.php
r6891 r6919 87 87 'amd_FillDataBaseIgnoreSchemas' => array(), 88 88 'amd_UseMetaFromHD' => "y", 89 'amd_InterfaceMode' => "advanced", // 'advanced' or 'basic' 89 90 90 91 // theses options can be set manually -
extensions/AMetaData/language/fr_FR/plugin.lang.php
r6891 r6919 163 163 [/ul]"; 164 164 165 /* 166 * release 0.5.0 165 166 167 /** ---------------------------------------------------------------------------- 168 * new keys from releases 0.5.0/0.5.1 167 169 */ 168 170 169 171 $lang['g003_y'] = "Oui"; 170 172 $lang['g003_n'] = "Non"; 171 172 173 173 174 $lang['g003_state'] = "Etat"; … … 265 266 $lang['g003_please_set_a_value'] = "Merci de définir une valeur"; 266 267 267 /* 268 * removed keys 268 269 $lang['g003_install']="Installation"; 270 $lang['g003_basic_mode']="Basique"; 271 $lang['g003_advanced_mode']="Avancé"; 272 $lang['g003_validate']="Valider"; 273 $lang['g003_step_1']="Choix du type d'usage du plugin"; 274 $lang['g003_basic_mode_help']=" 275 Le mode [i]basique[/i] s'adresse à ceux qui souhaitent simplement afficher les métadonnées de leurs photos et propose :[ul] 276 [li]une interface simplifiée au maximum[/li] 277 [li]une liste réduite de métadonnées (environ 140, dont les plus courantes)[/li] 278 [/ul]"; 279 $lang['g003_advanced_mode_help']=" 280 Le mode [i]avancé[/i] s'adresse à ceux qui souhaitent exploiter au maximum les métadonnées de leurs photos et propose :[ul] 281 [li]une interface plus complexe, mais complète[/li] 282 [li]une liste de métadonnées plus complète (environ 540)[/li] 283 [li]des fonctionnalités étendues (statistiques, recherche, ...)[/li] 284 [/ul] 285 Le mode [i]avancé[/i] nécessite la constitution d'un référentiel."; 286 287 288 /** ---------------------------------------------------------------------------- 289 * removed keys from releases 0.5.0/0.5.1 269 290 */ 270 291 //$lang['g003_warning_on_analyze_4a'] -
extensions/AMetaData/main.inc.php
r6891 r6919 67 67 | | | * mantis : feature 1846 68 68 | | | . Read the metadata in the HD picture 69 | | | * mantis : feature 1857 70 | | | . Implement a basic and an advanced interface mode 69 71 | | | * ajax management entirely rewritted 70 72 | | | * user interface reviewed
Note: See TracChangeset
for help on using the changeset viewer.