LSL Editing Primer
Revision as of 08:49, 11 February 2007 by Strife Onizuka (talk | contribs)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
In the LSL Portal area of the wiki there are several templates in use for standardizing appearance and making editing easier.
Universal
There are several universal templates, the most used template names are short for ease of typing.
Name | Description | example |
---|---|---|
{{LSLG|page|text}} | Links between pages Use for pages in the LSL_ pseudo-namespace. if text is omitted then it defaults to page |
{{LSLG|llAbs|integer absolute value}} integer absolute value {{LSLG|llAbs}} llAbs |
{{LSLC|page|sort}} | Adds a page to a group Use instead of [[Category:LSL name|name]] sort is optional, the template will try to calculate it. |
|
{{LSLGC|category|text}} | Links to a LSL Category Use instead of [[:Category:LSL category|text]] if text is omitted then it defaults to category |
{{LSLGC|Math/3D|3D Math Functions}} 3D Math Functions {{LSLGC|Math}} Math |
{{HoverText|word|description}} | When you move the cursor over this it shows a box containing description. | {{HoverText|monkeys|A species of mammal}} monkeys |
{{LSL_Header}} | Used for pages that don't use a template that includes it. Like categories. | {{LSL Header}} {{{1}}} |
{{LSL_Hex|hex|int}} | A HoverText for hex showing the int with a short standard description. | {{LSL Hex|0x100|256}} 0x100 |
{{!}} | ' for when embedding them in templates parameters. | {{LSL Hex|0x100|256}} 0x100 |
Embedding Tables
One of the weaknesses in MediaWiki is the difficulty in embedding tables as parameters for templates. There are a few ways around this.
- Write the table in HTML using <table> & </table>, <tr> & </tr>, <td> & </td> tags. If you go this route you must close your tags properly (or MediaWiki will do strange things).
- Use MediaWiki syntax for tables and replace every occurrence (not being used as a template separator) of '|' with '{{!}}'
- Wrap the table with <div></div> tags.
- Note that you may need to play with the whitespace to get MediaWiki to display it properly.
Before | After | Embedded | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{|{{Prettytable}} ! Permissions ! Value ! Description |- | {{LSLG|PERM_ALL}} | {{LSL Hex|0x7FFFFFFF|2147483647}} | Move/Modify/Copy/Transfer permissions |- | {{LSLG|PERM_COPY}} | {{LSL Hex|0x00008000|32768}} | Copy permission |- | {{LSLG|PERM_MODIFY}} | {{LSL Hex|0x00004000|16384}} | Modify permission |- | {{LSLG|PERM_MOVE}} | {{LSL Hex|0x00080000|524288}} | Move permission |- | {{LSLG|PERM_TRANSFER}} | {{LSL Hex|0x00002000|8192}} | Transfer permission |} |
{{{!}}{{Prettytable}} ! Permissions ! Value ! Description {{!}}- {{!}} {{LSLG|PERM_ALL}} {{!}} {{LSL Hex|0x7FFFFFFF|2147483647}} {{!}} Move/Modify/Copy/Transfer permissions {{!}}- {{!}} {{LSLG|PERM_COPY}} {{!}} {{LSL Hex|0x00008000|32768}} {{!}} Copy permission {{!}}- {{!}} {{LSLG|PERM_MODIFY}} {{!}} {{LSL Hex|0x00004000|16384}} {{!}} Modify permission {{!}}- {{!}} {{LSLG|PERM_MOVE}} {{!}} {{LSL Hex|0x00080000|524288}} {{!}} Move permission {{!}}- {{!}} {{LSLG|PERM_TRANSFER}} {{!}} {{LSL Hex|0x00002000|8192}} {{!}} Transfer permission {{!}}} |
|
Functions
Events
Constants
Not finalized