Difference between revisions of "Template:LSL Constant"

From Second Life Wiki
Jump to navigation Jump to search
m (not sure why this wasn't inlined (i'll find out soon?), not higher parameters can clear the bugs so they don't have to double render.)
m
(44 intermediate revisions by the same user not shown)
Line 5: Line 5:
{{#vardefine:comment|<nowiki>{{var:comment}}</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:examples|<nowiki>{{var:examples}}</nowiki>}}
{{#vardefine:examples|<nowiki>{{var:examples}}</nowiki>}}
{{#vardefine:caveats|<nowiki>{{var:caveats}}</nowiki>}}
{{#vardefine:caveats|<nowiki>{{var:caveats}}</nowiki>}}
Line 26: Line 26:
{{#vardefine:deepnotes|<nowiki>{{var:deepnotes}}</nowiki>}}
{{#vardefine:deepnotes|<nowiki>{{var:deepnotes}}</nowiki>}}
{{#vardefine:header|<nowiki>{{var:header}}</nowiki>}}
{{#vardefine:header|<nowiki>{{var:header}}</nowiki>}}
{{#vardefine:self|<nowiki>{{var:self}}</nowiki>}}
}}
}}
<pre>
<pre>
Line 31: Line 32:
|name
|name
|type
|type
|subtype
|value
|value
|desc
|desc
Line 51: Line 53:
</noinclude>{{#if:
</noinclude>{{#if:


{{#vardefine:type|{{#if:{{{type|}}}|{{{type|}}}|{{#var:type}}}}}}
{{#if:{{{type|}}}|{{#vardefine:type|{{{type|}}}}}}}
{{#vardefine:name|{{#if:{{{name|}}}|{{{name|}}}|{{#var:name}}}}}}
{{#if:{{{name|}}}|{{#vardefine:name|{{{name|}}}}}}}
{{#vardefine:value|{{#if:{{{value|}}}|{{{value|}}}|{{#var:value}}}}}}
{{#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:
}}<includeonly>{{#if:
{{{inject-1|}}}
{{{inject-2|}}}
{{{inject-3|}}}
{{#vardefine:issues|{{#var:issues}}
{{#vardefine:issues|{{#var:issues}}
{{{issues|}}}}}
{{{issues|}}}}}
{{#vardefine:comment|{{{comment|}}}{{#var:comment}}}}
 
{{#vardefine:sort|{{lcfirst:{{#var:name}}}}}}
{{#vardefine:sort|{{lcfirst:{{{name}}}}}}}
 
{{#vardefine:self|{{{self|}}}{{#var:self}}}}
{{#vardefine:self|{{{self|}}}{{#var:self}}}}
{{#vardefine:also_tests|{{#var:also_tests}}
{{#vardefine:also_tests|{{#var:also_tests}}
{{{also_tests|}}}}}
{{{also_tests|}}}}}
}}<div id="RealTitleBanner" style="display:none;">
 
<span id="RealTitle">{{#if:{{NAMESPACE}}|{{NAMESPACE}}:}}{{#var:name}}</span></div> __NOEDITSECTION__  {{DEFAULTSORT:{{#var:sort}}}} {{#if:{{#var:self}}||[[Category:LSL Constants{{#var:lang}}|{{#var:name}}]][[Category:LSL {{ucfirst:{{#var:type}}}}{{#var:lang}}|{{#var:name}}]]{{#ifexpr:({{#var:BugCounter}} + 0) > 0|[[Category:LSL topics with bugs{{#var:lang}}]]}}}}  
{{#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}}
</includeonly>{{#var:header}}
{{RightToc|font-size:80%}}
{{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;">{{#tag:imagemap|
<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>
Image:Issue_Type-Bug.gif{{!}}Buggy
default [[#{{anchorencode:Important Issues}}|There {{#ifeq:{{#var:BugCounter}}|1|is 1 important Jira Issue|are {{#var:BugCounter}} important Jira Issues}} pertaining to this function.]]
desc none
}}</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: [[{{#var:type}}{{#var:lang}}|{{#var:type}}]] {{HoverLink|1={{#var:name}}{{#var:lang}}|2={{#var:comment}}|3={{#var:name}}}} = {{#var:value}}; </span>
<div style="padding: 0.5em">{{#if:{{{float|}}}{{#var:float}}|<div style="float:right;">
<div style="padding: 0.5em">{{#if:{{{float|}}}{{#var:float}}|<div style="float:right;">
{{{float|}}}{{#var:float}}
{{{float|}}}{{#var:float}}
</div>}}
</div>}}
The {{#var:type}} constant {{#var:name}} has the value {{#var:value}}{{#if:{{{desc|}}}{{#var:desc}}|<br/><br/>
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}}]]}}
{{{desc|}}}
{{#var:desc}}|[[Category:LSL FixMe{{#var:lang}}]]}}
</div></div>
</div></div>
{{#if:{{{pa|}}}{{#var:pa}}|
{{#if:{{{pa|}}}{{#var:pa}}|
Line 86: Line 108:
}}{{#if:{{{pd|}}}{{#var:pd}}|
}}{{#if:{{{pd|}}}{{#var:pd}}|
{{{pd|}}}{{#var:pd}}
{{{pd|}}}{{#var:pd}}
}}{{#if:{{{caveats|}}}{{#var:caveats}}|
}}
<div id="box">
<div id="box">
== Caveats ==
== Caveats ==
<div style="padding: 0.5em">
<div style="padding: 0.5em">
{{#if:{{#var:caveats}}|
{{LSL_Generic/Caveats|caveats={{{caveats|}}}
{{#var:caveats}}}}{{#if:{{{caveats|}}}|
{{#var:caveats}}|bugs={{#var:bugs}}}}
{{{caveats|}}}}}
</div></div><div id="box">
{{#ifeq:{{#var:mode}}|user||{{#if:{{#var:bugs}}|<h3 style="display:inline; line-height:2em;">Important Issues </h3>~ {{JiraSearch/1|1={{{keywords|}}} {{#var:name}}|2=Search JIRA for related Bugs}}
{{{!}} style="font-size:80%; line-height:1.1em;"
{{#var:bugs}}
{{!}}}|{{PBR}}{{JiraSearch/1|1={{{keywords|}}} {{#var:name}}|2=Search JIRA for related Bugs}}}}}}
</div></div>}}<div id="box">
== Related Articles ==
== Related Articles ==
<div style="padding: 0.5em">
<div style="padding: 0.5em">
Line 105: Line 122:
{{!}}} }}{{#if:{{{functions|}}}{{#var:functions}}{{#var:also_functions}}|<h3>Functions</h3>
{{!}}} }}{{#if:{{{functions|}}}{{#var:functions}}{{#var:also_functions}}|<h3>Functions</h3>
{{{!}}
{{{!}}
{{{functions|}}}{{#var:functions}}{{#var:also_functions}}
{{!}}-
{{{functions|}}}
{{!}}-
{{#var:functions}}
{{!}}-
{{#var:also_functions}}
{{!}}-
{{!}}} }}{{#if:{{{events|}}}{{#var:events}}{{#var:also_events}}|<h3>Events</h3>
{{!}}} }}{{#if:{{{events|}}}{{#var:events}}{{#var:also_events}}|<h3>Events</h3>
{{{!}}
{{{!}}
{{{events|}}}{{#var:events}}{{#var:also_events}}
{{!}}-
{{{events|}}}
{{!}}-
{{#var:events}}
{{!}}-
{{#var:also_events}}
{{!}}-
{{!}}} }}{{#if:{{{articles|}}}{{#var:articles}}{{#var:also_articles}}|<h3>Articles</h3>
{{!}}} }}{{#if:{{{articles|}}}{{#var:articles}}{{#var:also_articles}}|<h3>Articles</h3>
{{{!}}
{{{!}}
{{{articles|}}}{{#var:articles}}{{#var:also_articles}}
{{!}}-
{{{articles|}}}
{{!}}-
{{#var:articles}}
{{!}}-
{{#var:also_articles}}
{{!}}-
{{!}}} }}</div></div>{{#if:{{{examples|}}}{{#var:examples}}|<div id="box">
{{!}}} }}</div></div>{{#if:{{{examples|}}}{{#var:examples}}|<div id="box">
== Examples ==
== Examples ==
Line 131: Line 166:
</div>{{#if:{{{history|}}}{{#var:history}}|
</div>{{#if:{{{history|}}}{{#var:history}}|
<h4> History </h4><div>
<h4> History </h4><div>
{{{!}}
{{{history|}}}{{#var:history}}
{{{history|}}}{{#var:history}}
</div>}}{{#if:{{#var:issues}}|
<h4 style="display:inline; line-height:2em;">Issues </h4>~ {{JiraSearch/2|1={{{keywords|}}} {{#var:name}}|2=Search JIRA for related Issues}}
{{{!}} style="font-size:90%; line-height:1.1em;"
{{#var:issues}}
{{!}}}
{{!}}}
|<h4>Issues</h4>
</div>}}
{{JiraSearch/2|1={{{keywords|}}} {{#var:name}}|2=Search JIRA for related Issues}}
{{Anchor|Issues}}{{LSL_Generic/Issues}}{{#if:{{#var:also_tests}}|
}}{{#if:{{#var:also_tests}}|
<h3>Tests</h3>
<h3>Tests</h3>
{{{!}}
{{{!}}
Line 151: Line 182:
{{{{#if:{{#var:footnotes}}|Footnotes|}}|}}
{{{{#if:{{#var:footnotes}}|Footnotes|}}|}}
}}
}}
</div></div>{{#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}}]]}}
{{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}}| {{#pad:{{#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}}]]}} }}

Revision as of 20:41, 22 September 2015

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}}}