Difference between revisions of "Template:LSL Constant"

From Second Life Wiki
Jump to navigation Jump to search
(Replace deprecated ParserFunctions "#pad" with built-in "Magic word" "padleft")
 
(109 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__ {{LSL Header}}<noinclude>
__NOTOC__ {{Multi-lang|category=LSL}}{{LSL Header}}<noinclude>
See [[{{FULLPAGENAME}}/docs]] for documentation.
See [[{{#var:langbase}}/docs{{#var:lang}}]] for documentation.
{{#if:
{{#vardefine:type|<nowiki>{{var:type}}</nowiki>}}
{{#vardefine:type|<nowiki>{{var:type}}</nowiki>}}
{{#vardefine:comment|<nowiki>{{var:comment}}</nowiki>}}
{{#vardefine:name|<nowiki>{{var:name}}</nowiki>}}
{{#vardefine:name|<nowiki>{{var:name}}</nowiki>}}
{{#vardefine:value|<nowiki>{{var:value}}</nowiki>}}
{{#vardefine:desc|<nowiki>{{var:desc}}</nowiki>}}
{{#vardefine:type|<nowiki>{{var:type}}</nowiki>}}
{{#vardefine:rvalue|<nowiki>{{var:rvalue}}</nowiki>}}
{{#vardefine:links|<nowiki>{{var:links}}</nowiki>}}
{{#vardefine:examples|<nowiki>{{var:examples}}</nowiki>}}
{{#vardefine:examples|<nowiki>{{var:examples}}</nowiki>}}
{{#vardefine:caveats|<nowiki>{{var:caveats}}</nowiki>}}
{{#vardefine:desc|<nowiki>{{var:desc}}</nowiki>}}
{{#vardefine:functions|{{!}}<nowiki>{{var:functions}}</nowiki>}}
{{#vardefine:constants|{{!}}<nowiki>{{var:constants}}</nowiki>}}
{{#vardefine:events|{{!}}<nowiki>{{var:events}}</nowiki>}}
{{#vardefine:location|<nowiki>{{var:location}}</nowiki>}}
{{#vardefine:articles|<nowiki>{{var:articles}}</nowiki>}}
{{#vardefine:pa|<nowiki>{{var:pa}}</nowiki>}}
{{#vardefine:pb|<nowiki>{{var:pb}}</nowiki>}}
{{#vardefine:pc|<nowiki>{{var:pc}}</nowiki>}}
{{#vardefine:pd|<nowiki>{{var:pd}}</nowiki>}}
{{#vardefine:float|<nowiki>{{var:float}}</nowiki>}}
{{#vardefine:issues|<nowiki>{{var:issues}}</nowiki>}}
{{#vardefine:notes|<nowiki>{{var:notes}}</nowiki>}}
{{#vardefine:footnotes|<nowiki>{{var:footnotes}}</nowiki>}}
{{#vardefine:history|<nowiki>{{var:history}}</nowiki>}}
{{#vardefine:deepnotes|<nowiki>{{var:deepnotes}}</nowiki>}}
{{#vardefine:header|<nowiki>{{var:header}}</nowiki>}}
{{#vardefine:self|<nowiki>{{var:self}}</nowiki>}}
}}
<pre>
{{LSL Constant
|name
|type
|subtype
|value
|desc
|examples
|events
|functions
|location
|history
|comment
|cat1
|cat2
|cat3
|cat4
|cat5
|cat6
}}
</pre>
=Example=
=Example=
</noinclude><includeonly>__NOEDITSECTION__ </includeonly>{{{!}} width="100%"
</noinclude>{{#if:
{{!}}<div id="box">
 
== [[{{{type|{{#var:type}}}}}]] {{{name|{{#var:name}}}}} = {{{value|{{#var:value}}}}}; ==
{{#if:{{{type|}}}|{{#vardefine:type|{{{type|}}}}}}}
{{#if:{{{name|}}}|{{#vardefine:name|{{{name|}}}}}}}
{{#if:{{{hvalue|}}}|
  {{#vardefine:hvalue|{{{hvalue|}}}}}
  {{#vardefine:rvalue|{{LSL Hex|{{#var:hvalue}}|{{{value|}}}}}}}
|
  {{#vardefine:hvalue}}
  {{#if:{{{value|}}}|{{#vardefine:rvalue|{{{value|}}}}}}}
}}
{{#vardefine:sig|{{{type}}} {{#if:{{#var:hvalue}}{{#var:rvalue}}|{{{name}}} = {{#if:{{#var:hvalue}}|{{#var:hvalue}}|{{#var:rvalue}}}}|{{{name}}}}};{{#if:{{{comment|}}}|//{{{comment}}}}}}}
{{#if:{{{dvalue|}}}|{{#vardefine:rvalue|{{{dvalue|}}}}}}}
 
{{#vardefine:article_type|constant}}
 
}}<includeonly>{{#if:
 
{{{inject-1|}}}
{{{inject-2|}}}
{{{inject-3|}}}
 
{{#vardefine:issues|{{#var:issues}}
{{{issues|}}}}}
 
{{#vardefine:sort|{{lcfirst:{{{name}}}}}}}
 
{{#vardefine:self|{{{self|}}}{{#var:self}}}}
 
{{#vardefine:also_tests|{{#var:also_tests}}
{{{also_tests|}}}}}
 
{{#vardefine:signature|{{#if:{{#pos:{{#var:moded}}|u}}||{{#if:{{#pos:{{#var:moded}}|r}}|//}}{{#var:sig}}
<nowiki></nowiki>}}{{#if:{{{signature|}}}|{{{signature|}}}
<nowiki></nowiki>}}{{#if:{{#var:signature}}|{{#var:signature}}}}
}}
 
}}<div style="display:none" class="hidden-text" id="hidden-text">{{#var:hidden-text}}</div><div id="RealTitleBanner" style="display:none;">
<span id="RealTitle">{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{{name}}}</span></div> __NOEDITSECTION__ {{DEFAULTSORT:{{#var:sort}}}} {{#if:{{#var:self}}{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}||[[Category:LSL Constants{{#var:lang}}|{{{name}}}]][[Category:LSL {{ucfirst:{{{type}}}}}{{#var:lang}}|{{{name}}}]]{{#if:{{{subtype|}}}|[[Category:LSL {{ucfirst:{{{type}}}}}/{{{subtype}}}/Values{{#var:lang}}|{{{name}}}]]}}{{#ifexpr:{{#var:BugCounter|0}} > 0|[[Category:LSL topics with bugs{{#var:lang}}]]}}}}
</includeonly>{{#var:header}}
{{RightToc|font-size:80%}}
<div id="box"><h2 style="display:none"> Description </h2>{{#ifexpr:{{#var:BugCounter|0}} > 0|<div class="mw-headline" style="float:right; margin: 5px 0.5em 0 0.5em;">{{LSL_Bug_Icon}}</div>}}<span id="{{anchorencode:Description}}" class="mw-headline" style="display:block; padding-bottom:0.17em; padding-top:0.5em; background:transparent none repeat scroll 0% 0%; color:#546368; font-family:Arial,Helvetica,Sans-Serif; background-color:#F4F8FB; border-bottom:1px dotted #AAAAAA; font-size:120%; font-weight:bold; margin:0pt; padding:0.2em 0.5em; text-align:left;"> Constant: [[{{{type}}}{{#var:lang}}|{{{type}}}]] {{HoverLink|1={{{name}}}{{#var:lang}}|2={{#var:comment}}|3={{{name}}}}} = {{#var:rvalue}}; </span>
<div style="padding: 0.5em">{{#if:{{{float|}}}{{#var:float}}|<div style="float:right;">
{{{float|}}}{{#var:float}}
</div>}}
The{{#if:{{{subtype|}}}|&#32;[[:Category:LSL {{ucfirst:{{{type}}}}}/{{{subtype}}}{{#var:lang}}|{{{subtype}}}]]}} {{{type}}} {{#if:{{{subtype|}}}|[[:Category:LSL {{ucfirst:{{{type}}}}}/{{{subtype}}}/Values{{#var:lang}}|constant]]|constant}} {{{name}}} has the value {{#var:rvalue}}{{#if:{{{desc|}}}{{#var:desc}}|<br/><br/>
{{{desc|}}}
{{#var:desc}}|[[Category:LSL FixMe{{#var:lang}}]]}}
</div></div>
{{#if:{{{pa|}}}{{#var:pa}}|
{{{pa|}}}{{#var:pa}}
}}{{#if:{{{pb|}}}{{#var:pb}}|
{{{pb|}}}{{#var:pb}}
}}{{#if:{{{pc|}}}{{#var:pc}}|
{{{pc|}}}{{#var:pc}}
}}{{#if:{{{pd|}}}{{#var:pd}}|
{{{pd|}}}{{#var:pd}}
}}
<div id="box">
== Caveats ==
<div style="padding: 0.5em">
{{LSL_Generic/Caveats|caveats={{{caveats|}}}
{{#var:caveats}}|bugs={{#var:bugs}}}}
</div></div><div id="box">
== Related Articles ==
<div style="padding: 0.5em">
<div style="padding: 0.5em">
{{{desc|{{#var:desc}}}}}
{{#if:{{{constants|}}}{{#var:constants}}{{#var:also_constants}}|<h3>Constants</h3>
</div></div>
{{{!}}
{{{constants|}}}{{#var:constants}}{{#var:also_constants}}
{{!}}} }}{{#if:{{{functions|}}}{{#var:functions}}{{#var:also_functions}}|<h3>Functions</h3>
{{{!}}
{{!}}-
{{{functions|}}}
{{!}}-
{{#var:functions}}
{{!}}-
{{#var:also_functions}}
{{!}}-
{{!}}} }}{{#if:{{{events|}}}{{#var:events}}{{#var:also_events}}|<h3>Events</h3>
{{{!}}
{{!}}-
{{{events|}}}
{{!}}-
{{#var:events}}
{{!}}-
{{#var:also_events}}
{{!}}-
{{!}}-
{{!}}<div id="box">
{{!}}} }}{{#if:{{{articles|}}}{{#var:articles}}{{#var:also_articles}}|<h3>Articles</h3>
== Functions and Events ==
<div style="padding: 0.5em">
{{{!}}
{{{!}}
{{{links|{{#var:links}}}}}
{{!}}}
</div></div>
{{!}}-
{{!}}-
{{#if:{{{examples|{{#var:examples}}}}}|
{{{articles|}}}
{{!}}<div id="box">
{{!}}-
{{#var:articles}}
{{!}}-
{{#var:also_articles}}
{{!}}-
{{!}}} }}</div></div>{{#if:{{{examples|}}}{{#var:examples}}|<div id="box">
== Examples ==
== Examples ==
<div style="padding: 0.5em">
<div style="padding: 0.5em">
{{{examples|{{#var:examples}}}}}
{{{examples|}}}{{#var:examples}}
</div></div>}}
</div></div>}}{{#if:{{{helpers|}}}{{#var:helpers}}|<div id="box">
{{!}}} {{#if:{{{cat1|{{#var:cat1}}}}}|{{LSLC|{{{cat1|{{#var:cat1}}}}}}}}} {{#if:{{{cat2|{{#var:cat2}}}}}|{{LSLC|{{{cat2|{{#var:cat2}}}}}}}}} {{#if:{{{cat3|{{#var:cat3}}}}}|{{LSLC|{{{cat3|{{#var:cat3}}}}}}}}} {{#if:{{{cat4|{{#var:cat4}}}}}|{{LSLC|{{{cat4|{{#var:cat4}}}}}}}}} {{#if:{{{cat5|{{#var:cat5}}}}}|{{LSLC|{{{cat5|{{#var:cat5}}}}}}}}} {{#if:{{{cat6|{{#var:cat6}}}}}|{{LSLC|{{{cat6|{{#var:cat6}}}}}}}}}
== Useful Snippets ==
<div style="padding: 0.5em">
{{{helpers|}}}{{#var:helpers}}
</div></div>}}{{#if:{{{notes|}}}{{#var:notes}}|<div id="box">
== Notes ==
<div style="padding: 0.5em">
{{#if:{{#var:notes}}|{{#var:notes}}{{#if:{{{notes|}}}|<br/>
{{{notes|}}}}}|{{{notes|}}}}}
</div></div>}}<div id="box">
== Deep Notes ==
<div style="padding: 0.5em"><div>
{{{deepnotes|}}}{{#var:deepnotes}}
</div>{{#if:{{{history|}}}{{#var:history}}|
<h4> History </h4><div>
{{{!}}
{{{history|}}}{{#var:history}}
{{!}}}
</div>}}
{{Anchor|Issues}}{{LSL_Generic/Issues}}{{#if:{{#var:also_tests}}|
<h3>Tests</h3>
{{{!}}
{{#var:also_tests}}
{{!}}}
}}{{#if:{{{location|}}}{{#var:location}}|
<h4> Source </h4><div>
{{{location|}}}{{#var:location}}
</div>}}{{#if:{{#var:footnotes}}|
<h4 style="margin-bottom:0;"> Footnotes </h4>
{{{{#if:{{#var:footnotes}}|Footnotes|}}|}}
}}
{{Collapsible_Table|collapsed=*|table-style=width:100%;|title-style=text-align:left;|title=<h4 style="margin-top:0;">Signature</h4>|content={{!}}
{{#tag:pre|{{#var:signature}}|id="lsl-signature"}}}}
{{#if:{{{haiku|}}}<noinclude>*</noinclude>|{{Collapsible_Table|table-class=haiku|table-style=width:100%;|title-style=text-align:left;|title=<h4 style="margin-top:0;">Haiku</h4>|content={{!}}
{{{haiku}}}
}}<includeonly>[[Category:Articles with haiku]]</includeonly>|<includeonly>[[Category:Articles in need of haiku]]</includeonly>}}
</div></div>{{#if:{{#var:self}}|| {{#if:{{#pos:{{#var:moded}}|r}}{{#pos:{{#var:moded}}|u}}|| {{#if:{{#pos:{{#var:moded}}|f}}|[[Category:LSL Keywords/Pre-release{{#var:lang}}]]|[[Category:LSL Keywords/All{{#var:lang}}]]{{#ifexpr:{{#var:BugCounter|0}} > 0|[[Category:LSL topics with bugs{{#var:lang}}]] [[Category:LSL topics with the most bugs{{#var:lang}}| {{padleft:{{#expr:100-{{#var:BugCounter|0}}}}|2|0}}{{PAGENAME}}]]}}}} {{#if:{{{examples|}}}{{#var:examples}}||[[Category:LSL Needs Example{{#var:lang}}]]}} }} {{#if:{{{cat1|}}}|[[Category:LSL {{{cat1|}}}{{#var:lang}}]]}} {{#if:{{{cat2|}}}|[[Category:LSL {{{cat2|}}}{{#var:lang}}]]}} {{#if:{{{cat3|}}}|[[Category:LSL {{{cat3|}}}{{#var:lang}}]]}} {{#if:{{{cat4|}}}|[[Category:LSL {{{cat4|}}}{{#var:lang}}]]}} {{#if:{{{cat5|}}}|[[Category:LSL {{{cat5|}}}{{#var:lang}}]]}} {{#if:{{{cat6|}}}|[[Category:LSL {{{cat6|}}}{{#var:lang}}]]}} {{#if:{{{cat7|}}}|[[Category:LSL {{{cat7|}}}{{#var:lang}}]]}} {{#if:{{{cat8|}}}|[[Category:LSL {{{cat8|}}}{{#var:lang}}]]}} }}

Latest revision as of 03:06, 20 August 2023

See Template:LSL Constant/docs for documentation.

{{LSL Constant
|name
|type
|subtype
|value
|desc
|examples
|events
|functions
|location
|history
|comment
|cat1
|cat2
|cat3
|cat4
|cat5
|cat6
}}

Example

{{var:header}}

Description

Constant: [[{{{type}}}|{{{type}}}]] [[{{{name}}}|{{{name}}}]] = {{var:rvalue}};

{{var:float}}

The {{{type}}} constant {{{name}}} has the value {{var:rvalue}}

{{var:desc}}

{{var:pa}}{{var:pb}}{{var:pc}}{{var:pd}}

Caveats

Related Articles

Constants

{{var:constants}}

Functions

{{var:functions}}

Events

{{var:events}}

Articles

{{var:articles}}

Examples

{{var:examples}}

Notes

{{var:notes}}

Deep Notes

{{var:deepnotes}}

History

{{var:history}}

All Issues

~ Search JIRA for related Issues {{var:issues}}

Source

{{var:location}}

Footnotes

    {{var:footnotes}}

Signature


Haiku

{{{haiku}}}