Page MenuHomePhabricator

Allow Inputbox to accept templates as well as pages for its parameters
Closed, ResolvedPublic

Description

Author: FT2.wiki

Description:
At present the instructions and default text for Inputbox must be wiki pages.

It would allow exceptional flexibility if these could also be templates:

<inputbox>
type=comment
buttonlabel=Click me to create this page about a star
editintro={{My instructions|STAR}}
preload={{My template|STAR}}
default=User:Foo/Default page
</inputbox>

<inputbox>
type=comment
buttonlabel=Click me to create this page about a planet
editintro={{My instructions|PLANET}}
preload={{My template|PLANET}}
default=User:Foo/Default page
</inputbox>

[[Template:My instructions]]
This template is for an article about {{#ifeq:{{{1}}}|STAR|a star|a planet}}. If this is wrong please click BACK on your browser.}}

[[Template:My template]]
Name of {{#ifeq:{{{1}}}|STAR|star|planet}}:
Mass of {{#ifeq:{{{1}}}|STAR|star|planet}}:
{{#ifeq:{{{1}}}|PLANET|Star the planet orbits: | }}

For a current example, see the [[w:WP:SPI]] page, where the input instructions and preload would vary slightly depending whether Checkuser will be requested or not, to reference CU and allow a space for it, or not.


Version: unspecified
Severity: enhancement

Details

Reference
bz17001

Event Timeline

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

FT2.wiki wrote:

(The point being that if slight variations on the inputbox instructions or template might exist, then it would be very efficient to be able to have one template with a parameter (easy to maintain) rather than separate pages (which could go out of sync).

soxred93 wrote:

I'm working on this, along with bug 17002.

See also related bugs bug 12853 and bug 5210.

unassigned Trevor from Inputbox extension.

Aklapper lowered the priority of this task from Medium to Low.Mar 11 2015, 5:46 PM
Umherirrender claimed this task.
Umherirrender subscribed.

Should work using the {{#tag:}} parser function

https://www.mediawiki.org/wiki/Help:Magic_words#Miscellaneous

Umherirrender set Security to None.
Umherirrender removed a subscriber: wikibugs-l-list.