[ Index ] |
|
Code source de SPIP 1.9.2c |
1 <?php 2 3 /***************************************************************************\ 4 * SPIP, Systeme de publication pour l'internet * 5 * * 6 * Copyright (c) 2001-2007 * 7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * 8 * * 9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * 10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * 11 \***************************************************************************/ 12 13 if (!defined("_ECRIRE_INC_VERSION")) return; 14 15 // http://doc.spip.org/@inc_chercher_logo_dist 16 function inc_chercher_logo_dist($id, $id_type, $mode='on') { 17 global $formats_logos; 18 # attention au cas $id = '0' pour LOGO_SITE_SPIP : utiliser intval() 19 20 $type = type_du_logo($id_type); 21 $nom = $type . $mode . intval($id); 22 23 foreach ($formats_logos as $format) { 24 if (@file_exists($d = (_DIR_LOGOS . $nom . '.' . $format))) 25 return array($d, _DIR_LOGOS, $nom, $format); 26 } 27 # coherence de type pour servir comme filtre (formulaire_login) 28 return array(); 29 } 30 31 // http://doc.spip.org/@type_du_logo 32 function type_du_logo($id_type) { 33 return isset($GLOBALS['table_logos'][$id_type]) 34 ? $GLOBALS['table_logos'][$id_type] 35 : preg_replace(',^id_,', '', $id_type); 36 } 37 38 // Exceptions standards (historique) 39 global $table_logos; 40 $table_logos = array( 41 'id_article' => 'art', 42 'id_auteur' => 'aut', 43 # 'id_breve' => 'breve', 44 # 'id_mot' => 'mot', 45 'id_syndic'=> 'site', 46 'id_rubrique' => 'rub' 47 ); 48 49 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Wed Nov 21 10:20:27 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |