Yes it is...
kent1
Le 28 juil. 07 à 01:44, james@rezo.net a écrit :
Author: james@rezo.net
Date: Sat Jul 28 01:44:48 2007
New Revision: 13953Log:
ancres_intertitres au placard (si j'ai bien compris le role de _fondation_ ...Added:
_fondation_/ancres_intertitres/
- copied from r13946, _plugins_/_test_/ancres_intertitres/
Removed:
_fondation_/ancres_intertitres/ancres_intertitres.php
_plugins_/_test_/ancres_intertitres/Removed: _fondation_/ancres_intertitres/ancres_intertitres.php
--- _fondation_/ancres_intertitres/ancres_intertitres.php (original)
+++ _fondation_/ancres_intertitres/ancres_intertitres.php (removed)
@@ -1,63 +0,0 @@
-<?php
-
- define("_LG_ANCRE", 35);
-
- function AncresIntertitres_ancres_intertitres($texte) {
- $regexp = "/{{{(.*)}}}/UmsS";
- $texte = preg_replace_callback($regexp,
- create_function('$matches',
- 'return AncresIntertitres_remplace_intertitre($matches);'),
- $texte);
- return $texte;
- }
-
- function AncresIntertitres_lien_de_retour($texte, $ancre_retour = "tdm") {
- $regexp = '/@@RETOUR_TDM@@/S';
- $rempl = '<a href="#'.$ancre_retour.'"><img src="' .
- find_in_path('img_pack/tdm.png') .
- '" alt="' .
- _T('tdm:retour_table_matiere') .
- '" title="' .
- _T('tdm:retour_table_matiere') .
- '" /></a>';
- $texte = preg_replace($regexp, $rempl, $texte);
- return $texte;
- }
-
- function AncresIntertitres_remplace_intertitre($matches) {
- static $cId = 0;
- $cId++;
- $url = translitteration(corriger_caracteres(
- supprimer_tags(supprimer_numero(extraire_multi(trim($matches[1]))))
- ));
- $url = @preg_replace(',[[:punct:][:space:]]+,u', ' ', $url);
- // S'il reste des caracteres non latins, utiliser l'id a la place
- if (preg_match(",[^a-zA-Z0-9 ],", $url)) {
- $url = "ancre$cId";
- }
- else {
- $mots = explode(' ', $url);
- $url = '';
- foreach ($mots as $mot) {
- if (!$mot) continue;
- $url2 = $url.'-'.$mot;
- if (strlen($url2) > _LG_ANCRE) {
- break;
- }
- $url = $url2;
- }
- $url = substr($url, 1);
- if (strlen($url) < 2) $url = "ancre$cId";
- }
- AncresIntertitres_table_matiere('', $url, $matches[1]);
- return '{{{ ['.$url.'<-] '.$matches[1].' @@RETOUR_TDM@@ }}}';
- }
-
- function AncresIntertitres_table_matiere($mode = '', $url = '', $titre ='') {
- static $tableau = array();
- if($mode == 'retour') return $tableau;
- $tableau[$url] = $titre;
- return '';
- }
-
-?>
\ No newline at end of file_______________________________________________
Spip-zone-commit@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-zone-commit
Quentin Drouet
-- -----
Arscenic - Luxembourg
Promotion et diffusion des Arts Numériques et des Nouvelles Scénographies
5, rue de la Montagne – L-4879 Lamadeleine
http://www.arscenic.info - http://www.sklunk.net
tél : +33 (0)616706301
mail: kent1@arscenic.info