Page MenuHomePhabricator

No new section link
Closed, DeclinedPublic

Description

Author: lastword

Description:
Can we get a magic word like NONEWSECTIONLINK which will remove the New Section (formerly +) tab at the top of a talk page?


Version: unspecified
Severity: enhancement

Details

Reference
bz13794

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:08 PM
bzimport set Reference to bz13794.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 4830
Patch against current trunk

This patch should implement two things:

A) A new global $wgNewSectionOnTalk which defines if "New section" is applied to talk pages or not (default is true)

B) Allows the overriding of new sections with NONEWSECTIONLINK

So the logic is this:

  1. OutputPage sets the link to false,
  2. Parser checks it:

2a) If it's a talk page and the global is true, then it enables the link
2b) If the NEWSECTIONLINK keyword is found, it enables it
2c) If the NONEWSECTIONLINK is found, it disables it again.

Needs some review, but I think I've got it mostly right.

Attached:

lastword wrote:

That's certainly what I was thinking of.

My patch currently breaks MW and causes an exception. Debugging.

Don't see the need or desirability for this.