Page MenuHomePhabricator

Allow magic words in EasyTimeline
Closed, ResolvedPublic

Description

Author: ral315

Description:
Not sure on the feasibility of this, but it would be useful to be able to use
magic words inside EasyTimeline, in order to be able to parse things such as
{{CURRENTDAY}}, {{PAGENAME}}, etc. This could be done just through parsing
Define statements for Wikisyntax, forcing everything to be done through
variables, or done fully.


Version: unspecified
Severity: enhancement

Details

Reference
bz5880

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:14 PM
bzimport added a project: EasyTimeline.
bzimport set Reference to bz5880.

I suspect that this is the same situation as prevents transclusional parameters
from being used in an EasyTimeline: the order of parsing/evaluation doesn't
support such a thing.

So the raw text gets passed to EasyTimeline which naturally barfs...

ral315 wrote:

My thought was that it might be possible to change the EasyTimeline parsing
order to where it's handled separately from the rest of the parsing.

rettido wrote:

I was about to enter a new bug, but maybe I can just comment on this. For at least four months and at least up until Feb 23 2008 08:59 CET, I was able to use the following Template using parsing to create a timeline figure on nowiki: http://no.wikipedia.org/wiki/Mal:Navnefigur

To make the parsing work, the template had to be put in using "subst:", so no pages actually use this template dynamically. The last successful use of the template is seen here: http://no.wikipedia.org/w/index.php?title=Mats&diff=prev&oldid=3372588 (Due to the subst, you just see the result of the template.)

At least from Feb 24, 2008, 14:00 CET it was no longer possible to use this template, as the parameters were not parsed, so the result looks like this (only one of the erroneous lines extracted):
Line 12: bar:1700 from:{{{1}}} till:end shift:(-80,20)

As you see instead of parsing the first parameter, the text {{{1}}} is used directly.

Is it possible to find out why the parsing no longer works? And maybe also to fix the problem? :-)

herd wrote:

The parsing probably no longer works as Wikimedia was switched to the new preprocessor about then: http://meta.wikimedia.org/wiki/Migration_to_the_new_preprocessor

You can probably use the new parserfunction (not part of the ParserFunctions extension, but core) called #tag (which turns any XML-style extension tag into a parserfunction, which does allow preprocessing of parameters, magicwords, parserfunctions, templates, etc), see
http://meta.wikimedia.org/wiki/Help:Magic_words#Formatting for more info.

rettido wrote:

Thank you, this solved the issue! Also, using the #tag function made the use of the Template much better than before, since there is no longer a need to use "subst:". Again, thank you for the info!

Assigned to extension developer.

a.d.bergi wrote:

The #tag-function should have solved this issue.