[spip-dev] champs sup

je vient d'essayer les champs sup...impec...good idea

Salut,

                  je vient d'essayer les champs sup...impec...good idea

Je viens d'essayer aussi et j'ai, dans l'espace privé :

<<<
Warning : Missing argument 2 for supplement_affichage() in /home/longplay/www/spip/ecrire/inc_supplement.php3 on line 90

Warning : Variable passed to each() is not an array or object in /home/longplay/www/spip/ecrire/inc_supplement.php3 on line 91

après avoir validé un article qui contient un champ supplémentaire. Mon mes_options.php3 contient :

<<<
function champs_supplement($type, $id_objet, $ensemble) {
  if ($type == "auteur") {
    return Array (
      "sexe" => "ligne|brut",
      "age" => "ligne|propre|&Acirc;ge du capitaine",
      "biblio" => "bloc|propre|Bibliographie"
    );
  }

// if ($type == "article" && $ensemble == 7) {
  if ($type == "article") {
    return array(
      "isbn" => "ligne|typo|I.S.B.N."
    );
  }

  // par defaut, aucun champ supplementaire.
  return array();
}

Dans l'espace public, après rajout de :

<<<
[<div class="suppl">(#SUPPLEMENT)</div>]

dans le squelette de l'article, j'obtiens :

<<<

Une idée ?

Merci,

Gilles.

Je viens d'essayer aussi et j'ai, dans l'espace privé :
Warning : Missing argument 2 for supplement_affichage() in /home/longplay/www/spip/ecrire/inc_supplement.php3 on line 90

Hum, oui, j'ai hésité au milieu et j'ai laissé des bugs. Reprends
ecrire/articles.php3 et ecrire/auteurs_edit.php3

-- Fil

Je viens d'essayer aussi et j'ai, dans l'espace privé :
Warning : Missing argument 2 for supplement_affichage() in
/home/longplay/www/spip/ecrire/inc_supplement.php3 on line 90

Hum, oui, j'ai hésité au milieu et j'ai laissé des bugs. Reprends
ecrire/articles.php3 et ecrire/auteurs_edit.php3

C'est fait et ça marche parfaitement. Merci.

Gilles.