Extension:PlaceNewSection

What can this extension do?
This extension introduces two magic words, __ADDNEWSECTIONBELOW__ and __ADDNEWSECTIONABOVE__ that control placement of new talk page sections.

Usage
If __ADDNEWSECTIONBELOW__ is placed on a page, new sections will be added directly below it instead of after the end. Newer sections will be at the top, and older sections at the bottom.

If __ADDNEWSECTIONABOVE__ is used, new sections will be added directly above it, and the order will be reversed (new sections at the bottom, like the MediaWiki default), but anything below this magic word will stay at the bottom.

Mediawiki 1.35+
1.- Download the files of the next repository of github: Download extension

2.- After of the download the files, edit the file "extension.json" and add the next code in the line 12:

3.- Place the file(s) in a directory called  in your   folder.

4.- add the next code to Localsenttigs.php:

MediaWiki 1.19
MediaWiki 1.19 does not need to be patched; it already has the PlaceNewSection hook.

Mediawiki <= 1.18
This extension requires a modification to Article.php in MediaWiki <= 1.17 and WikiPage.php in MediaWiki 1.18 (these files are in the  directory).

Find the  function and this code:

then change it to:

After that cut and paste the code found below and place it in. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation
To install this extension, add the following to LocalSettings.php: