Difference between revisions of "Template:LSLFunctionAll"

From Second Life Wiki
Jump to navigation Jump to search
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__ <noinclude>
<noinclude>See: [[Template:LSL Function]]</noinclude><includeonly>
== Main ==
This template renders ever function page. If it is to be edited it should be done in such a way as to not break existing content.
 
It uses the template [[Template:LSLFunction]] to render the first box.
 
One problem with using this template, is you must turn off section editing for the page (the template does that for you)
 
If most fields are left blank they do not show up.
Set 'deprecated=none' if the function is depreciated but lacks a replacement.
 
<pre>
{{LSLFunctionAll
|func=llFunction
|func_id
|func_sleep=0.0
|func_energy=0.0
|func_desc
|func_footnote
|deprecated
|p1_type|p1_name|p1_desc
|p2_type|p2_name|p2_desc
|p3_type|p3_name|p3_desc
|p4_type|p4_name|p4_desc
|p5_type|p5_name|p5_desc
|p6_type|p6_name|p6_desc
|p7_type|p7_name|p7_desc
|p8_type|p8_name|p8_desc
|p9_type|p9_name|p9_desc
|p10_type|p10_name|p10_desc
|p11_type|p11_name|p11_desc
|p12_type|p12_name|p12_desc
|return_type=integer
|return_text=that is set to zero.
|constants
|spec=Function template thingy
|caveats
|examples
|helpers
|also_header
|also_functions
|also_articles
|also_footer
|notes
}}
</pre>
 
==Example==
<div id="box">
{{LSLFunctionAll
|func=func
|func_id=func_id
|func_sleep=func_sleep
|func_energy=func_energy
|func_desc=func_desc(hides if excluded)
|func_footnote=func_footnote(hides if excluded)
|deprecated=deprecated (if you set to none, it excludes this text)
|p1_type=float|p1_name=only|p1_desc=excluded if not set
|p2_type=float|p2_name=sets|p2_desc
|p3_type=float|p3_name=type|p3_desc=excluded if not set
|p4_type=float|p4_name=and|p4_desc
|p5_type=float|p5_name=name|p5_desc=excluded if not set
|p6_type=float|p6_name=pairs|p6_desc
|p7_type=float|p7_name=that|p7_desc=excluded if not set
|p8_type=float|p8_name=are|p8_desc
|p9_type=float|p9_name=needed|p9_desc=excluded if not set
|p10_type|p10_name|p10_desc
|p11_type|p11_name|p11_desc
|p12_type|p12_name|p12_desc
|return_type=return_type
|return_text=return_text(hides if excluded, if return_type is excluded this value is ignored)
|constants=constants(hides if excluded)
|spec=spec(hides if excluded)
|caveats=caveats(defaults to none)
|examples=examples
|helpers=helpers(hides if excluded)
|also_header=also_header(hides if excluded)
|also_functions=also_functions(hides if excluded)
|also_articles=also_articles(hides if excluded)
|also_footer=also_footer(hides if excluded)
|notes=notes
}}
</div>
</noinclude>
<includeonly> {{#ifeq:{{FULLPAGENAME}}|Template:LSLFunctionAll|| __NOEDITSECTION__ }} {{#if:{{{depreciated|}}}{{{deprecated|}}}|
<div id="box" style="background:red;">
<div id="box" style="background:red;">
&nbsp;&nbsp;'''Deprecated Function'''
&nbsp;&nbsp;''' Outdated templated used '''
<div style="padding: 0.5em;background:#ffffff;">
<div style="padding: 0.5em;background:#ffffff;">
''(This function has been deprecated{{#ifeq:{{{depreciated|}}}{{{deprecated|}}}|none|.|, please use {{LSLG|{{{depreciated|}}}{{{deprecated|}}}}} instead.}}''</div></div>{{#ifeq:{{FULLPAGENAME}}|Template:LSLFunctionAll|| [[Category:LSL Deprecated]] }} |not_deprecated=func}}
''Please change the template from 'LSLFunctionAll' to 'LSL_Function' (just replace 'LSLFunctionAll' with 'LSL_Function', do this after fixing any other erorr messages.''</div></div>{{#if:{{{self|}}}|| [[Category:LSL FixMe]] }}{{#if:{{{also|}}}|
{{#if:{{{also|}}}|
<div id="box" style="background:yellow;">
<div id="box" style="background:red;">
&nbsp;&nbsp;''' 'also' Tag Removed'''
&nbsp;&nbsp;''' 'also' Tag Removed'''
<div style="padding: 0.5em;background:#ffffff;">
<div style="padding: 0.5em;background:#ffffff;">
''(Please use 'also_header','also_functions','also_articles', or 'also_footer')''</div></div>{{#ifeq:{{FULLPAGENAME}}|Template:LSLFunctionAll|| [[Category:LSL FixMe]] }} }}
''(Please use 'also_header','also_events','also_functions','also_articles', or 'also_footer')''</div></div>{{#if:{{{self|}}}|| [[Category:LSL FixMe]] }} }}
<!-- {{lowercase|{{{func}}}}} -->
{{LSL Function
{| width="100%"
|func={{{func}}}
|-
|func_id={{{func_id}}}
|valign="top"|
|func_sleep={{{func_sleep}}}
{{LSLFunction|{{{func}}}|{{{func_id|}}}|{{{func_sleep|}}}|{{{func_energy|}}}|
|func_energy={{{func_energy}}}
|r={{{return_type|}}}
|func_desc={{{func_desc|}}}
|rd={{{return_text|}}}
|func_footnote={{{func_footnote|}}}
|p1t={{{p1_type|}}}|p1={{{p1_name|}}}|p1d={{{p1_desc|}}}
|deprecated={{{deprecated|}}}{{{depreciated|}}}
|p2t={{{p2_type|}}}|p2={{{p2_name|}}}|p2d={{{p2_desc|}}}
|return_type={{{return_type|}}}
|p3t={{{p3_type|}}}|p3={{{p3_name|}}}|p3d={{{p3_desc|}}}
|return_text={{{return_text|}}}
|p4t={{{p4_type|}}}|p4={{{p4_name|}}}|p4d={{{p4_desc|}}}
|p1_type={{{p1_type|}}}|p1_name={{{p1_name|}}}|p1_desc={{{p1_desc|}}}
|p5t={{{p5_type|}}}|p5={{{p5_name|}}}|p5d={{{p5_desc|}}}
|p2_type={{{p2_type|}}}|p2_name={{{p2_name|}}}|p2_desc={{{p2_desc|}}}
|p6t={{{p6_type|}}}|p6={{{p6_name|}}}|p6d={{{p6_desc|}}}
|p3_type={{{p3_type|}}}|p3_name={{{p3_name|}}}|p3_desc={{{p3_desc|}}}
|p7t={{{p7_type|}}}|p7={{{p7_name|}}}|p7d={{{p7_desc|}}}
|p4_type={{{p4_type|}}}|p4_name={{{p4_name|}}}|p4_desc={{{p4_desc|}}}
|p8t={{{p8_type|}}}|p8={{{p8_name|}}}|p8d={{{p8_desc|}}}
|p5_type={{{p5_type|}}}|p5_name={{{p5_name|}}}|p5_desc={{{p5_desc|}}}
|p9t={{{p9_type|}}}|p9={{{p9_name|}}}|p9d={{{p9_desc|}}}
|p6_type={{{p6_type|}}}|p6_name={{{p6_name|}}}|p6_desc={{{p6_desc|}}}
|p10t={{{p10_type|}}}|p10={{{p10_name|}}}|p10d={{{p10_desc|}}}
|p7_type={{{p7_type|}}}|p7_name={{{p7_name|}}}|p7_desc={{{p7_desc|}}}
|p11t={{{p11_type|}}}|p11={{{p11_name|}}}|p11d={{{p11_desc|}}}
|p8_type={{{p8_type|}}}|p8_name={{{p8_name|}}}|p8_desc={{{p8_desc|}}}
|p12t={{{p12_type|}}}|p12={{{p12_name|}}}|p12d={{{p12_desc|}}}
|p9_type={{{p9_type|}}}|p9_name={{{p9_name|}}}|p9_desc={{{p9_desc|}}}
|tb={{{func_desc|}}}
|p10_type={{{p10_type|}}}|p10_name={{{p10_name|}}}|p10_desc={{{p10_desc|}}}
|te={{{func_footnote|}}}
|p11_type={{{p11_type|}}}|p11_name={{{p11_name|}}}|p11_desc={{{p11_desc|}}}
}}
|p12_type={{{p12_type|}}}|p12_name={{{p12_name|}}}|p12_desc={{{p12_desc|}}}
|-
|constants={{{constants|}}}
|{{ #if: {{{spec|}}} |
|spec={{{spec|}}}
<div id="box">
|caveats={{{caveats|}}}
== Specification ==
|examples={{{examples|}}}
<div style="padding: 0.5em">
|helpers={{{helpers|}}}
{{{spec}}}
|also_header={{{also_header|}}}
</div>
|also_events={{{also_events|}}}
</div>
|also_functions={{{also_functions|}}}
| }}
|also_articles={{{also_articles|}}}
|-
|also_footer={{{also_footer|}}}
|{{ #if: {{{constants|}}} |
|notes={{{notes|}}}
<div id="box">
|mode={{{mode|}}}
== Constants ==
|sort={{{sort|}}}
<div style="padding: 0.5em">
}}</includeonly>
{{{constants}}}
</div>
</div>
| }}
|-
|<div id="box">
== Caveats ==
<div style="padding: 0.5em">
{{ #if: {{{caveats|}}} | {{{caveats|}}} |
* None known
}}
</div>
</div>
|-
|{{ #if: {{{not_deprecated|}}}{{{examples|}}} |
<div id="box">
== Examples ==
<div style="padding: 0.5em">
{{ #if: {{{examples|}}} | {{{examples|}}} | }}
</div>
</div>
|}}
|-
|{{ #if: {{{helpers|}}} |
<div id="box">
== Helper Functions ==
<div style="padding: 0.5em">
{{{helpers}}}
</div>
</div>
| }}
|-
|{{ #if: {{{not_deprecated|}}}{{{notes|}}} |
<div id="box">
== Notes ==
<div style="padding: 0.5em">
{{ #if: {{{notes|}}} | {{{notes|}}} | }}
</div>
</div>
|}}
|-
|{{ #if: {{{also_footer|}}}{{{related|}}}{{{also_functions|}}}{{{also_articles|}}}{{{also_header|}}} |
<div id="box">
== See Also ==
<div style="padding: 0.5em">
{{ #if: {{{also_header|}}} | {{{also_header}}}<br /> |}}{{ #if: {{{related|}}}{{{also_functions|}}} |
<ul><li> Functions </li></ul>
<dl><dd>
{{{related|}}}
{{{also_functions|}}}</dl> | }}{{ #if: {{{also_articles|}}} |
<ul><li> Articles </li></ul>
<dl><dd>
{{{also_articles}}}</dl> | }} {{{also_footer|}}}
</div>
</div>
| }}
|}
{{ #if: {{{no_footer|}}} | |:<div style="font-size:x-small;">This page is based on information gathered from the Second Life client {{HoverText|source|'linden\indra\lscript\lscript_library\lscript_library.cpp'}}, and as such has additional [http://secondlife.com/developers/opensource/licenses licensing restrictions].</div> }}
</includeonly>

Latest revision as of 02:29, 28 January 2007