Template:Document Comments: Difference between revisions

From The Talos Principle Wiki
m removed initial blank line
m documentation
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
==== Comments ====
<noinclude>This template is used to show the in-universe comments section of a document in The Talos Principle 2. It also creates the "Comments" header automatically.
{| style="border-left:1px solid black; padding-left: 5px; margin-left: 20px;"
|-
| style="text-align:left; font-weight:bold;" | {{{author1}}}
|-
| style="text-align:left;" | {{{comment1}}}
{{#if: {{{author2|}}} |
  {{!}}-
  {{!}} style="text-align:left; font-weight:bold;" {{!}} {{{author2}}}
  {{!}}-
  {{!}} style="text-align:left;" {{!}} {{{comment2|}}}
  |
}}{{#if: {{{author3|}}} |
  {{!}}-
  {{!}} style="text-align:left; font-weight:bold;" {{!}} {{{author3}}}
  {{!}}-
  {{!}} style="text-align:left;" {{!}} {{{comment3|}}}
  |
}}{{#if: {{{author4|}}} |
  {{!}}-
  {{!}} style="text-align:left; font-weight:bold;" {{!}} {{{author4}}}
  {{!}}-
  {{!}} style="text-align:left;" {{!}} {{{comment4|}}}
  |
}}{{#if: {{{author5|}}} |
  {{!}}-
  {{!}} style="text-align:left; font-weight:bold;" {{!}} {{{author5}}}
  {{!}}-
  {{!}} style="text-align:left;" {{!}} {{{comment5|}}}
  |
}}{{#if: {{{author6|}}} |
  {{!}}-
  {{!}} style="text-align:left; font-weight:bold;" {{!}} {{{author6}}}
  {{!}}-
  {{!}} style="text-align:left;" {{!}} {{{comment6|}}}
  |
}}
|}
<noinclude>== Usage ==
Example with one comment:
 
{{Document Comments
|author1=Dog
|comment1=Hello
}}
 
Two comments:


== Usage ==
With the source editor,
<pre>{{Document Comments
|author1 = Dog
|comment1 = Hello
|author2 = Cat
|comment2 = Bye
}}</pre>
produces
{{Document Comments
{{Document Comments
|author1=Dog
|author1 = Dog
|comment1=Hello
|comment1 = Hello
|author2=Cat
|author2 = Cat
|comment2=Bye
|comment2 = Bye
}}
}}


Line 71: Line 34:
"author2": {
"author2": {
"label": "Author 2",
"label": "Author 2",
"description": "Uncheck the box for this field if the document has only one comment. Check the boxes for Author 3 and Comment 3, etc., if the document has more than two comments.",
"description": "Optional. Check the boxes for Author 3 and Comment 3, etc., if the document has more than two comments.",
"type": "string",
"type": "string",
"suggested": true
"suggested": true
Line 77: Line 40:
"comment2": {
"comment2": {
"label": "Comment 2",
"label": "Comment 2",
"description": "Uncheck the box for this field if the document has only one comment. Check the boxes for Author 3 and Comment 3, etc., if the document has more than two comments.",
"description": "Optional. Check the boxes for Author 3 and Comment 3, etc., if the document has more than two comments.",
"type": "string",
"type": "string",
"suggested": true
"suggested": true
Line 126: Line 89:
}
}
</templatedata></noinclude>
</templatedata></noinclude>
==== Comments ====
{| style="border-left:1px solid black; padding-left: 5px; margin-left: 20px;"
|-
| '''{{{author1}}}'''<br/>{{{comment1}}}
|- style="{{#if: {{{author2|}}} | {{#if: {{{comment2|}}} | | display:none; }} | display:none; }}"
| '''{{{author2}}}'''<br/>{{{comment2}}}
|- style="{{#if: {{{author3|}}} | {{#if: {{{comment3|}}} | | display:none; }} | display:none; }}"
| '''{{{author3}}}'''<br/>{{{comment3}}}
|- style="{{#if: {{{author4|}}} | {{#if: {{{comment4|}}} | | display:none; }} | display:none; }}"
| '''{{{author4}}}'''<br/>{{{comment4}}}
|- style="{{#if: {{{author5|}}} | {{#if: {{{comment5|}}} | | display:none; }} | display:none; }}"
| '''{{{author5}}}'''<br/>{{{comment5}}}
|- style="{{#if: {{{author6|}}} | {{#if: {{{comment6|}}} | | display:none; }} | display:none; }}"
| '''{{{author6}}}'''<br/>{{{comment6}}}
|}

Latest revision as of 07:18, 16 June 2024

This template is used to show the in-universe comments section of a document in The Talos Principle 2. It also creates the "Comments" header automatically.

Usage

With the source editor,

{{Document Comments
|author1 = Dog
|comment1 = Hello
|author2 = Cat
|comment2 = Bye
}}

produces

Comments

Dog
Hello
Cat
Bye
{{{author3}}}
{{{comment3}}}
{{{author4}}}
{{{comment4}}}
{{{author5}}}
{{{comment5}}}
{{{author6}}}
{{{comment6}}}

The in-universe comments section on a TTP2 document, including the header. (Max 6 comments)

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Author 1author1

Author of first comment. Sometimes this is text like "(failed to load profile)". For hex strings, use the format {{HexString|7468656d|them}}.

Stringrequired
Comment 1comment1

First comment. Sometimes this is text like "(failed to load comment)". For hex strings, use the format {{HexString|7468656d|them}}.

Stringrequired
Author 2author2

Optional. Check the boxes for Author 3 and Comment 3, etc., if the document has more than two comments.

Stringsuggested
Comment 2comment2

Optional. Check the boxes for Author 3 and Comment 3, etc., if the document has more than two comments.

Stringsuggested
Author 3author3

no description

Stringoptional
Comment 3comment3

no description

Stringoptional
Author 4author4

no description

Stringoptional
Comment 4comment4

no description

Stringoptional
Author 5author5

no description

Stringoptional
Comment 5comment5

no description

Stringoptional
Author 6author6

no description

Stringoptional
Comment 6comment6

no description

Stringoptional

Comments

{{{author1}}}
{{{comment1}}}
{{{author2}}}
{{{comment2}}}
{{{author3}}}
{{{comment3}}}
{{{author4}}}
{{{comment4}}}
{{{author5}}}
{{{comment5}}}
{{{author6}}}
{{{comment6}}}