Page MenuHomePhabricator

Use of templates in intersections
Open, NormalPublic

Description

Author: vacuum

Description:
Diff for the new feature to use templates for the output from Intersections

Attached is a small diff to allow the use of templates for output from the extension intersection. It is tested against version 1.11.0 running PHP: 5.2.1 and MySQL: 5.0.38.

The feature uses a redirect through messages to identified templates, ie the option mode=foo will try to use the content of Mediawiki:Intersection-foo as a template name, prepending the found title with or without namespace and optionally appends the category date as done for links. If the message name isn't defined there will be rendered a template call with something similar to {{<Intersection-foo>|...}}

The extension page on www.mediawiki.org isn't updated.

[[:no:Jeblad]]


Version: unspecified
Severity: normal

attachment Intersection-DynamicPageList.diff ignored as obsolete

Details

Reference
bz13692

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 21 2014, 10:03 PM
bzimport set Reference to bz13692.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Apr 11 2008, 8:22 AM

vacuum wrote:

Note that if mode isn't defined the usual behaviour will be retained, also the defined behaviour for mode set to none, ordered, and unordered are retained.

Note also that there should be no impact on performance as long as there are no use of the templates. Due to the redirect through the mediawiki-namespace the evaluation of templates will be somwhat heavier than usual.

[[:no:Jeblad]]

vacuum wrote:

Allow use of templates, uses message cache through method call

A sligtly better approach..
[[:no:User:Jeblad]]

Attached:

Assign open DynamicPageList issues to new component maintainer.

sumanah wrote:

John, thanks for the patch. I'm cc'ing one of the extension's authors to request patch review.

Thank you for the patch. However, I don't think this is the right way of implementing this feature for several reasons:

  • Shouldn't use the borderline private methods of message cache
  • Questionable weather the template should be a specified in such an indirect way (Specify name, which resolves to a system message, which resolves back to a template, seems as if it should just directly take the template. I like mode=template, templatename=foo approach much better personally)
  • Some coding convention issues (but those issues are more reflective of the extension in general then of this patch).
mxn added a subscriber: mxn.Nov 24 2014, 8:55 PM
Meno25 removed a subscriber: Meno25.Jan 17 2017, 4:04 PM