Page MenuHomePhabricator

A hook to enable putting options to the preferences tab
Closed, ResolvedPublic

Description

Author: bartek

Description:
New options go to the Misc section of the preferences. Some mechanism is needed to enable putting options into the editing tab without having to modify the hardwritten code.


Version: 1.13.x
Severity: enhancement

Details

Reference
bz14806

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:14 PM
bzimport set Reference to bz14806.

FYI: The RenderPreferencesForm hook can also be used to add new preference sections (tabs), see the Gadgets extension for an example.

bartek wrote:

This is a proposed patch for this bug

This is a proposed solution for this bug, in a form of a patch.

Attached:

It would be nice if this were more generic so you could add preferences to any tab. One option would be to use string member variables that get appended to each tab section when that section is added to wgOut, and then call a hook at the beginning of the process to allow hooks to add content to those members. This is already done in SpecialUpload.php with $uploadFormTextTop and in EditPage.php with $editFormPageTop, etc.

(In reply to comment #4)

It would be nice if this were more generic so you could add preferences to any
tab. One option would be to use string member variables that get appended to
each tab section when that section is added to wgOut, and then call a hook at
the beginning of the process to allow hooks to add content to those members.
This is already done in SpecialUpload.php with $uploadFormTextTop and in
EditPage.php with $editFormPageTop, etc.

Right. More general would help a lot here.

Also, this patch doesn't apply, missing the INDEX param.

Assigning to Andrew, since he seems to be overhauls prefs

Will be doable when <tt>preferences-work</tt> branch is merged with trunk.