Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Template:Script overview/doc"

From Roll20 Wiki

Jump to: navigation, search
(Created page with "Creates a metadata box for displaying on a script page == Parameters == {| class="wikitable" |- ! Name ! Description |- || author || The user ID of the script author. This t...")
 
m
 
(17 intermediate revisions by one user not shown)
Line 1: Line 1:
Creates a metadata box for displaying on a script page
+
{{documentation subpage|override=script overview/doc|Script overview}}
 +
Creates a metadata box for displaying on an [[API]] script page, along with giving the page [[:Category:User API Scripts]].
  
 
== Parameters ==
 
== Parameters ==
Line 7: Line 8:
 
! Name
 
! Name
 
! Description
 
! Description
 +
|-
 +
|| name
 +
|| The name to use when categorizing this script page in [[:Category:User API Scripts|User API Scripts]].
 
|-
 
|-
 
|| author
 
|| author
|| The user ID of the script author. This template will then link to that user's wiki userpage.
+
|| The user ID of the script author. This template will then link to that user's wiki userpage. Please use {{tlx|User profile}} or wiki link for each author of the script.
 +
|-
 +
|| code
 +
|| Name of the directory and JavaScript file in the {{api-gh| API Script Repository}}. If this parameter is not supplied, it will default to the value of <code>name</code>.
 
|-
 
|-
 
|| lastmodified
 
|| lastmodified
Line 16: Line 23:
 
|| version
 
|| version
 
|| The current version of the script. A version number in the form <code>major.minor</code> is recommended.
 
|| The current version of the script. A version number in the form <code>major.minor</code> is recommended.
 +
|-
 +
|| dependencies
 +
|| Links to scripts in to API Script Repository which are required for this script to function. Please use {{tlx|api-gh}}, {{tlx|Api repository link}} for each dependency.
 +
|-
 +
|| conflicts
 +
|| Links to scripts in the API Script Repository which cause problems when run alongside this script. Please use {{tlx|api-gh}}, or {{tlx|Api repository link}} for each conflict.
 +
|-
 +
|| nocat
 +
|| If given and set to any value except <code>false</code>, the page will ''not'' be automatically categorized. The <code>name</code> parameter and the second unnamed parameter then become superfluous.
 
|}
 
|}
  
Additionally, if an unnamed parameter is given, it will be used to set the float direction of the box. (Default is <code>right</code>.)
+
Additionally, if an unnamed parameter is given, it will be used to set the float direction of the box. (Default is <code>right</code>.) If two unnamed parameters are given, the second will be used as the default value for <code>name</code>
  
 
== Usage ==
 
== Usage ==
Line 28: Line 44:
 
|-
 
|-
 
| <pre>{{script overview
 
| <pre>{{script overview
|author=84478
+
|name=Auto Initiative
 +
|author={{user profile|84478|Josh}}
 
|lastmodified=2013-12-30
 
|lastmodified=2013-12-30
 
|version=2.2}}</pre>
 
|version=2.2}}</pre>
| {{script overview|author=84478|lastmodified=2013-12-30|version=2.2}}
+
| {{script overview|name=Auto Initiative|author={{user profile|84478|Josh}}|lastmodified=2013-12-30|version=2.2|nocat=true}}
 +
|-
 +
| <pre>{{script overview
 +
|name=Example Script
 +
|author={{user profile|0001|John Doe}}, {{user profile|0002|Jane Doe}}
 +
|lastmodified=0001-01-01
 +
|code=Example API Script
 +
|dependencies={{api repository link|Utilities Example}}, {{api repository link|Extensions}}
 +
|conflicts={{api repository link|Kitchen Sink}}
 +
|version=0.0}}</pre>
 +
| {{script overview|name=Example Script|code=Example API Script|dependencies={{api repository link|Utilities Example}}, {{api repository link|Extensions}}|author={{user profile|0001|John Doe}}, {{user profile|0002|Jane Doe}}|lastmodified=0001-01-01|conflicts={{api repository link|Kitchen Sink}}|version=0.0|nocat=true}}
 
|}
 
|}
<noinclude>[[Category:Template Documentation]]</noinclude>
+
This page would also be categorized with <code><nowiki>[[Category:User API Scripts|Auto Initiative]]</nowiki></code> and <code><nowiki>[[Category:UserAPI Scripts|Example Script]]</nowiki></code>, although the <code>nocat</code> parameter is being invoked on this demonstration.
 
<includeonly>[[Category:API Templates]]</includeonly>
 
<includeonly>[[Category:API Templates]]</includeonly>

Latest revision as of 14:53, 19 October 2021

Creates a metadata box for displaying on an API script page, along with giving the page Category:User API Scripts.

[edit] Parameters

Name Description
name The name to use when categorizing this script page in API Scripts.
author The user ID of the script author. This template will then link to that user's wiki userpage. Please use {{ profile}} or wiki link for each author of the script.
code Name of the directory and JavaScript file in the GitHubLogo.png. If this parameter is not supplied, it will default to the value of name.
lastmodified The date that the script was most recently updated. Should be in the form yyyy-mm-dd
version The current version of the script. A version number in the form major.minor is recommended.
dependencies Links to scripts in to API Script Repository which are required for this script to function. Please use {{api-gh}}, {{Api repository link}} for each dependency.
conflicts Links to scripts in the API Script Repository which cause problems when run alongside this script. Please use {{api-gh}}, or {{Api repository link}} for each conflict.
nocat If given and set to any value except false, the page will not be automatically categorized. The name parameter and the second unnamed parameter then become superfluous.

Additionally, if an unnamed parameter is given, it will be used to set the float direction of the box. (Default is right.) If two unnamed parameters are given, the second will be used as the default value for name

[edit] Usage

Wikitext Output
{{script overview
|name=Auto Initiative
|author={{user profile|84478|Josh}}
|lastmodified=2013-12-30
|version=2.2}}
API ScriptAuthor: Josh
Version: 2.2
Last Modified: 2013-12-30
Code: Auto Initiative
Dependencies: None
Conflicts: None
{{script overview
|name=Example Script
|author={{user profile|0001|John Doe}}, {{user profile|0002|Jane Doe}}
|lastmodified=0001-01-01
|code=Example API Script
|dependencies={{api repository link|Utilities Example}}, {{api repository link|Extensions}}
|conflicts={{api repository link|Kitchen Sink}}
|version=0.0}}
API ScriptAuthor: John Doe, Jane Doe
Version: 0.0
Last Modified: 0001-01-01
Code: Example API Script
Dependencies: Utilities Example, Extensions
Conflicts: Kitchen Sink

This page would also be categorized with [[Category:User API Scripts|Auto Initiative]] and [[Category:UserAPI Scripts|Example Script]], although the nocat parameter is being invoked on this demonstration.