diff --git a/ecrire/action/tester.php b/ecrire/action/tester.php index 78bc845c2ef27e39a228a015bb433896fb3d2bef..f9c681b35291df27359378cf1d5e0564b4b5f665 100644 --- a/ecrire/action/tester.php +++ b/ecrire/action/tester.php @@ -137,6 +137,6 @@ function action_tester_dist() { } # image echec - redirige_par_entete(_DIR_IMG_PACK . 'puce-rouge-anim.gif'); + redirige_par_entete(chemin_image('puce-rouge-anim.gif')); } ?> diff --git a/ecrire/action/tester_taille.php b/ecrire/action/tester_taille.php index 48365ebd91e3742ce099a7b99aa8d8cfa43d0fd4..7c84ae29d68d9aa77af9e821c964c2ad9bd2e987 100644 --- a/ecrire/action/tester_taille.php +++ b/ecrire/action/tester_taille.php @@ -24,7 +24,7 @@ function action_tester_taille_dist() { $max_size_echec = isset($GLOBALS['meta']['max_taille_vignettes_echec'])?$GLOBALS['meta']['max_taille_vignettes_echec']:0; $max_size_test = isset($GLOBALS['meta']['max_taille_vignettes_test'])?$GLOBALS['meta']['max_taille_vignettes_test']:0; $taille = intval(_request('arg')); - $file = _DIR_IMG_PACK . 'jauge-vert.gif'; + $file = chemin_image('jauge-vert.gif'); $file_size = 94; if (($s = $taille*$taille)>$max_size){ @@ -48,7 +48,7 @@ function action_tester_taille_dist() { include_spip('inc/documents'); $dummy = propre("<doc1>"); - $image_source = _DIR_IMG_PACK."test.png"; + $image_source = chemin_image("test.png"); $res = sql_select("valeur", "spip_meta", "nom='max_taille_vignettes_test'"); if ($row = sql_fetch($res)) $max_size_test = $row['valeur']; @@ -72,7 +72,7 @@ function action_tester_taille_dist() { if (!$max_size_echec OR $s < $max_size_echec) ecrire_meta('max_taille_vignettes_echec',$taille*$taille,'non'); # image echec - $file = _DIR_IMG_PACK . 'jauge-rouge.gif'; + $file = chemin_image('jauge-rouge.gif'); $file_size = 84; } } diff --git a/ecrire/configuration/reducteur.php b/ecrire/configuration/reducteur.php index e55264989b7b0b259d70ec82f6427582697287ac..85583b4136db1b28ccdf65aabcf76d2f274487cd 100644 --- a/ecrire/configuration/reducteur.php +++ b/ecrire/configuration/reducteur.php @@ -115,7 +115,7 @@ function format_choisi() if ($GLOBALS['meta']['image_process']=='gd1' OR $GLOBALS['meta']['image_process']=='gd2') { $res .= "<p>"._T('info_taille_maximale_images')."</p>"; - $res .= "<div dir='ltr' id='teste_memory_size_gd' style='text-align:left;float:$spip_lang_right;width:196px;background:url("._DIR_IMG_PACK . "jauge-test-gd.gif) no-repeat top left;'>"; + $res .= "<div dir='ltr' id='teste_memory_size_gd' style='text-align:left;float:$spip_lang_right;width:196px;background:url(". chemin_image('jauge-test-gd.gif') . ") no-repeat top left;'>"; $max_size = isset($GLOBALS['meta']['max_taille_vignettes'])?$GLOBALS['meta']['max_taille_vignettes']:(500*500); $max_size_echec = isset($GLOBALS['meta']['max_taille_vignettes_echec'])?$GLOBALS['meta']['max_taille_vignettes_echec']:0; $max_size_test = isset($GLOBALS['meta']['max_taille_vignettes_test'])?$GLOBALS['meta']['max_taille_vignettes_test']:0; @@ -135,7 +135,7 @@ function format_choisi() $top -= 8; for ($i = 480;$i*$i<$max_size && $i<=$maxtest;$i+=$j) $lok += $l; if ($lok-$l+2>0) - $res .= "<img src='"._DIR_IMG_PACK . 'jauge-vert.gif'."' width='".($lok-$l+2)."' style='margin-right:".($l-2)."px;' height='8' alt='' />"; + $res .= "<img src='". chemin_image('jauge-vert.gif') . "' width='".($lok-$l+2)."' style='margin-right:".($l-2)."px;' height='8' alt='' />"; for (;(!$max_size_echec OR $i*$i<$max_size_echec) && $i<=$maxtest;$i+=$j){ if (!isset($test[$i])){ $url = generer_url_action("tester_taille", "arg=$i&time=$time"); @@ -146,7 +146,7 @@ function format_choisi() else $margin_left += $l; } for (;$i<=$maxtest;$i+=$j) $lbad += $l; - if ($lbad) $res .= "<img src='"._DIR_IMG_PACK . 'jauge-rouge.gif'."' width='$lbad' height='8' style='margin-left:{$margin_left}px;' alt='' />"; + if ($lbad) $res .= "<img src='" . chemin_image('jauge-rouge.gif') . "' width='$lbad' height='8' style='margin-left:{$margin_left}px;' alt='' />"; $res .= "</div>"; } $res .= "</div><br style='clear:both;' />"; diff --git a/ecrire/exec/admin_effacer.php b/ecrire/exec/admin_effacer.php index 1044f2745b2ce7e6e2106345e04a05420231498c..225e7425e51b3d8581163a41468857ede0218735 100644 --- a/ecrire/exec/admin_effacer.php +++ b/ecrire/exec/admin_effacer.php @@ -55,7 +55,7 @@ function exec_admin_effacer_dist() $res = generer_form_ecrire('delete_all', $res, '', _T('bouton_effacer_tout')); echo - '<img src="' . _DIR_IMG_PACK . 'warning.gif" alt="', + '<img src="' . chemin_image('warning.gif') . '" alt="', _T('info_avertissement'), "\" style='width: 48px; height: 48px; float: right;margin: 10px;' />", _T('texte_admin_effacer_01'), @@ -76,7 +76,7 @@ function exec_admin_effacer_dist() $res = generer_form_ecrire('delete_statistiques', "", '', _T('bouton_effacer_statistiques')); echo - '<img src="' . _DIR_IMG_PACK . 'warning.gif" alt="', + '<img src="' . chemin_image('warning.gif') . '" alt="', _T('info_avertissement'), "\" style='width: 48px; height: 48px; float: right;margin: 10px;' />", _T('texte_admin_effacer_stats'), diff --git a/ecrire/exec/admin_plugin.php b/ecrire/exec/admin_plugin.php index 02bcbc19589f89ce86ac5eabd7da77c6b85f7803..515a21a5c5848e0c2e137574ad8a3063be5fbbfb 100644 --- a/ecrire/exec/admin_plugin.php +++ b/ecrire/exec/admin_plugin.php @@ -48,10 +48,10 @@ function exec_admin_plugin_dist($retour='') { echo debut_boite_info(true); $s = ""; $s .= _T('info_gauche_admin_tech'); - $s .= "<p><img src='"._DIR_IMG_PACK . "puce-verte.gif' width='9' height='9' alt='' /> "._T('plugin_etat_stable')."</p>"; - $s .= "<p><img src='"._DIR_IMG_PACK . "puce-orange.gif' width='9' height='9' alt='' /> "._T('plugin_etat_test')."</p>"; - $s .= "<p><img src='"._DIR_IMG_PACK . "puce-poubelle.gif' width='9' height='9' alt='' /> "._T('plugin_etat_developpement')."</p>"; - $s .= "<p><img src='"._DIR_IMG_PACK . "puce-rouge.gif' width='9' height='9' alt='' /> "._T('plugin_etat_experimental')."</p>"; + $s .= "<p><img src='". chemin_image('puce-verte.gif') . "' width='9' height='9' alt='' /> "._T('plugin_etat_stable')."</p>"; + $s .= "<p><img src='". chemin_image('puce-orange.gif') . "' width='9' height='9' alt='' /> "._T('plugin_etat_test')."</p>"; + $s .= "<p><img src='". chemin_image('puce-poubelle.gif') . "' width='9' height='9' alt='' /> "._T('plugin_etat_developpement')."</p>"; + $s .= "<p><img src='". chemin_image('puce-rouge.gif') . "' width='9' height='9' alt='' /> "._T('plugin_etat_experimental')."</p>"; echo $s; echo fin_boite_info(true); @@ -354,10 +354,10 @@ function ligne_plug($plug_file, $actif, $id){ $id = substr(md5("aide_$plug_file"),0,8); $puce_etat = array( - "dev"=>"<img src='"._DIR_IMG_PACK . "puce-poubelle.gif' width='9' height='9' alt='dev' />", - "test"=>"<img src='"._DIR_IMG_PACK . "puce-orange.gif' width='9' height='9' alt='dev' />", - "stable"=>"<img src='"._DIR_IMG_PACK . "puce-verte.gif' width='9' height='9' alt='dev' />", - "experimental"=>"<img src='"._DIR_IMG_PACK . "puce-rouge.gif' width='9' height='9' alt='dev' />", + "dev"=>"<img src='". chemin_image('puce-poubelle.gif') . "' width='9' height='9' alt='dev' />", + "test"=>"<img src='". chemin_image('puce-orange.gif') . "' width='9' height='9' alt='dev' />", + "stable"=>"<img src='". chemin_image('puce-verte.gif') . "' width='9' height='9' alt='dev' />", + "experimental"=>"<img src='". chemin_image('puce-rouge.gif') . "' width='9' height='9' alt='dev' />", ); if (isset($puce_etat[$etat])) diff --git a/ecrire/exec/aide_index.php b/ecrire/exec/aide_index.php index a51ce28c2f6acdc479c0bc9ba145923236a39847..b2b4ae39eda3ce43868a8902e34ad0c207d6dfea 100644 --- a/ecrire/exec/aide_index.php +++ b/ecrire/exec/aide_index.php @@ -139,8 +139,8 @@ table.spip td { function help_panneau() { return "<div align='center'> - <img src='" . _DIR_IMG_PACK. - "logo-spip.gif' alt='SPIP' style='width: 267px; height: 170px; border: 0px' /> + <img src='" . chemin_image('logo-spip.gif') . + "' alt='SPIP' style='width: 267px; height: 170px; border: 0px' /> <br /> <div align='center' style='font-variant: small-caps;'> Système de publication pour l'Internet @@ -246,7 +246,7 @@ define('AIDE_STYLE_MENU', '<style type="text/css"> float: '.$GLOBALS['spip_lang_left'].'; text-align: '.$GLOBALS['spip_lang_left'].'; width: 80%; - background: ' . "url(" . _DIR_IMG_PACK . 'triangle'.$GLOBALS['spip_lang_rtl'].'.gif) ' . $GLOBALS['spip_lang_left'].' center no-repeat; + background: ' . "url(" . chemin_image('triangle'.$GLOBALS['spip_lang_rtl'].'.gif') . ') ' . $GLOBALS['spip_lang_left'].' center no-repeat; margin: 2px; padding: 0px; padding-'.$GLOBALS['spip_lang_left'].': 20px; @@ -257,7 +257,7 @@ define('AIDE_STYLE_MENU', '<style type="text/css"> float: '.$GLOBALS['spip_lang_right'].'; text-align: '.$GLOBALS['spip_lang_right'].'; width: 80%; - background: ' . "url(" . _DIR_IMG_PACK . 'triangle'.$GLOBALS['spip_lang_rtl'].'.gif) ' . $GLOBALS['spip_lang_right'].' center no-repeat; + background: ' . "url(" . chemin_image('triangle'.$GLOBALS['spip_lang_rtl'].'.gif') . ') ' . $GLOBALS['spip_lang_right'].' center no-repeat; margin: 4px; padding: 0px; padding-'.$GLOBALS['spip_lang_right'].': 20px; diff --git a/ecrire/exec/articles_tous.php b/ecrire/exec/articles_tous.php index a1bce49b1cc683cf6b67589c5cff32d67b31ae81..5d4cabd5a3c50caaf914c6bc9af85d8c2bc4c3f4 100644 --- a/ecrire/exec/articles_tous.php +++ b/ecrire/exec/articles_tous.php @@ -45,8 +45,8 @@ function exec_articles_tous_args($id_rubrique, $aff_art, $sel_lang, $var_ajaxcha $commencer_page = charger_fonction('commencer_page', 'inc'); echo $commencer_page(_T('titre_page_articles_tous'), "accueil", "tout-site"); - echo http_script('var img_deplierhaut = "'._DIR_IMG_PACK.'noeud_plus.gif"; -var img_deplierbas = "'._DIR_IMG_PACK.'noeud_moins.gif";'); + echo http_script('var img_deplierhaut = "'. chemin_image('noeud_plus.gif') .'"; +var img_deplierbas = "'. chemin_image('noeud_moins.gif') . '";'); echo http_script('', 'dragdrop_interface.js'); echo http_script('', 'articles_tous_edite.js'); @@ -333,7 +333,7 @@ function afficher_rubriques_filles(&$article, &$enfant, &$text_article, $id_pare $out .= "<li id='rubrique-$id_rubrique' class='treeItem " . (($id_parent==0)?"sec":"rub") . "'>" . - //$lesenfants?'<img src="'._DIR_IMG_PACK.'deplierhaut.gif" class="expandImage" />':'' . + //$lesenfants?'<img src="'. chemin_image('deplierhaut.gif') .'" class="expandImage" />':'' . "<span class='holder icone'> </span><a href='" . generer_url_ecrire("naviguer","id_rubrique=$id_rubrique") . "' class='titre'>$titre</a>"; diff --git a/ecrire/exec/brouteur_frame.php b/ecrire/exec/brouteur_frame.php index b038409c50b08b3a2e7958e7f35e9757eabe917e..9d29d6ede8015c85267555eb1cf6ce4082ef55b4 100644 --- a/ecrire/exec/brouteur_frame.php +++ b/ecrire/exec/brouteur_frame.php @@ -249,7 +249,7 @@ function exec_brouteur_frame_dist() { function frame_background_image($f) { return "background-image: url(" . - _DIR_IMG_PACK . $f . + chemin_image($f) . ")"; } ?> diff --git a/ecrire/exec/messagerie.php b/ecrire/exec/messagerie.php index da0c48b922136ec36421ee2b5882100e00610c89..8dad6a15e95ef7318093c86dbb2c6a4d10ce0ab0 100644 --- a/ecrire/exec/messagerie.php +++ b/ecrire/exec/messagerie.php @@ -115,7 +115,7 @@ if (sql_count($result) > 0) { $id_auteur = $row['id_auteur']; $nom = typo($row["nom"]); $total = $row["total"]; - echo "<div class='tr_liste'\nonmouseover=\"changeclass(this,'tr_liste_over');\"\nonmouseout=\"changeclass(this,'tr_liste');\"\nstyle='padding: 2px; padding-left: 10px; border-bottom: 1px solid #cccccc;'><div class='verdana1'><img src='" . _DIR_IMG_PACK . "redac-12.gif'\nstyle='border: 0px' alt=' ' /> <a href='" . generer_url_ecrire("auteur_infos","id_auteur=$id_auteur"), "'>", + echo "<div class='tr_liste'\nonmouseover=\"changeclass(this,'tr_liste_over');\"\nonmouseout=\"changeclass(this,'tr_liste');\"\nstyle='padding: 2px; padding-left: 10px; border-bottom: 1px solid #cccccc;'><div class='verdana1'><img src='" . chemin_image('redac-12.gif') . "'\nstyle='border: 0px' alt=' ' /> <a href='" . generer_url_ecrire("auteur_infos","id_auteur=$id_auteur"), "'>", $nom, "</a> ($total)</div></div>"; if ($count == ceil(sql_count($result)/2)) echo "</td><td valign='top' style='width: 50%'>"; diff --git a/ecrire/exec/rechercher.php b/ecrire/exec/rechercher.php index 946ef95f7f82572316fea3cae02e2b296d50c261..d5eeb548c774af74c78a47067a18c100258e48e9 100644 --- a/ecrire/exec/rechercher.php +++ b/ecrire/exec/rechercher.php @@ -85,7 +85,7 @@ function exec_rechercher_args($id, $type, $exclus, $rac, $do) if ($points) { arsort($points); - $style = " style='background-image: url(" . _DIR_IMG_PACK . "secteur-12.gif)'"; + $style = " style='background-image: url(" . chemin_image('secteur-12.gif') . ")'"; foreach($rub as $k => $v) { $rub[$k]['atts'] = ($v["id_parent"] ? $style : '') . " class='arial11 petite-rubrique'"; diff --git a/ecrire/exec/statistiques_lang.php b/ecrire/exec/statistiques_lang.php index 9aa166ee6a6d52f816f096e0f4b62165d29b2c31..c95c7c1f108db426f15f8e0ffcf83bca1dcebe51 100644 --- a/ecrire/exec/statistiques_lang.php +++ b/ecrire/exec/statistiques_lang.php @@ -99,8 +99,8 @@ function statistiques_lang_ok() echo "<td style='border-bottom: 1px solid #cccccc;'>"; echo "\n<table cellpadding='0' cellspacing='0' border='0' width='".($taille+5)."'>"; echo "\n<tr><td style='align:$spip_lang_right; background-color: #eeeeee; border: 1px solid #999999; white-space: nowrap;'>"; - if ($visites_abs > 0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' width='$visites_abs' height='8' alt=' ' />"; - if ($visites>0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' class='couleur_langue' style='border: 0px;' width='$visites' height='8' alt=' ' />"; + if ($visites_abs > 0) echo "<img src='" . chemin_image('rien.gif') . "' width='$visites_abs' height='8' alt=' ' />"; + if ($visites>0) echo "<img src='" . chemin_image('rien.gif') . "' class='couleur_langue' style='border: 0px;' width='$visites' height='8' alt=' ' />"; echo "</td></tr></table>\n"; echo "</td>"; diff --git a/ecrire/exec/statistiques_repartition.php b/ecrire/exec/statistiques_repartition.php index 57eec27a373802b8f664d050f1dd3cfe0ff47340..385b0c6cfe4d0b3201fb4111866dc37507296f09 100644 --- a/ecrire/exec/statistiques_repartition.php +++ b/ecrire/exec/statistiques_repartition.php @@ -107,9 +107,9 @@ function enfants_aff($id_parent,$decalage, $critere, $gauche=0) { if ($gauche > 0) echo "<td style='width: " .$gauche."px'></td>"; echo "\n<td style='border: 0px; white-space: nowrap;'>"; echo "<div style='border: 1px solid #999999; background-color: #dddddd; height: 12px; padding: 0px; margin: 0px;'>"; - if ($visites_abs > 0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' style='vertical-align: top; height: 12px; border: 0px; width: ".$visites_abs."px;' alt= ' '/>"; - if ($largeur_rouge>0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' class='couleur_cumul' style='vertical-align: top; height: 12px; border: 0px; width: " . $largeur_rouge . "px;' alt=' ' />"; - if ($largeur_vert>0) echo "<img src='" . _DIR_IMG_PACK . "rien.gif' class='couleur_nombre' style='vertical-align: top; width: " . $largeur_vert ."px; height: 12px; border: 0px' alt=' ' />"; + if ($visites_abs > 0) echo "<img src='" . chemin_image('rien.gif') . "' style='vertical-align: top; height: 12px; border: 0px; width: ".$visites_abs."px;' alt= ' '/>"; + if ($largeur_rouge>0) echo "<img src='" . chemin_image('rien.gif') . "' class='couleur_cumul' style='vertical-align: top; height: 12px; border: 0px; width: " . $largeur_rouge . "px;' alt=' ' />"; + if ($largeur_vert>0) echo "<img src='" . chemin_image('rien.gif') . "' class='couleur_nombre' style='vertical-align: top; width: " . $largeur_vert ."px; height: 12px; border: 0px' alt=' ' />"; echo "</div>"; echo "</td></tr></table>\n"; echo "</td></tr></table>"; diff --git a/ecrire/exec/statistiques_svg.php b/ecrire/exec/statistiques_svg.php index adb4cb5bdd42221b4ab042e0b79fce0f3a4492b4..9885ae690467aeab9bc3c8bd965ad3beb37c55e2 100644 --- a/ecrire/exec/statistiques_svg.php +++ b/ecrire/exec/statistiques_svg.php @@ -195,10 +195,10 @@ function exec_statistiques_svg_ok($id_article, $aff_jours, $visites_today, $exp if ($difference > 0) { - //echo "<img src='" . _DIR_IMG_PACK . "rien.gif' width=$largeur height=1 style='background-color:#333333;' title=$tagtitle>"; - //echo "<img src='" . _DIR_IMG_PACK . "rien.gif' width=$largeur height=$hauteur_moyenne title=$tagtitle>"; + //echo "<img src='" . chemin_image('rien.gif') . "' width=$largeur height=1 style='background-color:#333333;' title=$tagtitle>"; + //echo "<img src='" . chemin_image('rien.gif') . "' width=$largeur height=$hauteur_moyenne title=$tagtitle>"; } - //echo "<img src='" . _DIR_IMG_PACK . "rien.gif' width=$largeur height=1 style='background-color:black;' title=$tagtitle>"; + //echo "<img src='" . chemin_image('rien.gif') . "' width=$largeur height=1 style='background-color:black;' title=$tagtitle>"; //echo "</td>"; $n++; } diff --git a/ecrire/inc_version.php b/ecrire/inc_version.php index 263f5e40adf3fa16132c4621c3bbf621335ff256..1fbe47fe9823eb20c6b787427b47c24ed2b4b5cb 100644 --- a/ecrire/inc_version.php +++ b/ecrire/inc_version.php @@ -31,15 +31,17 @@ define('_DIR_RESTREINT', define('_DIR_RACINE', _DIR_RESTREINT ? '' : '../'); // Icones +# nom du dossier images +define('_NOM_IMG_PACK', 'images/'); # le chemin http (relatif) vers les images standard -define('_DIR_IMG_PACK', (_DIR_RACINE . 'dist/images/')); +define('_DIR_IMG_PACK', (_DIR_RACINE . 'dist/' . _NOM_IMG_PACK)); # le chemin des vignettes de type de document define('_DIR_IMG_ICONES_DIST', _DIR_RACINE . "dist/vignettes/"); # le chemin des icones de la barre d'edition des formulaires define('_DIR_IMG_ICONES_BARRE', _DIR_RACINE . "dist/icones_barre/"); # le chemin php (absolu) vers les images standard (pour hebergement centralise) -define('_ROOT_IMG_PACK', dirname(dirname(__FILE__)) . '/dist/images/'); +define('_ROOT_IMG_PACK', dirname(dirname(__FILE__)) . '/dist/' . _NOM_IMG_PACK); define('_ROOT_IMG_ICONES_DIST', dirname(dirname(__FILE__)) . '/dist/vignettes/'); # le nom du repertoire des bibliotheques JavaScript diff --git a/ecrire/install/etape_.php b/ecrire/install/etape_.php index 11c683caf3d3f1d9d13b795f173fd7c98b01555b..309d43326357cd8f41e171f723869098ee328bbf 100644 --- a/ecrire/install/etape_.php +++ b/ecrire/install/etape_.php @@ -22,7 +22,7 @@ function install_etape__dist() } else { include_spip('inc/presentation'); // pour info_copyright - $res = "<div><img alt='SPIP' src='" . _DIR_IMG_PACK . "logo-spip2.gif' /></div>\n" . + $res = "<div><img alt='SPIP' src='" . chemin_image('logo-spip2.gif') . "' /></div>\n" . "<div class='petit-centre'><p>" .info_copyright() ."</p></div>\n" . "<p>" ._T('install_select_langue') ."</p>" . "<div>" .$menu_langues ."</div>\n" .