Last change
on this file since 66986 was
40946,
checked in by joseph@…, 10 years ago
|
On fait évoluer le plugin avec un formulaire de configuration via CFG.
|
File size:
368 bytes
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | // Génère la table des matières de l'article à partir des intertitres |
---|
4 | |
---|
5 | function dublin_core_tableofcontents ($texte) { |
---|
6 | $table = ''; |
---|
7 | $i = 0; |
---|
8 | preg_match_all('#\{\{\{(.+)\}\}\}#U',$texte,$matches); |
---|
9 | foreach ($matches[1] as $titre) { |
---|
10 | if ($i>0) |
---|
11 | $table .= ' -- '.typo($titre); |
---|
12 | else |
---|
13 | $table .= typo($titre); |
---|
14 | $i++; |
---|
15 | } |
---|
16 | return $table; |
---|
17 | } |
---|
18 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.