Template:Phone history: Difference between revisions

From Tears of Themis Wiki
imported>Harmonea
m (link icon to phone page)
(adding forcecargo override for items on subpages that won't be transcluded)
 
(5 intermediate revisions by one other user not shown)
Line 5: Line 5:
-->{{#cargo_declare:_table=PhoneHistory
-->{{#cargo_declare:_table=PhoneHistory
|name=String
|name=String
|icon=String
|icon=File
|historyType=String
|historyType=String
|contact=String
|contact=String
Line 13: Line 13:
### Cargo Store
### Cargo Store


-->{{#cargo_store:_table=PhoneHistory
-->{{#vardefine:cargoStore|{{{forceCargo|{{#ifeq:{{PAGENAME}}|{{ROOTPAGENAME}}|1|0}} }}} }}<!--
-->{{#ifeq:{{#var:cargoStore}}|1|{{#cargo_store:_table=PhoneHistory
|name={{{name|{{ROOTPAGENAME}}}}}
|name={{{name|{{ROOTPAGENAME}}}}}
|icon={{{icon|{{#ifeq:{{{historyType|}}}|Video Call|{{{name|{{ROOTPAGENAME}}}}} phone icon.png}}}}}
|icon={{{icon|{{#ifeq:{{{historyType|}}}|Video Call|{{{name|{{ROOTPAGENAME}}}}} phone icon.png}}}}}
Line 19: Line 20:
|contact={{{contact|}}}
|contact={{{contact|}}}
|unlockCondition={{ROOTPAGENAME}} {{#if:{{{unlock|}}}|({{{unlock|}}})}}
|unlockCondition={{ROOTPAGENAME}} {{#if:{{{unlock|}}}|({{{unlock|}}})}}
}}<!--
}}}}<!--


### Template Display
### Template Display


-->{|class="wikitable" id="PhoneItem_{{{name|{{ROOTPAGENAME}}}}}"
-->{|class="wikitable" style="margin:0px; padding:0px;" id="PhoneItem_{{{name|{{ROOTPAGENAME}}}}}"
|-
!style="background: #c0c0c0" width="60px"|[[File:Phone {{lc:{{{historyType|}}}}} icon.png|50px|link=Phone#{{{historyType|}}}s]]<br />{{{historyType|}}}
!style="background: #c0c0c0" width="60px"|[[File:Phone {{lc:{{{historyType|}}}}} icon.png|50px|link=Phone#{{{historyType|}}}s]]<br />{{{historyType|}}}
|style="border-right:0px; {{#ifeq:{{{historyType|}}}|Video Call| |display:none}}"|{{#ifeq:{{{historyType|}}}|Video Call|[[File:{{{icon|{{{name|{{ROOTPAGENAME}}}}} phone icon.png}}}|100px]]}}
|style="border-right:0px; {{#ifeq:{{{historyType|}}}|Video Call| |display:none}}"|{{#ifeq:{{{historyType|}}}|Video Call|[[File:{{{icon|{{{name|{{ROOTPAGENAME}}}}} phone icon.png}}}|100px]]}}
|style="border-left:0px; padding-right:20px"|{{#switch:{{{contact|}}}|Group=NXX Group Chat|#default={{{contact|}}}}}:<br/>{{{name|{{ROOTPAGENAME}}}}}
|style="border-left:0px; padding-right:15px"|{{#switch:{{{contact|}}}|Group=NXX Group Chat|#default={{{contact|}}}}}:<br/>{{{name|{{ROOTPAGENAME}}}}}
{{#if:{{{unlock|}}}|:''({{{unlock|}}})''}}
{{#if:{{{unlock|}}}|:''({{{unlock|}}})''}}
|}
|}

Latest revision as of 21:27, 13 January 2023

Template-info.png Documentation

Description[edit source]

Template used to display a small header containing information about any phone history item (Texts, calls, messages) while also storing it to Cargo for querying on other pages. It also contains an invisible anchor to #PhoneItem_(name) for quick linking.

Usage[edit source]

{{Phone history
|name=
|historyType=
|contact=
|unlock=
}}
  • The "name" field should display any label under which the call/message is stored in the phone object. For Video Calls this is typically the card name (when the call is attached to a card). For Text Messages, this is the "topic" tab.
  • The "historyType" field should be one of the following if you'd like the call/message to go through to the Phone page:
    • Text Message
    • Video Call
    • Voice Call
    • Voice Message
  • The "contact" field is the male lead involved in the call or message.
  • The "unlock" field is optional and should contain any information about how to unlock the call or message other than the name of the card or story.
  • An optional "icon" field exists to override the default icon filename if needed (applies to video calls only).

Example[edit source]

{{Phone history
|name=Sweet and Sour Pork
|historyType=Text Message
|contact=Artem
|unlock=After Story 3
}}
Phone text message icon.png
Text Message
Artem:
Sweet and Sour Pork
(After Story 3)
This template defines the table "PhoneHistory". View table.