Changeset 54426 in spip-zone for _plugins_/metadonnees_photo
- Timestamp:
- Nov 14, 2011, 10:14:52 AM (9 years ago)
- Location:
- _plugins_/metadonnees_photo/trunk
- Files:
-
- 3 added
- 4 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/metadonnees_photo/trunk/exec/pave_histogramme.php
r52806 r54426 4 4 5 5 function exec_pave_histogramme() { 6 echo recuperer_fond("inc_histogramme_small",7 array('id_document' => _request('id_document')));8 } 6 include_spip('inc/actions'); 7 ajax_retour(recuperer_fond("prive/squelettes/inclure/image_histogramme_small", array('id_document' => _request('id_document')))); 8 } 9 9 10 10 -
_plugins_/metadonnees_photo/trunk/exec/photo_popup.php
r52806 r54426 4 4 5 5 function exec_photo_popup() { 6 include_spip("inc/utils"); 7 8 $fichier = $_GET["fichier"]; 9 $fichier = mb_ereg_replace("^"._DIR_IMG, "", $fichier); 10 11 $contexte = array('fichier'=>$fichier); 6 include_spip("inc/utils"); 7 include_spip("inc/autoriser"); 12 8 13 $p = evaluer_fond("popup_document", $contexte); 14 $ret .= $p["texte"]; 15 16 17 echo $ret; 18 9 if (!$id_document = _request('id_document') 10 AND $fichier = _request('fichier')) { 11 if (strncmp($fichier,_DIR_IMG,strlen(_DIR_IMG))==0) 12 $fichier = substr($fichier,strlen(_DIR_IMG)); 13 14 $id_document = sql_getfetsel('id_document','spip_documents','fichier='.sql_quote($fichier)); 15 } 16 17 include_spip('inc/actions'); 18 ajax_retour(recuperer_fond("prive/squelettes/inclure/popup_document", array('id_document'=>$id_document))); 19 19 } 20 20 -
_plugins_/metadonnees_photo/trunk/photo_infos.php
r54419 r54426 6 6 function photo_infos_afficher_metas_document($flux){ 7 7 if ($id_document = $flux['args']['id_document']){ 8 $flux["data"] .= recuperer_fond("p ave_exif",array('id_document' => $id_document));8 $flux["data"] .= recuperer_fond("prive/squelettes/inclure/image_pave_exif",array('id_document' => $id_document)); 9 9 } 10 10 return $flux; -
_plugins_/metadonnees_photo/trunk/photo_infos_fonctions.php
r52806 r54426 211 211 } 212 212 213 /** 214 * Tester si on peut traiter l'image compte tenu de la limite de memoire de GD2 215 * @param object $im 216 * @param int $largeur 217 * @param int $hauteur 218 * @return string 219 */ 213 220 function test_traiter_image($im, $largeur, $hauteur) { 214 221 $surface = $largeur * $hauteur; 215 222 216 if ($surface > $GLOBALS["meta"]["max_taille_vignettes_echec"]) return false; 217 else return true; 218 219 220 } 221 223 if ($surface > $GLOBALS["meta"]["max_taille_vignettes"]) 224 return ''; 225 226 return ' '; 227 } 228 229 /** 230 * Generer un histrogramme des couleurs RVB de l'image 231 * 232 * @param object $im 233 * @return string 234 */ 222 235 function image_histogramme($im) { 223 236 include_spip("inc/filtres_images"); … … 225 238 $fonction = array('image_histo', func_get_args()); 226 239 $image = image_valeurs_trans($im, "histo","png",$fonction); 227 240 228 241 if (!$image) return(""); 229 242 … … 231 244 $y_i = $image["hauteur"]; 232 245 $surface = $x_i * $y_i; 233 246 234 247 if (!test_traiter_image($im, $x_i, $y_i) ) return; 235 248 … … 250 263 imagepolygon($im_, array ( 0, 0, 257, 0, 257, 129, 0,129 ), 4, $col_poly); 251 264 265 $val_gris = $val_r = $val_g = $val_b = array(); 252 266 for ($x = 0; $x < $x_i; $x++) { 253 267 for ($y=0; $y < $y_i; $y++) { … … 315 329 } 316 330 317 return "<img src='$dest' style='width: 258px; height: 130px;' />";331 return _image_ecrire_tag($image,array('src'=>$dest,'width'=>258,'height'=>130)); 318 332 } 319 333 -
_plugins_/metadonnees_photo/trunk/prive/squelettes/inclure/image_pave_exif.html
r54419 r54426 110 110 </div> 111 111 </div> 112 [(#GET{fichier}|test_traiter_image{[(#GET{fichier}|largeur)], [(#GET{fichier}|hauteur)]}|>{0}|?{" ",""})112 [(#GET{fichier}|test_traiter_image{[(#GET{fichier}|largeur)],[(#GET{fichier}|hauteur)]}|oui) 113 113 <div id="histogramme#GET{compteur}" style="text-align: center; padding-top: 5px;"><img src="#CHEMIN{images/loader.gif}" alt="Loading..." /></div> 114 114 ] -
_plugins_/metadonnees_photo/trunk/prive/squelettes/inclure/popup_document.html
r54411 r54426 1 <BOUCLE_documents(DOCUMENTS){ fichier=#ENV{fichier}}{tout}>1 <BOUCLE_documents(DOCUMENTS){id_document}{statut==.*}> 2 2 3 3 … … 9 9 10 10 <div style="position: fixed; width: 258px; bottom: 40px; right: 40px;"> 11 <INCLURE{fond= inc_exif}{fichier=#FICHIER}>11 <INCLURE{fond=prive/squelettes/inclure/image_exif}{fichier=#FICHIER}> 12 12 </div> 13 13 14 14 <div style="position: fixed; width: 258px; bottom: 40px; left: 40px;"> 15 <INCLURE{fond= inc_histogramme}{fichier=#FICHIER}>15 <INCLURE{fond=prive/squelettes/inclure/image_histogramme}{fichier=#FICHIER}> 16 16 </div> 17 17 </div>
Note: See TracChangeset
for help on using the changeset viewer.