Extension:DiscussionThreading/doc

Purpose
The thread-like nature of discussions is highly valuable. This extension is a quasi threading adaption for the discussion feature that modifies discussion functionality to be more threadlike:


 * 1) Adds a [new] link onto the header that creates a new comment on the page when used.
 * 2) Adds a [reply] link onto the header that creates a reply to that section.
 * 3) Automatically adds a signature in at the top of the section - preferably in the header bar to show up in TOC
 * 4) Enters the discussion page in the add comment mode (and automatic signature) when new discussion page made

This requires adding 2 new hooks to Linker.php - which requires manual patching. The extension itself includes multiple hooks and the initial setup.

DiscussionThreading Extension Download and Installation
This extension does not require patches for version 1.11 and higher. However, for installations using prior releases, it requires minor patching to linker.php to get the [reply] and [new] tags on the section lines to appear.

DiscussionThread will absolutely not work below 1.6.0, because it requires features added with that release.

The "reply" feature requires modifying the Section line and a new parameter passed to the EditPage from includes/Link.php. This parameter is "replyto=yes" when the user is replying to a previous post.

You can apply this extension either by downloading and copying includes/Link.php into your wiki, or by manual processes below. The referenced packages have the files necessary to implement without editing patches, but only for the following versions:


 * REL1_10_1 (untested)
 * REL1_10
 * REL1_9_3

If you have a version prior to these, you must manually patch.

Download and Installation Instructions for MW Version 1.11 and Later
You can download the current version of DiscussionThreading from the Mediawiki SVN

If you are working with a current version of MW (1.11 or greater), you only need the files in the root structure.
 * 1) Create a new directory extensions/DiscussionThreading
 * 2) Copy the files DiscussionThreading.php and DiscussionThreading.i18n.php into the directory you just created
 * 3) Add the following line to your LocalSettings.php

Download and Install Instructions - MW Versions 1.9.3 - 1.10.0
There are 3 sub-directories that contain already patched versions of linker.php for for versions 1.9.3, 1.10.0, and 1.10.1 which are required. If you have a version prior to that (but >= 1.6.0), you can patch linker.php yourself, but the patches are required.

Use the patched sub-directory FOR YOUR EXACT VERSION instead of the root directory for DiscussionThreading
 * MW 1.9.3
 * MW 1.10.0
 * MW 1.10.1


 * 1) Create a new directory extensions/DiscussionThreading
 * 2) Copy the files DiscussionThreading.php and DiscussionThreading.i18n.php into extensions/DiscussionThreading
 * 3) Select the appropriate Release Directory (NOTE: DO NOT USE THESE UNLESS YOU HAVE THE EXACT RELEASE) and perform ONLY ONE of the following two steps:
 * 4) (before REL1_11 only) Apply the patch file to your existing includes/linker.php file OR;
 * 5) (before REL1_11 only) Copy the included Linker.php</tt> file into your includes</tt> directory, overwriting the existing version (Note:  If you have applied other patches to this file they will be overwritten).
 * 6) Modify your LocalSettings.php by adding the following near other require_once or at the end before the close statement:

If you have executed this properly, you will have the following:


 * DiscussionThreading.php</tt> and DiscussionThreading.i18n.php</tt> moved into $IP/extensions/DiscussionThreading/DiscussionThreading.php</tt>
 * (before REL1_11 only) Either patched Linker.php</tt> or the loaded Linker.php</tt> from the EXACT distribution downloaded release in $IP/includes/</tt>
 * extensions/DiscussionThreading/DiscussionThreading.php</tt> executed from LocalSettings.php

Manual Patching and Installation MW Ver 1.6.0 to 1.9.2

 * 1) Create a new directory extensions/DiscussionThreading</tt>
 * 2) Create a new file extensions/DiscussionThreading/DiscussionThreading.php</tt> and copy and paste the below code
 * 3) Create a new file extensions/DiscussionThreading/DiscussionThreading.i18n.php</tt> and copy and paste the below code
 * 4) (before REL1_11 only) Patch Linker.php</tt> by adding the hooks included in Version 1.11.0 (You can see the patches needed here).
 * 5) Modify LocalSettings.php</tt> by adding the following near other require_once or at the end before the close statement:

There is something very funky about flushing the PHP compiled cache in my environment. I was only able to get the changes made in the Linker.php file to take effect by going to a discussion page while I was logged on as an administrator on the patched server and using a browser local to that machine (press the + tab). Somehow, this caused the .php files to recompile and activate for everyone.

Upgrade from DiscussionThreading Version 0.* to 1.1
Current versions (1_11_0 and later) and trunk eliminate the need for patching. I had to slightly modify the DiscussionThreading.php</tt> file to accomodate. If you are upgrading from DiscussionThreading 0.*, you have to update all three files for DiscussionThreading version 1.1:
 * (before REL1_11 only) includes/Linker.php
 * extensions/DiscussionThreading/DiscussionThreading.php
 * extensions/DiscussionThreading/DiscussionThreading.i18n.php

Upgrading to DiscussionThreading >=1.3 (ONLY IF USING MW Ver <1.11)
Disregard this if you are using MW 1.11 or higher - it doesn't apply. You'll know you're having this problem if you are on a version of MW below 1.11 try and upgrade to DiscussionThreading 1.2 or greater and have problems. If you examine the error logs it will tell you there's no such function as wfLoadExtensionMessages. MW Version 1.11 and greater use a different mechanism for internationalisation than prior versions (wfLoadExtensionMessages).

This extension was patched in version 1.3 to allow use before and after MW 1.11

If you move to 1.3 and stay on a version of MW below 1.11 you will have to manually load the internationalisation in your LocalSettings.php as follows:

Patches Required
To do this, have to patch the following (instructions are for 1.10.0, future or past releases will, of course vary with line numbers and locations):

DiscussionThreading Extension
extensions/DiscussionThreading.php</tt>

This extension implements a discussion threading process. This threading will only be seen on the talk pages, unless explicity invoked in the command line.

It adds a [reply] link on the header line. Each time a new posting is entered or a posting is replied to, the comment will automatically be tagged (and appear in the TOC too). Of course direct editing can occur, but this really makes it a lot easier to organize discussions in a threading view that most are familiar with.

To do:
 * 1) get someone who knows regex to clean up the parsing of the subject line
 * 2) Assess to see if there's an easier way to do this

Internationalisation file DiscussionThreading.i18n.php
I was only completely comfortable with the English translations - looking to others to help me put the correct language translations in.

I would deeply appreciate your help here.

Load into file (in extension DiscussionThreading.i18n.php)

Would add new languages with a new array per, using this array schema for each language:

Indenting Headers
If you are really serious about threading, you can indent headers by modifying the corresponding CSS file (eg. <tt>skins/monobook/main.css</tt>). To modify all headers (talk or regular article), you can add a 'padding-left: x em;' into each of the headers 3-6. Eg.: