diff --git a/ecrire/articles.php3 b/ecrire/articles.php3 index 7357e84c2abdbf055db667cce8e86fef223b8053..575bb7fa19e018d266cf26aea488e2c0bcf64717 100644 --- a/ecrire/articles.php3 +++ b/ecrire/articles.php3 @@ -1207,9 +1207,19 @@ if ($connect_statut == '0minirezo' AND acces_rubrique($rubrique_article)) { echo "\n\n<DIV align=justify>"; -echo "<B>"; -echo justifier(propre($chapo)); -echo "</B>\n\n"; +if (substr($chapo, 0, 1) == '=') { + $chapo = substr($chapo, 1, strlen($chapo)); + debut_boite_info(); + echo "<B>Article virtuel.</b> "; + echo "Cet article correspond à l'adresse :"; + echo "<center>$chapo</center>"; + fin_boite_info(); +} +else { + echo "<B>"; + echo justifier(propre($chapo)); + echo "</B>\n\n"; +} echo justifier(propre($texte)); diff --git a/ecrire/inc_texte.php3 b/ecrire/inc_texte.php3 index 97a0c488ef979d534ea24d4a8d52ad57e89f6a38..1ae94ff0f837b9afaa3c88bd3b48cc233ee6b9a5 100644 --- a/ecrire/inc_texte.php3 +++ b/ecrire/inc_texte.php3 @@ -65,6 +65,15 @@ function ereg_remplace($cherche_tableau, $remplace_tableau, $texte) { return $texte; } +// Ne pas afficher le chapo si article virtuel +function nettoyer_chapo($chapo){ + if (substr($chapo,0,1) == "="){ + $chapo = ""; + } + return $chapo; +} + + // // vignette pour les documents lies // diff --git a/inc-calcul-squel.php3 b/inc-calcul-squel.php3 index 48578bf41382eb39f95782254ed16f0d3b8ab38c..cc9132b2697285f0cb42384279cb9be9b9e7ad2b 100644 --- a/inc-calcul-squel.php3 +++ b/inc-calcul-squel.php3 @@ -833,6 +833,13 @@ function parser($texte) { $champs_traitement[$val][] = 'typo'; } + // Chapo : ne pas l'afficher si article virtuel + $c = array('CHAPO'); + reset($c); + while (list(, $val) = each($c)) { + $champs_traitement[$val][] = 'nettoyer_chapo'; + } + // Textes longs : ajouter le traitement typographique + mise en forme $c = array('DESCRIPTIF', 'CHAPO', 'TEXTE', 'PS', 'BIO', 'MESSAGE'); reset($c);