మూస:Ambox: కూర్పుల మధ్య తేడాలు

imported>Edokter
Undid revision 397582199 by Rjanag (talk) should not rely on numbered parameters; text is not guaranteed to be {{{1}}}.
adding functionality for substitution detection and cleanup categorisation, per discussion
పంక్తి 1:
{{#ifeq:{{{subst}}}|SUBST
<!--{{Ambox}} begin-->{{#switch:{{{small|}}}
|{{#if:{{{name|}}}
| left =
|{{error|Template {{tlx|{{{name}}}}} has been incorrectly substituted.}}
{{Ambox/core
}}[[Category:Pages with incorrectly substituted templates]]
| small = left
}}{{#ifeq:{{{small}}}|left
| type = {{{type|}}}
|{{Ambox/core
| image = {{#if:{{{smallimage|}}}
|small = | {{{smallimage}}}left
|type |= {{{imagetype|}}}
|image = {{#if:{{{smallimage|}}}
|{{{smallimage}}}
| imageright = {{#if:{{{smallimageright|}}}
| {{{smallimagerightimage|}}}
| {{{imageright|}}}
}}
| style = {{{style|}}}
| textstyle = {{{textstyle|}}}
| text = {{#if:{{{smalltext|}}}
| {{{smalltext}}}
| {{{text}}}
}}
}}
| imageright = {{#if:{{{smallimageright|}}}
| #default =
|{{{smallimageright}}}
{{Ambox/core
| type = {{{typeimageright|}}}
| image = {{{image|}}}
| imageright = {{{imageright|}}}
| style = {{{style|}}}
| textstyle = {{{textstyle|}}}
| text = {{{text}}}
}}
| style = {{{style|}}}
}}<!--
| textstyle = {{{textstyle|}}}
 
| text = {{#if:{{{smalltext|}}}
--><includeonly>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:Article message boxes]]}}}}</includeonly><!--
| {{{smalltext}}}
 
| {{{text}}}
--><!--{{Ambox}} end--><noinclude>
}}
}}
|{{Ambox/core
| type = {{{type|}}}
| image = {{#if:{{{smallimageimage|}}}
|imageright |= {{{imageright|}}}
| imagestyle = {{{imagestyle|}}}
| style textstyle = {{{styletextstyle|}}}
|text = {{{text}}}
}}
}}{{cat handler
|main={{#if:{{{cat|}}}
|{{#if:{{{date|}}}
|[[Category:{{{cat}}} {{{preposition|from}}} {{{date}}}]]{{#ifexist:Category:{{{cat}}} {{{preposition|from}}} {{{date}}}|
|[[Category:Articles with invalid date parameter in template]]
}}
|[[Category:{{#if:{{{undated|}}}
|{{{undated}}}
|{{{cat}}}
}}]]
}}
}}{{#if:{{{all|}}}
|[[Category:{{{all}}}]]
}}
--><includeonly> |template={{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:Article message boxes]]}}}}</includeonly><!--
}}{{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}
|{{documentation}}<!-- Transclude documentation on template page -->
}}<noinclude>
 
{{Documentation}}
"https://te.wikipedia.org/wiki/మూస:Ambox" నుండి వెలికితీశారు