Last modified: 2011-11-29 23:42:16 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 T8281, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6281 - Introduce {{TEMPLATESONTHISPAGE}} magic word
Introduce {{TEMPLATESONTHISPAGE}} magic word
Status: RESOLVED LATER
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
unspecified
All All
: Lowest enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-12 10:49 UTC by Trần Thế Trung
Modified: 2011-11-29 23:42 UTC (History)
2 users (show)

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


Attachments

Description Trần Thế Trung 2006-06-12 10:49:47 UTC
We already have the list of templates used on a revision of a page, showed on the 
edit box.

I would like to have variable/magic word {{TEMPLATEUSED}} that list all the template 
used in the article. This help template interacting with each other, change their 
behaviour with the presence of the other template.

For example, template 1  = "French", template 2 = "Noun". When '''only''' "french" 
is used, the page is categorized in category "French", when '''only''' "Noun" is 
used, the page is categorized in category "Noun", and when both are used, the page 
is in "French noun". The behaviour is defined in side the template, so if the 
definition does not mention other templates, like "Blah", then the existence 
of "Blah" inside the page does not affect the behaviour of "French" or "Noun". 

This feature is useful not only for Wiktionary, but also for many other automatic 
categorizing templates on Wikipedia.
Comment 1 Brion Vibber 2006-06-12 20:14:00 UTC
This is extremely unclear and likely to be very, very, very, 
very fragile to the point of never working correctly.

Closing as INVALID given that there's no clear description of 
what output would look like.
Comment 2 Minh Nguyễn 2006-06-12 23:08:36 UTC
It looks like what you're asking for is *intersecting* templates. But in the
case that you've brought up, it might just be easier to create a parameter in
the "-noun-" template that takes in a language code and assigns the entry to the
appropriate category (either using #language: or any of the {{xx}} templates
that many of the Wiktionaries already have). For any more advanced uses of
intersecting categories, you might want to talk to the people behind
WiktionaryZ; they might have some ideas on how to implement this more effectively.
Comment 3 Trần Thế Trung 2006-06-13 08:01:43 UTC
Sorry for not indicating explicitly the output.

{{TEMPLATESONTHISPAGE|French}} gives 1 if 
[[Template:French]] is on a revision of the article, 
and 0 otherwise.

So here is the complete code for [[Template:French]]: 
<code>
==French==
<includeonly>
{{#ifexpr: {{TEMPLATESONTHISPAGE|Noun}}
| [[Category:French nouns]]
| [[Category:Frenchs]]
}}
</includeonly>
</code>

So here is the complete code for [[Template:Noun]]: 
<code>
==French==
<includeonly>
{{#ifexpr: {{TEMPLATESONTHISPAGE|French}}
| [[Category:French nouns]]
| [[Category:Nouns]]
}}
</includeonly>
</code>

Is this more clear, so that this bug is 
less "INVALID"? Or is this still 4-very "fragile to 
the point of never working correctly"?
Comment 4 Trần Thế Trung 2006-06-13 08:02:48 UTC
"is on a revision of the article" -> "is on the currrent revision of the 
article". Sorry for my English.
Comment 5 Trần Thế Trung 2006-06-13 08:05:51 UTC
Oh and:

...for [[Template:Noun]]: 
<code>
==French==

should be:

...for [[Template:Noun]]: 
<code>
==Noun==

(this is just presentation on the page)
Comment 6 Trần Thế Trung 2006-06-14 06:28:48 UTC
Since no one answered, I change the status back to 
Reopen, so that someone could at least explain why 
this suggestion is INVALID.
Comment 7 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-14 06:31:40 UTC
Now that the output is being specified, I would like to chime in and ask why
this is being wontfixed.  If it's too much of a database load or something in
the current setup, that means it won't be used on Wikimedia, but it can still be
added to the software if someone feels like writing it.

(I would note that status-warring with the Chief Technical Officer of the
Wikimedia Foundation over the status of a bug would probably be a Very Bad Idea,
however.)
Comment 8 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-14 06:33:02 UTC
(In reply to comment #7)
> (I would note that status-warring with the Chief Technical Officer of the
> Wikimedia Foundation over the status of a bug would probably be a Very Bad Idea,
> however.)

I was reading the bug activity wrong, my bad.  No status-warring involved, so
ignore that bit.
Comment 9 Aryeh Gregor (not reading bugmail, please e-mail directly) 2006-06-14 06:34:41 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > (I would note that status-warring with the Chief Technical Officer of the
> > Wikimedia Foundation over the status of a bug would probably be a Very Bad Idea,
> > however.)
> 
> I was reading the bug activity wrong, my bad.  No status-warring involved, so
> ignore that bit.

Actually, and yes I know triple-posting is obnoxious but sorry, ignore the
entire #7.  It's irrelevant in light of what actually happened (I thought brion
re-wontfixed it and Trần Thế Trung re-reopened it, becoming confused by
unrelated actions due to the nonspecificity of the IRC-channel wikibugs bot).
Comment 10 Brion Vibber 2006-06-14 06:36:54 UTC
The request cannot be implemented reliably with the present 
system (or possibly at all).
Comment 11 Brion Vibber 2011-11-29 23:42:16 UTC
The basic problem I think is that you won't know what templates are in use until you've expanded all the templates -- at which point it's too late to expand {{TEMPLATESONTHISPAGE}} or {{#hastemplate:noun}} or such.

Would have similar problems with something like {{#incategory:noun}}.

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


Navigation
Links