Changeset 18635 for extensions/edit_gmaps
- Timestamp:
- Oct 13, 2012, 4:29:38 PM (12 years ago)
- Location:
- extensions/edit_gmaps
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/edit_gmaps/admin/admin.php
r17778 r18635 9 9 else 10 10 $page['tab'] = $_GET['tab']; 11 11 12 12 $page['tab'] = 'edit'; 13 13 $my_base_url = get_admin_plugin_menu_link(__FILE__); … … 18 18 )); 19 19 20 21 22 20 include_once( dirname(__FILE__).'/admin_'.$page['tab'].'.php'); 23 21 $template->assign_var_from_handle( 'BATCH_MANAGER_GLOBAL', 'batch_manager_global'); 24 22 $template->assign_var_from_handle( 'TAB_DATA', 'tab_data'); 25 23 $current = $template->get_template_vars('BATCH_MANAGER_GLOBAL'); 26 27 24 $template->concat('TAB_DATA', $current); 25 ; 28 26 29 27 -
extensions/edit_gmaps/admin/admin_edit.php
r17779 r18635 24 24 $icon_path = 'themes/default/icon/help.png'; 25 25 $path_js= 'themes/default/js/' ; 26 26 27 27 28 $global_tpl=realpath(PHPWG_ROOT_PATH).'\\admin\\themes\\default\\template\\batch_manager_global.tpl' ; … … 41 42 /****************************************************************/ 42 43 if ( !isset($_GET['mode']) ) $_GET['mode'] = 'global'; 43 if(!isset($_GET['cat'])) $_GET['cat']="" ; 44 45 // if(!isset($_GET['cat'])) $_GET['cat']=" " ; 44 46 if(isset($_POST['filter_prefilter'])){ 45 47 $_GET['cat'] = $_POST['filter_prefilter']; 46 48 } 47 49 48 50 if (!isset($page['title'])) $page['title']=""; 49 51 if(!isset($_POST['selectAction'])) $_POST['selectAction']="" ; 50 //$info_message .= cl_edit_functions::Memo_Vars($_POST); 52 51 53 //========== Mode GLOBAL ================================ 54 52 55 check_input_parameter('selection', $_POST, true, PATTERN_ID); 53 56 include (PHPWG_ROOT_PATH.'admin/batch_manager.php'); … … 57 60 58 61 59 60 62 if(isset($page['cat_elements_id'])) 61 63 $template->concat('TABSHEET_TITLE', ' '.l10n_dec('%d image', '%d images', count($page['cat_elements_id'])).' - '.$page['title']); … … 63 65 64 66 if(isset($_POST)){ 65 // 67 // $info_message .= cl_edit_functions::Memo_Vars($_POST); 66 68 67 69 //=============================================================== … … 103 105 104 106 if (count($collection)>0 ) 105 if ( isset($_POST['update']) && $_POST['update']==l10n('update_exif')){107 if ( isset($_POST['update']) && ( $_POST['update']==l10n('update_exif') || $_POST['update'] == l10n('update_all') )){ 106 108 /*********************************** 107 109 * Mise à jour des meta données … … 132 134 $init_info =true; 133 135 $first_image=""; 134 $_POST['submit']=""; 135 136 136 137 foreach ($collection as $id_0){ 137 138 foreach ($images as $image) { … … 140 141 // Meta donnée 141 142 //================================================================= 142 $infos_gps = array(); 143 $lat = trim($_POST['lat']); 144 $lon = trim($_POST['lon']); 145 $alt = ''; 146 if(isset($_POST['alt'])) 147 $alt = trim($_POST['alt']); 148 149 if($image['lat']=='' || $image['lon']==''){ 143 144 $lat =(isset($_POST['lat']) && $_POST['lat'] )!='' ?trim($_POST['lat']):$image['lat']; 145 $lon = (isset($_POST['lon']) && $_POST['lon'] )!='' ?trim($_POST['lon']):$image['lon']; 146 $alt =(isset($_POST['alt']) && $_POST['alt'] )!=''?trim($_POST['alt']):$image['alt']; 147 148 //========== Mise à jour $image ============= 150 149 $image['lat']=$lat; 151 150 $image['lon']=$lon; 152 151 $image['alt']=$alt; 153 } 154 $infos_gps = cl_edit_controler::Get_exif_gps( $image['path'],$image,false,true) ; 155 156 if($image['lat']=='' || $image['lon']==''){ 157 $image['lat']=$infos_gps['lat']; 158 $image['lon']=$infos_gps['lon']; 159 $image['alt']=$infos_gps['alt']; 160 } 161 162 if($image['lat']!=''){ 163 $new_ps_file_info_array= base_to_meta($image); 164 } 152 //==== lecture info gps ==== 153 $infos_gps = array(); 154 if ( isset($_POST['lat']) && $_POST['lat'] !=''){ 155 } else{ 156 $infos_gps = cl_edit_controler::Get_exif_gps( $image['path'],$image,false,true) ; 157 if($infos_gps['lat']!=0){ 158 $image['lat']=$infos_gps['lat']; 159 $image['lon']=$infos_gps['lon']; 160 } 161 } 162 $new_ps_file_info_array = base_to_meta($image); 165 163 166 164 $new_ps_file_info_array['filename'] = $image['path']; 167 165 $new_ps_file_info_array['selection'] = explode(";",$new_ps_file_info_array['filename']); 168 //166 169 167 if( $image['lat']=="" ){ 170 168 $image['lat']= $new_ps_file_info_array['lat'] ; … … 172 170 $image['alt']= $new_ps_file_info_array['alt'] ; 173 171 } 174 if($_POST['update']==l10n('update_exif')) unset($_POST['submit']); 175 if(1) { 176 177 if( cl_edit_controler::add_meta_gps($new_ps_file_info_array,$image)){ 178 $exif = @read_exif_data( $image['path']); 172 173 174 175 176 if( cl_edit_controler::add_meta_gps($new_ps_file_info_array,$image)){ 177 $exif = @read_exif_data( $image['path']); 179 178 $infos_gps = cl_edit_controler::Get_exif_gps( $image['path'],$image,false,true) ; 180 179 $info_message .=l10n('update_exif') . " : " . $image['path'] . " : " . $image['file'] . " : ok<BR />"; 181 }else{ 182 183 } 184 } 180 } 181 185 182 }else{ 186 183 187 184 } // fin search 185 188 186 } // fin id_0 189 } // fin collection 187 188 189 190 } // fin collection 191 192 if($_POST['update']==l10n('update_exif')) { 193 unset($_POST['submit']); 194 } 195 if ($_POST['update']==l10n('update_all')){ 196 $_POST['submit'] = l10n('update_database') ; 197 198 } 199 190 200 $_POST['update'] ="ok"; 201 191 202 } 192 203 //====================================================================== … … 214 225 } 215 226 } 227 $_POST['submit'] = l10n('selectAction') ; 228 unset($_POST['submit']); 216 229 } 217 230 } … … 224 237 $categories = array(); 225 238 $selecteds = array(); 239 if(!isset($_GET['cat'])) $_GET['cat']="tag-no"; 226 240 if (!empty($result)){ 227 241 while ($row = mysql_fetch_assoc($result)) { 228 242 $url = $admin_url.get_query_string_diff(array('start','cat')).'&cat='.$row['id']; 243 229 244 if ( $row['id']==$_GET['cat'] ) $selecteds[] = $url; 230 245 $row['id']=$url; 246 231 247 array_push($categories, $row); 232 248 } 233 249 } 250 234 251 usort($categories, 'global_rank_compare'); 235 252 display_select_categories($categories, $selecteds, 'categories', false); … … 253 270 * AFFICHAGE MODE GLOBAL 254 271 *************************************/ 272 255 273 foreach ($images as $image){ 256 274 $infos_gps = array(); … … 288 306 //================================================= 289 307 290 $TN_SRC= $current[$j][' TN_SRC'];308 $TN_SRC= $current[$j]['thumb']; 291 309 $TITLE=$current[$j]['TITLE'] ; 292 310 293 $tpl_var = array( 294 ' ID' =>$image['id'],311 $tpl_var = array( 312 'id' =>$image['id'], 295 313 'TN_SRC' => $TN_SRC, 296 ' FILE' => $current[$j]['FILE'],314 'file' => $current[$j]['FILE'], 297 315 'TITLE' => $TITLE, 298 316 'LEVEL' => $current[$j]['LEVEL'], … … 303 321 'alt' => $image['alt'] , 304 322 'U_EXIF' => $v_exif , 305 'U_BD' => $v_db 323 'U_BD' => $v_db , 324 'thumb' =>$current[$j]['thumb'] 306 325 ); 307 326 -
extensions/edit_gmaps/admin/admin_edit.tpl
r17779 r18635 40 40 border:outset; 41 41 } 42 .thumbLegend { color:grey; 43 44 } 45 .thumbLegend:hover { color:white ; 46 47 } 42 48 43 {/literal} 49 44 </style> … … 61 56 var infos_img = infos_img || []; 62 57 {foreach from=$thumbnails item=thumbnail} 63 infos_img[{$thumbnail. ID}]={ldelim}EXIF:"{$thumbnail.U_EXIF}",58 infos_img[{$thumbnail.id}]={ldelim}EXIF:"{$thumbnail.U_EXIF}", 64 59 BD:"{$thumbnail.U_BD}", 65 60 lon:"{$thumbnail.lon}", … … 128 123 129 124 <fieldset> 130 <label>{'command '|@translate}</label>125 <label>{'command_cl'|@translate}</label> 131 126 132 127 <table> … … 203 198 <input class="cluetip submit" title="{'update_exif'|@translate}|{'hlp_update_exif'|@translate}." type="submit" value="{'update_exif'|@translate}" name="update" {$tag_input_enabled} /></td> 204 199 </td> 200 <td> 201 <input class="cluetip submit" title="{'update_all'|@translate}|{'hlp_update_all'|@translate}." type="submit" value="{'update_all'|@translate}" name="update" {$tag_input_enabled} /></td> 202 </td> 203 205 204 </table> 206 205 </fieldset> -
extensions/edit_gmaps/admin/js/JScript.js
r17776 r18635 48 48 } 49 49 }); 50 50 51 51 jQuery(".thumbLegend").mouseover(function (i) { 52 52 winp = infos_img[this.id]; -
extensions/edit_gmaps/language/fr_FR/lang.php
r17761 r18635 1 1 <?php 2 2 global $lang; 3 $lang['command_cl']="Lecture : Base de données, Exif"; 3 4 $lang['return']="Retour"; 4 5 $lang['hlp_line4'] .= "Modifie la sélection."; 5 6 $lang['update']='Mise à jour '; 6 7 $lang['update_exif']='Mise à jour EXIF'; 8 $lang['update_all']='Mise à jour EXIF & base de données'; 9 7 10 $lang['update_database']='Mise à jour Base de données'; 8 11 $lang['altitude']='Altitude'; … … 16 19 $lang['hlp_update_exif']='Met à jour les informations enregistrées dans les metadonnées "exif" des fichier jpeg. '; 17 20 $lang['hlp_update_database']='Met à jour les informations enregistrées dans la base de données.'; 18 21 $lang['hlp_update_all']="Met à jour les informationsdans la base de données et dans les metadonnées 'Exif'. "; 19 22 20 23 $lang['search_title']='Rechercher un lieu...'; -
extensions/edit_gmaps/main.inc.php
r17779 r18635 2 2 /* 3 3 Plugin Name: Edit Maps&Earth 4 Version: 2.2. 54 Version: 2.2.6 5 5 Description: Editor for rv gmaps 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=330
Note: See TracChangeset
for help on using the changeset viewer.