Documentation du code de SPIP et de ses plugins

TextWheel pour SPIP

Notes

Table of Contents

Constants

_NOTES_FERME_NOTE  = ']&nbsp;</span>'
_NOTES_FERME_REF  = ']</span>'
_NOTES_OUVRE_NOTE  = '<span class="spip_note_ref">['
_NOTES_OUVRE_REF  = '<span class="spip_note_ref">&nbsp;['
_NOTES_RACCOURCI  = ',\\[\\[(\\s*(<([^>\'"]*)>)?(.*?))\\]\\],msS'

Functions

inc_notes_dist()  : string|array<string|int, mixed>
Empile ou dépile des notes de bas de page
traiter_raccourci_notes()  : mixed
traiter_les_notes()  : mixed

Constants

_NOTES_FERME_NOTE

public mixed _NOTES_FERME_NOTE = ']&nbsp;</span>'

_NOTES_FERME_REF

public mixed _NOTES_FERME_REF = ']</span>'

_NOTES_OUVRE_NOTE

public mixed _NOTES_OUVRE_NOTE = '<span class="spip_note_ref">['

_NOTES_OUVRE_REF

public mixed _NOTES_OUVRE_REF = '<span class="spip_note_ref">&nbsp;['

_NOTES_RACCOURCI

public mixed _NOTES_RACCOURCI = ',\\[\\[(\\s*(<([^>\'"]*)>)?(.*?))\\]\\],msS'

Functions

inc_notes_dist()

Empile ou dépile des notes de bas de page

inc_notes_dist(bool|string|array<string|int, mixed> $arg[, string $operation = 'traiter' ][, bool $ignorer_autobr = false ]) : string|array<string|int, mixed>

Point d'entrée pour la gestion des notes.

Parameters
$arg : bool|string|array<string|int, mixed>

Argument :

  • true : empiler l'etat courant, initialiser un nouvel état
  • false : restaurer l'état précédent, dénonce un état courant perdu
  • chaîne : on y recherche les notes et on les renvoie en tableau
  • tableau : texte de notes à rajouter dans ce qu'on a déjà

Ce dernier cas retourne la composition totale, en particulier, envoyer un tableau vide permet de tout récupérer.

$operation : string = 'traiter'

En complément du format attendu dans $arg, on indique ici le type d'oopétation à réaliser (traiter | empiler | depiler | sauver_etat | restaurer_etat | contexter_cache)

$ignorer_autobr : bool = false

True pour ne pas prendre en compte les retours à la ligne comme des tags br (mais 2 à la suite font un paragraphe tout de même).

Tags
note

C'est stocké dans la globale $les_notes, mais pas besoin de le savoir

Return values
string|array<string|int, mixed>

traiter_raccourci_notes()

traiter_raccourci_notes(mixed $letexte, mixed $marqueur_notes) : mixed
Parameters
$letexte : mixed
$marqueur_notes : mixed

traiter_les_notes()

traiter_les_notes(mixed $notes, mixed $ignorer_autobr) : mixed
Parameters
$notes : mixed
$ignorer_autobr : mixed

        
On this page

Search results