Last modified: 2006-06-04 01:37:47 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T4299, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 2299 - new constructs in template syntax
new constructs in template syntax
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://jadesukka.homelinux.org:8180/b...
:
Depends on:
Blocks: 2376
  Show dependency treegraph
 
Reported: 2005-06-02 22:14 UTC by lɛʁi לערי ריינהארט
Modified: 2006-06-04 01:37 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description lɛʁi לערי ריינהארט 2005-06-02 22:14:48 UTC
Halló!

For
http://jadesukka.homelinux.org:8180/betawiki/Betawiki:Templates/Template:Task
some documentation is available at
http://jadesukka.homelinux.org:8180/betawiki/Project:Templates/Template:Task/description#documentation

The template includes several enhancements for [[en:Template:To do]] but due to
the lack of requested extensions is using around 170 objects. It is vanity to
create a template which reverts all language localisations.

This attempt shows that at the moment it is possible to make some programming
with the existing features in MediaWiki. It does not make sense to be
excessively restrictive regarding programming because of vandalism and should
focus on providing simpler solutions to what is available anyhow at this moment.

Developers should not tray to solve all requests alone. An intermediate platform
(based on settings, templates and roles) should be available too.


I did run into a problem regarding priority managment for "template:task" which
supports priority handling. It is stored in a extra page ".../to do/priority"
and supports 5 values. Unfortunately this "atribute" MUST be specified before
being able to continue. It would make sense to use a construct "IFEXISTS page"
in templates. Only if a page exists actions could be performed display / hide
the "output".

A simple example would be to add a link to an archive of tasks performed already.

Bug 233 relates to this because it is a kind of "IFEXISTS pages LIKE
'{{NAMESPACE}}:{{PAGENAME}}/%'" (% in MySQL).

IFEXISTS <object> should relate also to parameters of a template. This way
parameters could be optional to that respect that the number of trailing | would
NOT be mandatory.

In order not to interfeare with existing templates IFEXISTS <object> would
return TRUE for EMPTY parameters.

It is not my intention to provide a specification but to encourage taughts about
this. Another question would be how long it takes to implement after procedures
about status asigned etc. passed.

Best regards Reinhardt [[user:gangleri]]
Comment 1 lɛʁi לערי ריינהארט 2005-06-03 01:32:56 UTC
This seams to relate to bug 364 and [[meta:Extended template syntax]].
Can anybody provide status information?
Comment 2 Ævar Arnfjörð Bjarmason 2005-06-05 20:24:55 UTC
Would anyone care to provide a concise summary of what this is about?
Comment 3 lɛʁi לערי ריינהארט 2005-06-05 20:43:42 UTC
changes summary from "extensions to template syntax IFEXISTS <object>;
IFNOTEXISTS <object>; IFEQUALS <object>; ELSE"
to "new constructs in template syntax"
Comment 4 Ævar Arnfjörð Bjarmason 2005-06-05 20:47:15 UTC
Then it's defenetly a duplicate of bug 364, marking it as such.

*** This bug has been marked as a duplicate of 364 ***
Comment 5 lɛʁi לערי ריינהארט 2005-06-06 00:09:28 UTC
Dear friends!

maybe the summary does not explain comment 0
it is definitevely *not* a duplicate of bug 364

IFEXISTS <object> could be used in templates as
IFEXISTS [[{{NAMESPACE}}:{{PAGENAME}}/archive]] THEN <code> normaly
[[{{NAMESPACE}}:{{PAGENAME}}/archive|archive]]
IFEXISTS [[{{NAMESPACE}}:{{PAGENAME}}/to do]] THEN <code> normaly
[[{{NAMESPACE}}:{{PAGENAME}}/to do|to do]]
IFEXISTS [[Help:{{PAGENAME}}/to do]] THEN <code> normaly [[Help:{{PAGENAME}}|Help]]

IFEXISTS some sort of query as LIKE
'{{NAMESPACE}}:{{PAGENAME}}/%'" (% in MySQL) could be used with the apropriate
variant of [[Spacial:Allpages]] to make a link to subpages as required in bug 233

The difference to bug 364 is that a *parameter* might be in the template but
involved in some code *but* the generated / referenced *object* does not exist.

IFNOTEXISTS [[{{NAMESPACE}}:{{PAGENAME}}/to do/priority]] THEN <code> would
generate default code for this situation.

IFEQUALS [[{{NAMESPACE}}:{{PAGENAME}}/to do/priority]] = done THEN <code> would
be helpfull from the begining.

Other parser keywords as ELSE, ELSEIF and END or whatever would be there names
are required to make somthing meaningfull. This is not the place to make a full
specification.


If there are doubts about vandalism a way should be found. Possibly restricting
the usage (runtime effects) to protected template pages. In order to design such
templates everybody could do this inside <pre> ... </pre>. But as already told
restrictions sould not be the first issue to thing about here.

Regards Reinhardt [[user:gangleri]]
Comment 6 Rob Church 2006-06-04 01:37:40 UTC
I'm hazarding a guess that the core issue here was fixed with the introduction
of Tim's ParserFunctions.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links