Page MenuHomePhabricator

Customizable default preload/editintro in add-new-section link for Talk page
Closed, ResolvedPublic

Description

Author: anon.hui

Description:
Suggestion to change the add-new-section link on the top of Talk page (which appear as a plus sign "+" beside the edit link).

Current status

  • The link look like {{fullurl:...|action=edit&section=new}}

Suggestion for improvement

  • The link should look like {{fullurl:...|action=edit&section=new&preload=xxx&editintro=yyy}}
  • The value "xxx" and "yyy" can be customized in MediaWiki namespace, MediaWiki:talk-new-section-link-preload and MediaWiki:talk-new-section-link-editintro, for example.
  • If the page MediaWiki:talk-new-section-... is empty, then the link should look like {{fullurl:...|action=edit&section=new}}, which is the same as current status

Version: 1.15.x
Severity: enhancement

Details

Reference
bz17662

Event Timeline

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

Created attachment 6636
Checks preload and editintro system messages and adds them

This proposed fix searches the system messages “talk-addsection-preload” and “talk-addsection-editintro” and loads them if they exist.

Maybe it would be nice to try loading “talk-addsection-…-<namespace>” (e. g. “talk-addsection-preload-0”) and then (if it doesn’t exist) try loading the standard “talk-addsection-…”. Comments?

attachment skintpl.patch ignored as obsolete

Created attachment 6638
Improves the previous proposed patch

Adds the two messages to MessagesEn.php (value ''). So I can check whether the system messages are '' (==> no editintro/preload) or not.

Attached:

anon.hui wrote:

One may notice that, why not put the preload like,
{{fullurl:...|action=edit&section=new&preload=mediawiki:talk-addsection-preload&editintro=mediawiki:talk-addsection-editintro}}?
Well, this will always prevent the user from editing the preload template, which is not desired.

(In reply to comment #1)

Maybe it would be nice to try loading “talk-addsection-…-<namespace>” (e.
g. “talk-addsection-preload-0”) and then (if it doesn’t exist) try
loading the standard “talk-addsection-…”. Comments?

Good, this is very useful.

Bryan.TongMinh wrote:

Applied in r58980.