Extension:AutoCreateTalkPage

The AutoCreateTalkPage extension does just what the name implies: it automatically creates a talk page. This uses the ArticleInsertComplete hook, and determines if the page being created is in the Main namespace; if it is, this extension automatically creates the corresponding talk page.

Versions
The extension was written on a MediaWiki at version 1.15.2. The code uses some very basic functions that have probably existed forever, so it is quite likely that this works with just about any older version (at least since 1.6, when the ArticleInsertComplete hook was introduced). Feel free to try, but don't complain if it fails, which is unlikely.

Configuration

 * 1) Copy the code block below into a file, AutoCreateTalkPage.php, and put that file in the extensions directory.
 * 2) Add the following line to LocalSettings.php:

Customization
When a new page is created, the defaults are to add the "talk page" template to the page, with an edit summary of Page automatically created by extension AutoCreateTalkPage. These can be changed; to customize the text, you can edit these lines in the file:

I could have (should have?) created variables for those, but this is such a simple extension it didn't seem right to make things more complicated than they are.

Future features
This is a simple extension; I do not plan to work on it after this. If you require things like...
 * Other namespaces
 * Custom messages for other namespaces
 * Checks for permissions

... well these are all good ideas, but you should be able to modify the code to your needs. Again, this is a quite simple extension; hopefully you'll be able to modify it as necessary if it doesn't currently do things you need.