User:Revansx

From MediaWiki.org
Jump to: navigation, search

Hi. I am Rich

As an amateur web-nerd and open-source devotee, I run the semantic mediawikis over at:

I am also the author of the WAMP-based mediawiki extension, MCCP which provides Metrology and Configuration Control functionality to an external database through special pages.

If you wish, you can contact me at:

revansx at gmail dot com

Cheers!
-Rich

[edit] Getting Behavior Switch "Number Headings" in MW1.15.1 with simple hack

fyi, I wanted this feature too (badly) and noticed that much has changed in MW since this hack. Still, you gave me the right idea and I was able to implement it to my satisfaction very easily.

The only file I had to modify was the "includes/MagicWords.php" file as follows:

right below:

        function formatHeadings( $text, $isMain=true ) {
                global $wgMaxTocLevel, $wgContLang, $wgEnforceHtmlIds;

                $doNumberHeadings = $this->mOptions->getNumberHeadings();

I added the following:

                if (! $doNumberHeadings )
                {
                        if ( isset( $this->mDoubleUnderscores['index'] ) ) {
                                $doNumberHeadings = 1;
                        }
                }

you can see that I tied this behavior switch to the already existing called "_INDEX_"

let me know if you know of a more proper way to achieve this feature in MW v1.15.1

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox