You know how if you put external links as URLs in brackets without any link text, they'll be rendered as [1], [2], etc.? https://www.mediawiki.org/wiki/Help:Links#External_links
How do I start the numbering at [0]? Some programmer types think all numbering systems should start with 0, so it bothers them that it automatically starts with 0. Thanks.
Some programmer types think all numbering systems should start with 0, so it bothers them that it automatically starts with 0.
Meant to say, it bothers them that it automatically starts with 1.
Anyway, here's what I came up with. Edit clearState() in Parser.php, put:
global $wgOverrideAutonumberOnTitles; $prefixed = $this->getTitle()->getPrefixedText(); $this->firstCallInit(); $this->resetOutput(); $this->mAutonumber = 0; if ( isset( $wgOverrideAutonumberOnTitles[$prefixed] ) ) { $this->mAutonumber = $wgOverrideAutonumberOnTitles[$prefixed]; }
Edit LocalSettings.php, put:
$wgOverrideAutonumberOnTitles = ['ExamplePage' => -1 ];
Then on ExamplePage the numbering will start at 0.
mediawiki-l@lists.wikimedia.org