Thank you, unfortunately it does not work. I do use a skin of my own and inserted your function there, but to no effect. I also tried ' ' and '-' as a delimiter.
B. PS: Seems to be a good candidate for an extension, however I am unable to do that... -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Platonides Gesendet: Dienstag, 20. Juli 2010 01:54 An: [email protected] Betreff: Re: [Mediawiki-l] short headers in TOC Scheid, Bernhard wrote: > Sounds interesting but a bit arcane. I found the tocLine() function in my > Linker.php, but the problem seems to me how to define/override the $tocline > parameter. > Can you give me some more detailled advice? New skin would be no problem, > btw... > > B. The skins inherit from the linker. You could create a skin (supposing you want it to look like the vector skin) by putting in the appropiate file in the skins folder something like this: require_once "Vector.php"; class SkinBernhard extends SkinVector { var $skinname = 'bernhardtoc'; function tocLine( $anchor, $tocline, $tocnumber, $level, $sectionIndex = false ) { $n = strpos($tocline, ' '); if ($n !== false) $tocline = substr( $tocline, 0, $n ); return parent::tocLine($anchor, $tocline, $tocnumber, $level, $sectionIndex); } } In this case, if the has a double space, the toc only shows the text that appears before that. _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
