Typical Colors 2 Wiki

Hello fellow reader and welcome to the unofficial Typical Colors 2 Wiki! Before editing and communicating, please read our Rules and Guidelines as well as the Encyclopedia for advanced editing tips and tricks.

READ MORE

Typical Colors 2 Wiki
Advertisement

This encyclopedia entry is 60% complete. Please add to this entry in order for it to more accurately cover its topic.
In particular, this requires: SQuoteQuery, Comma Separation, Templates

See also: Help:Structured Quotes on Community Central

Structured Quotes are a Fandom-specific feature that allows for the creation, querying, and retrieval of quotes. Creating a structured quote loads it onto the wiki's server, allowing it to be used from any page, similar to a template. Once loaded onto the server, quotes can be accessed in bulk by some parameter (i.e. all quotes said by person A), or a specific quote can be retrieved by its (user-defined) ID.

Creating Structured Quotes[]

Quotes are created with the following syntax:

{{#SQuote:
  id = <[required] unique identifier>
  |text = <[required] quote text>
  |speaker = <[required] character speaking (one or more wikitext links, external or internal links)>
  |receiver = <receiver of the quote (one or more wikitext links, external or internal links)>
  |attribution = <attribution (one or more wikitext links, external or internal links)>
  |author = <author (one or more wikitext links, external or internal links)>
  |source = <piece of media (wikitext links, external or internal links)>
  |template = <template name (as raw text)>
}}
id
This functions as the quote's name, and can be used with SQuoteGet. Neither whitespace nor special characters can be used, so usage of kebab-case or snake_case is recommended. It cannot be used in and does not affect queries. It is required for a quote to be created, and a quote will not work without it.
text
The quote itself. It is fairly lenient, as it has no obvious character limit and HTML tags, links, and templates appear to work. It is required for a quote to be created, and a quote will not work without it.
speaker
Speaker of the quote. It must be a link, either to a page on the wiki, an external wiki, or even a red link. It is required for a quote to be created, and a quote will not work without it.
receiver
To whom the quote is being spoken to. Make sure to spell it right. Don't be afraid to make the receiver something abstract, such as GRN. It must be a link. It is not required.
attribution
Attributions are usually the speaker, but for this wiki this will be used as the context in which the quote is said. An example might be for burning voicelines, one would link to Status effects#Afterburn. It must be a link. It is not required.
author
Author of the work, and probably won't be used much on this wiki. It must be a link. It is not required.
source
The piece of media the quote is from. Not particularly useful in our wiki, as we cover a single game, but a wiki that covers multiple games/movies/books could specify from which a quote is from. It must be a link. It is not required.
template
Creating a structured quote will place an instance of Template:StructuredQuote on the page that it is on. The template used can be changed using this parameter. The parameters will be passed to the template, i.e. the "id" parameter of this parser function will be given to the "id" parameter of the template.

If any other arguments are given, they will be passed to the template but not stored on the server.

Receiver, attribution, author, and source (and to a certain extent, speaker) are extremely similar in nature, as they are all optional attributes that store data, with no unique properties when it comes to usage. It is up to the wiki as to how the fields are used.

Here is an example quote being created.

{{#SQuote:
 id = encyclopedia-quote-1
 | text = Know your wiki and know how to edit and you can make a hundred edits without disaster.
 | speaker = [[User:TheFlamingX]]
 | attribution = [[Typical Colors 2 Wiki:Encyclopedia|Encyclopedia]]
}}
Know your wiki and know how to edit and you can make a hundred edits without disaster.

User:TheFlamingX, Encyclopedia

Getting Structured Quotes[]

Specific quotes can be retrieved from the server using {{#SQuoteGet}} and the quote's id.

Quotes are retrieved with the following syntax:

{{#SQuoteGet:
  id = <[required] identifier of a previously defined quote>
 | template = <template on the wiki>
}}
id
The id of a quote created using {{#SQuote}}.
template
Template the quote's data is inserted into. By default, it's placed into Template:StructuredQuote.

Here is an example to get the previous example quote.

{{#SQuoteGet:
 id = encyclopedia-quote-1
}}
Know your wiki and know how to edit and you can make a hundred edits without disaster.

User:TheFlamingX, Encyclopedia

Querying Structured Quotes[]

Several quotes can be retrieved from the server simultaneously using {{#SQuoteQuery}}

Quotes are queried with the following syntax:

{{#SQuoteQuery:
 limit = <number of quotes to show>
 | speaker = <individual(s) who uttered or wrote the quoted words (wikitext links, comma-separated)>
 | receiver = <person the quote was spoken to (wikitext links, comma-separated)>
 | attribution = <attribution (wikitext links, comma-separated)>
 | source = <place where it was spoken (wikitext link)>
 | author = <author (wikitext links, comma-separated)>
 | template = <template name (as raw text)>
}}

All arguments are optional.

limit
The maximum amount of quotes to show. If the limit is less than the amount of qualifying quotes, a random selection will be given.
speaker
Only include quotes spoken by an individual. If there are multiple comma separated speakers, only include quotes spoken by all of them.
receiver
Only include quotes received by an individual. If there are multiple comma separated receivers, only include quotes received by all of them.
attribution
Only include quotes attributed to an individuals. If there are multiple people to whom the quote is attributed to, only include quotes attributed to all of them.
author
Sample
source
Sample
template
Sample

Here is an example of a query:

{{#SQuoteQuery:
 speaker = [[User:TheFlamingX]]
}}
Know your wiki and know how to edit and you can make a hundred edits without disaster.

User:TheFlamingX, Encyclopedia

This is a sample for the template parameter section

User:TheFlamingX

Make the background opaque!

User:TheFlamingX,User:Annihilator Bot, Encyclopedia

Template parameter[]

Using {{#SQuote}},{{#SQuoteGet}}, or {{#SQuoteQuery}} creates an instance of Template:StructuredQuote. In other words, the example from the quote creation section is visually identical to this example, the only difference being that it does not create a quote to be put on the server:

{{StructuredQuote
 | id = encyclopedia-quote-1
 | text = Know your wiki and know how to edit and you can make a hundred edits without disaster.
 | speaker = [[User:TheFlamingX]]
 | attribution = [[Typical Colors 2 Wiki:Encyclopedia|Encyclopedia]]
}}

The template argument can change the template used from StructuredQuote to something else. The arguments passed to the template are the values of the quote. If an editor uses any arguments that aren't a part of the structured quote hierarchy in {{#SQuote}}, the arguments will be passed the template. If an editor uses arguments that are not a part of structured quotes in {{#SQuoteGet}} or {{#SQuoteQuery}}, the arguments will be ignored and not given to the template.

With SQuoteGet
{{#SQuoteGet:
 id = encyclopedia-quote-1
 | template = Return args
 | non-squote-parameter = argument
}}
{{Template
 | "id" = "encyclopedia-quote-1"
 | "text" = "Know your wiki and know how to edit and you can make a hundred edits without disaster."
 | "attribution" = "[[Typical Colors 2 Wiki:Encyclopedia|Encyclopedia]]"
 | "speaker" = "[[User:TheFlamingX]]"
}}
The parameter "non-squote-parameter" does not appear in the template because it was not passed to the template
With SQuote
{{#SQuote:
 id = encyclopedia-quote-template
 | text = This is a sample for the template parameter section
 | speaker = [[User:TheFlamingX]]
 | template = Return args
 | non-squote-parameter = argument
}}
{{Template
 | "non-squote-parameter" = "argument"
 | "template" = "Return args"
 | "speaker" = "[[User:TheFlamingX]]"
 | "id" = "encyclopedia-quote-template"
 | "text" = "This is a sample for the template parameter section"
}}
The parameter "non-squote-parameter" does appear in the template because it was passed to the template

Multiple links[]

Certain arguments accept multiple links. These links must be formatted with a single comma (,) between them, with no whitespace surrounding that comma.

These arguments are as follows, in both {{#SQuote}} and {{#SQuoteQuery}}:

  • speaker
  • reciever
  • attribution
  • author
  • source

The following returns an error because there is a space in the speakers' names.

{{#SQuote:
 id = encyclopedia-quote-links
 | text = Make the background opaque!
 | speaker = [[User:TheFlamingX]], [[User:Annihilator Bot]]
 | attribution = [[Typical Colors 2 Wiki:Encyclopedia|Encyclopedia]]
}}

Speaker links must be linked to a wiki page and use the correct wikitext format.

This functions as intended, after the space is removed.

{{#SQuote:
 id = encyclopedia-quote-links
 | text = Make the background opaque!
 | speaker = [[User:TheFlamingX]],[[User:Annihilator Bot]]
 | attribution = [[Typical Colors 2 Wiki:Encyclopedia|Encyclopedia]]
}}
Make the background opaque!

User:TheFlamingX,User:Annihilator Bot, Encyclopedia

When dealing with multiple link quotes with {{#SQuoteQuery}}, it will show all quotes said by that individual.

{{#SQuoteQuery:
 limit = 3
 | speaker = [[User:TheFlamingX]],[[User:Annihilator Bot]]
}}
Make the background opaque!

User:TheFlamingX,User:Annihilator Bot, Encyclopedia

Original SQuote Order does not matter when querying.

{{#SQuoteQuery:
 limit = 3
 | speaker = [[User:Annihilator Bot]],[[User:TheFlamingX]]
}}
Make the background opaque!

User:TheFlamingX,User:Annihilator Bot, Encyclopedia

Advertisement