[SPIP Zone] r4702 - /_plugins_branche_stable_/_spip_1_9_0_/ancres_intertitres/ancres_intertitres.php

Author: james@rezo.net
Date: Sat Aug 19 02:19:04 2006
New Revision: 4702

Log:
une bricole

Modified:
    _plugins_branche_stable_/_spip_1_9_0_/ancres_intertitres/ancres_intertitres.php

Modified: _plugins_branche_stable_/_spip_1_9_0_/ancres_intertitres/ancres_intertitres.php

--- _plugins_branche_stable_/_spip_1_9_0_/ancres_intertitres/ancres_intertitres.php (original)
+++ _plugins_branche_stable_/_spip_1_9_0_/ancres_intertitres/ancres_intertitres.php Sat Aug 19 02:19:04 2006
@@ -36,7 +36,7 @@
       if (strlen($url) < 2) $url = "ancre$cId";
     }
     AncresIntertitres_table_matiere('', $url, $matches[1]);
- return '{{{ ['.$url.'<-] '.$matches[1].' [<html><img title="'._T('tdm:retour_table_matiere').'" alt="'._T('tdm:retour_table_matiere').'" src="'.find_in_path('tdm.png').'" /></html>->#'.$ancre_retour.'] }}}';
+ return '{{{ ['.$url.'<-] '.$matches[1].' <a href="#'.$ancre_retour.'"><img title="'._T('tdm:retour_table_matiere').'" alt="'._T('tdm:retour_table_matiere').'" src="'.find_in_path('tdm.png').'" /></a> }}}';
   }
   
   function AncresIntertitres_table_matiere($mode = '', $url = '', $titre ='') {
@@ -46,12 +46,12 @@
     return '';
   }
   
- function AncresIntertitres_compose_table_matiere($table_matiere) {
+ function AncresIntertitres_compose_table_matiere($table_matiere, $ancre_retour = "tdm") {
     $texte = '';
     if(!empty($table_matiere))
       foreach($table_matiere as $url => $titre)
         $texte .= "\t".'<li><a href="#'.$url.'">'.$titre.'</a></li>'."\n";
- return $texte ? '<ul id="tdm">'."\n".$texte.'</ul>' : '';
+ return $texte ? '<ul id="'.$ancre_retour.'">'."\n".$texte.'</ul>' : '';
   }
   
?>