Template:Vehicle row: Difference between revisions

From Pixar Cars Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 28: Line 28:
}}</noinclude><includeonly><!--
}}</noinclude><includeonly><!--
//reset on every loop (keep above + OUT of series index)
//reset on every loop (keep above + OUT of series index)
-->{{#vardefine:sort_model_name|{{#rreplace:{{{sort_name|{{{model_name|{{#var:escape}}}}}}}}|["']|}}}}<!--
//
-->{{#vardefine:namestring|{{#if:{{#var:escape}}|{{{sort_name|{{#var:escape}}}}}| }}}}<!--
// n and r represent the current row ID and release ID, respectively. n is simply the number row on the page, whereas release ID tracks helps certain overrides in the collector number and appearance lists. These are defined ahead of this template (in {{vehicle table}}) because this template loops, and we don't want to reset to the initial value (0) each time.
-->{{#vardefine:year|{{{year|}}}}}{{#vardefine:secondary_sortkey|}}
// Set the current Row ID. (starts at 1)
{{#vardefine:n|{{#expr:{{#var:n}}+1}}}}
-->{{#vardefine:n|{{#expr:{{#var:n}}+1}}}}<!--
{{#vardefine:toy_number|{{{toy|{{TBA}}}}}}}<!--
// The Release ID starts at 0; compare to previous and add +1 if released
// save last value of R for comparison, then add +1 if released
-->{{#vardefine:rlast|{{#var:r}}}}<!--
-->{{#vardefine:rlast|{{#var:r}}}}
-->{{#ifeq:{{{released|}}}|X||{{#vardefine:r|{{#expr:{{#var:r}}+1}}}}}}<!--
{{#ifeq:{{{released|}}}|X||{{#vardefine:r|{{#expr:{{#var:r}}+1}}}}}}<!--
//
// run through series index
// Prepare and save the parameters as variables.
-->{{Series index|1={{{series|}}}|year={{{year|}}}|format={{{format|}}}|segment={{{segment|}}}|chase={{{chase|}}}|sub={{{sub|}}}|colno={{{colno|}}}|asst={{{asst|}}}|released={{{released|}}}|version={{{version|}}}|toy={{{toy|}}}}}
// escape " and ' characters in model name string, to avoid SQL query conflict
{{Segment index|year={{{year|}}}|segment={{{segment|}}}|sub={{{sub|}}}|series={{{series|}}}}}<!--
-->{{#vardefine:escape_model_string|{{Model name escape|string={{{sort_name|{{#var:escape_namestring}}}}}}}}}<!--
-->{{#vardefine:exclusive_id|{{#switch:{{#var:exclusive}}
//
| Target | TGT | T = TGT
// misc. general
| Toys R Us | TRU = TRU
-->{{#vardefine:year|{{{year|}}}}}<!--
| Walmart | WM = WM
| Kmart | KM = KM
| Red Line Club | RLC = RLC
| Amazon | A = A
| Disney Parks | DP = DP
|0}}}}<!--
-->{{#vardefine:exclusive_display|
{{Exclusive|1={{#var:exclusive_id}}}}}}<!--
-->{{#vardefine:sub_number|{{{sub_number|}}}}}<!--
-->{{#vardefine:sub_number|{{{sub_number|}}}}}<!--
// sort type ID into checkbox filters
-->{{#vardefine:toy_number|{{{toy|{{TBA}}}}}}}<!--
-->{{#vardefine:card_given|{{{card|{{{card2|}}}}}}}}<!--
-->{{#vardefine:edit_shortcut|<span class="plainlinks">[https://www.pixarcarswiki.com/{{FULLPAGENAMEE}}?action=edit&section={{#expr:{{#var:n}}+1}} edit]</span>}}<!--
-->{{#vardefine:secondary_sortkey|}}<!-- This can probably go in series index for organization?
//
// run through both series and segment indexes. This was initially designed to minimize switch statement runs before 'type' param was discontinued. Now likely to be converted into its own Cargo table set by the series pages' infoboxes, since we have to run a query each level due to Cases anyway.
-->{{Series index|1={{{series|}}}|year={{{year|}}}|format={{{format|}}}|segment={{{segment|}}}|chase={{{chase|}}}|sub={{{sub|}}}|colno={{{colno|}}}|asst={{{asst|}}}|released={{{released|}}}|version={{{version|}}}|toy={{{toy|}}}}}<!--
-->{{Segment index|year={{{year|}}}|segment={{{segment|}}}|sub={{{sub|}}}|series={{{series|}}}}}<!--
//
// prepare sortkeys for the table display.
-->{{#vardefine:asst_sortkey|{{#ifeq:{{#var:asst}}|{{n/a}}|{{#var:toy_number}}|{{#var:asst}}}}}}<!--
-->{{#vardefine:rowtype|{{#switch:{{#var:ser_type}}
-->{{#vardefine:rowtype|{{#switch:{{#var:ser_type}}
| 8 = Other
| 8 = Other
| 9 = MiniRacer
| 9 = MiniRacer
| 155 }}
| 155 }} }}<!--
}}{{#vardefine:asst_sortkey|{{#ifeq:{{#var:asst}}|{{n/a}}|{{#var:toy_number}}|{{#var:asst}}}}}}
//
<!--
// Store the first release so the Vehicles table can access it for Appearances list
// Store the first release so the Vehicles table can access it for Appearances list
// Grab the first overall row, released or not. This prevents canceled re-releases from overriding their prior status
// Grab the first overall row, released or not. This prevents canceled re-releases from overriding their prior status
Line 66: Line 67:
{{#vardefine:first_release|{{M-series|released={{{released|}}}|series={{{series|}}}|year={{{year|}}}}}
{{#vardefine:first_release|{{M-series|released={{{released|}}}|series={{{series|}}}|year={{{year|}}}}}
}}|}}|}}<!--
}}|}}|}}<!--
// for multipack contents, doesn't work in Cargo due to qinu contents at the moment
//
// stuff that probably doesn't need to be in this template (series index).
-->{{#vardefine:exclusive_id|{{#switch:{{#var:exclusive}}
| Target | TGT | T = TGT
| Toys R Us | TRU = TRU
| Walmart | WM = WM
| Kmart | KM = KM
| Red Line Club | RLC = RLC
| Amazon | A = A
| Disney Parks | DP = DP
|0}}}}<!--
-->{{#vardefine:exclusive_display|
{{Exclusive|1={{#var:exclusive_id}}}}}}<!--
// for multipack contents, doesn't work in Cargo due to qinu contents at the moment. To be converted into template.
-->{{#vardefine:format_note|<span>{{#switch: {{{format|}}}
-->{{#vardefine:format_note|<span>{{#switch: {{{format|}}}
| 2-pack | Multipack = {{Notes|{{{format|}}}{{#if:{{{toy|}}}|&#59; with {{#cargo_query:table=Releases
| 2-pack | Multipack = {{Notes|{{{format|}}}{{#if:{{{toy|}}}|&#59; with {{#cargo_query:table=Releases
Line 74: Line 88:
|limit=36
|limit=36
}}|}}}} |}}</span>}}<!--
}}|}}}} |}}</span>}}<!--
// display the first given card
//
-->{{#vardefine:card_given|{{{card|{{{card2|}}}}}}}}<!--
//store data
//store data
-->{{#cargo_store:_table=Releases
-->{{#cargo_store:_table=Releases
|NumID={{#var:n}}
|RelID={{#var:r}}
|Rel={{#ifeq:{{{released|}}}|X|0|1}}
|International={{#if:{{{version|}}}|INT|NA}}
|Model_name={{#if:{{{paired_names|}}}|{{{paired_names|}}}|[[{{FULLPAGENAME}}#{{{toy|}}}_{{{year|}}}|{{{model_name|{{PAGENAME}}}}}]]}}{{#var:chasename}}
|Model_name={{#if:{{{paired_names|}}}|{{{paired_names|}}}|[[{{FULLPAGENAME}}#{{{toy|}}}_{{{year|}}}|{{{model_name|{{PAGENAME}}}}}]]}}{{#var:chasename}}
|Type={{#var:series_type}}
|Namestring={{#var:escape_model_string}}
|Type=<!-- this probably will be moved to aforementioned series table. -->{{#var:ser_type}}
|Format={{{format|}}}
|Format={{{format|}}}
|Year={{#if:{{{year|}}}|[[List of vehicles by year/{{{year|}}}|{{{year|}}}]]|{{n/a}}}}
|Year={{#if:{{{year|}}}|[[List of vehicles by year/{{{year|}}}|{{{year|}}}]]|{{n/a}}}}
Line 106: Line 124:
|Int_Card={{{int_card|}}}
|Int_Card={{{int_card|}}}
|Exclusive={{#var:exclusive_id}}
|Exclusive={{#var:exclusive_id}}
|Edit=<span class="plainlinks">[https://pixarcarswiki.com/{{FULLPAGENAMEE}}?action=edit&section={{#expr:{{#var:n}}+1}} edit]</span>
|Edit={{#var:edit_shortcut}}
<!-- Component -->
|Chase={{#var:chase}}
|Chase={{#var:chase}}
|Rel={{#ifeq:{{{released|}}}|X|0|1}}
<!-- ID -->
<!-- ID -->
|Namestring={{#var:escape}}
|NumID={{#var:n}}
|RelID={{#var:r}}
|Series_string={{#var:ser_finallink}}
|Series_string={{#var:ser_finallink}}
|International={{#if:{{{version|}}}|INT|NA}}
}}
}}
<!--  
<!--  
Line 124: Line 136:
|{{#if: {{{colno|}}} | [[{{#var:colnumber}}|{{{colno|}}}]] | &ndash;}}
|{{#if: {{{colno|}}} | [[{{#var:colnumber}}|{{{colno|}}}]] | &ndash;}}
|'''{{{model_name|{{PAGENAME}}}}}'''
|'''{{{model_name|{{PAGENAME}}}}}'''
|class="field_Year" |{{#if:{{{year|}}}|[[List of vehicles by year/{{{year|}}}|{{{year|}}}]]|{{n/a}}}}
|class="field_Year" | {{#if:{{{year|}}}|[[List of vehicles by year/{{#var:year}}|{{{year|}}}]]|{{n/a}}}}
|class="field_Series" | {{tooltip|text={{M-series|cats={{#var:cats}}|version={{{version|}}}|chase={{{chase|}}}|released={{{released|}}}|series={{{series|null}}}|year={{{year|}}}|sub={{{sub|}}}}}|content={{#if:{{#var:card_given}}|[[File:{{#var:card_given}}|120px]]|{{no-image}}}}}}
|class="field_Series" | {{tooltip|text={{M-series|cats={{#var:cats}}|version={{{version|}}}|chase={{{chase|}}}|released={{{released|}}}|series={{{series|null}}}|year={{{year|}}}|sub={{{sub|}}}}}|content={{#if:{{#var:card_given}}|[[File:{{#var:card_given}}|120px]]|{{no-image}}}}}}
|class="field_Segment" | {{M-segment|{{{segment|}}}}}{{#ifeq:{{{paired|false}}}|true||{{#if:{{{segment|}}}|[[Category:{{#var:segment_category}}]]|}}}}{{Sortkey|{{{toy|}}}_{{{year|}}}}}<!--ensure 2-pack rows only combine with themselves-->
|class="field_Segment" | {{M-segment|{{{segment|}}}}}{{#ifeq:{{{paired|false}}}|true||{{#if:{{{segment|}}}|[[Category:{{#var:segment_category}}]]|}}}}{{Sortkey|{{{toy|}}}_{{{year|}}}}}<!--ensure 2-pack rows only combine with themselves-->
Line 135: Line 147:
| {{Product number|{{#var:toy_number}}}}
| {{Product number|{{#var:toy_number}}}}
| {{#ifeq:{{{asst|}}}|Deluxe|{{#var:asst}}|{{{asst|{{#var:asst}}}}} }}
| {{#ifeq:{{{asst|}}}|Deluxe|{{#var:asst}}|{{{asst|{{#var:asst}}}}} }}
| {{#cargo_query:table=Cases
| {{Case Stats|year_column=Year|year_value={{{year|}}}|namestring={{#switch:{{{format|}}}
|fields=Letter
|order by=Sort_Order
|where=Cases.Assortment='{{#var:asst}}' AND Year='{{{year|}}}' AND Contents like '%\<br\/\>{{#switch:{{{format|}}}
| 2-pack = {{{toy|}}}
| 2-pack = {{{toy|}}}
| Single = {{#var:namestring}}
| Single = {{#var:escape_model_string}}
|}}\<br\/\>%'
|}} }}
|default={{TBA}}}}
| id="dc-notes" style="max-width:18%" | {{#if:{{{chase|}}}|{{#var:chasenote}}[[Category:{{#var:chasetext}} vehicles]]|}}
| id="dc-notes" style="max-width:18%" | {{#if:{{{chase|}}}|{{#var:chasenote}}[[Category:{{#var:chasetext}} vehicles]]|}}
{{#var:format_note}}
{{#var:format_note}}
Line 151: Line 159:
|}}|&ndash;}}}}}}
|}}|&ndash;}}}}}}
| {{#if:{{#var:exclusive}}|{{#var:exclusive_display}}|{{n/a}}}}<!--try to simplify within template-->
| {{#if:{{#var:exclusive}}|{{#var:exclusive_display}}|{{n/a}}}}<!--try to simplify within template-->
|id="dc-edit" style="background:#fff;border-color:#fff"|<span class="plainlinks">[https://www.pixarcarswiki.com/{{FULLPAGENAMEE}}?action=edit&section={{#expr:{{#var:n}}+1}} edit]</span></includeonly><noinclude>
|id="dc-edit" | {{#var:edit_shortcut}}<!--
//
// end and re-loop for each instance. once complete, cumulative stats are stored inside {{table end}} to the Vehicle_stats table.
--></includeonly><noinclude>
==Usage==
==Usage==
The {{code|vehicle row}} is the backbone of all {{MDPC}} coverage on the Pixar Cars Wiki. Compared to the {{tem|vehicle infobox}}, which opens each [[Pixar Cars Wiki:The Diecast Project|vehicle]] page with a summarized overview, a number of vehicle rows form the core '''data table'''. &ndash; each one holding  detailed, extensive information about an individual '''release''' of the vehicle thereof, allowing us to form a complete year-by-year, series-by-series, item-by-item record of that vehicle's history.
The {{code|vehicle row}} is the backbone of all {{MDPC}} coverage on the Pixar Cars Wiki. Compared to the {{tem|vehicle infobox}}, which opens each [[Pixar Cars Wiki:The Diecast Project|vehicle]] page with a summarized overview, a number of vehicle rows form the core '''data table'''. &ndash; each one holding  detailed, extensive information about an individual '''release''' of the vehicle thereof, allowing us to form a complete year-by-year, series-by-series, item-by-item record of that vehicle's history.

Latest revision as of 21:38, 20 September 2024

Diecast Project documentation
Help pages
Vehicles · Releases · Series
Templates
Core Utility
infobox · table · row · list · case poster sort · paired row · colno amend · series nav
This template defines the Cargo table "Releases".

View table.

Usage

The vehicle row is the backbone of all Mattel Disney Pixar Cars coverage on the Pixar Cars Wiki. Compared to the {{vehicle infobox}}, which opens each vehicle page with a summarized overview, a number of vehicle rows form the core data table. – each one holding detailed, extensive information about an individual release of the vehicle thereof, allowing us to form a complete year-by-year, series-by-series, item-by-item record of that vehicle's history.

Component, needs to be wrapped by a {{table start}} {| and {{table end}} |}; The structured output is automated by the recommended entry form.

The stored data goes straight into a database table, allowing every other page on the wiki to access and use it. In short: A single vehicle row within a vehicle page defines the data for its respective release, which then every style of List page - whether series, #Cast lists|cast/item, or Chases - reads and includes in its generation. This gives a release the ability to appear on multiple pages, while only requiring a single edit to update everywhere else.

{| {{vehicle header}}
|-
{{vehicle row}}
{{vehicle row}}
{{vehicle row}}
{{table end}}

Parameters

{{Vehicle row
|model_name=
|year=
|series=
|segment=
|colno=
|cast=
|toy=
|country=
|photo=
 |size=
|card=
|note1=
 |note2=
 |note3=
  etc...
}}
Syntax
Record information
Model name |model_name=
Year |year= Year of original release (toy year)
Series information
Collector number |colno= The collector or series number
Series |series= Input the corresponding name or ID (see {{series index}} for all values)
Segment |segment= A smaller sub-collection or grouping to which the model belongs, within an overall series. Most mainline years divide vehicles based on a similar theme or their Cars installment of origin. (Support still developing) {{segment index}}
Production information
Cast number |cast= The five digit combination of letters and numbers used by Mattel to identify the car or component; from 2011 onwards, this can be found printed on the bottom side of the car chassis. As this code refers to the physical tooling used in manufacturing, it may be the same across different production runs or series, even if there are minor variations otherwise (such as a change of paint color) – however, there is not (yet) a verified science. It's best to check each version before assuming. Distinct from the "toy number" (see below)
Toy number |toy= The five digit combination of letters and numbers found on the cardback or other forming of packaging. May or may not be identical to the cast number; in cases where they are the same, they should both still be added.
Country |country= Country of manufacturing, as printed on the vehicle chassis. Accepts one of three values:
China (or CN)
Thailand (or TH)
Vietnam (or VN)
Documentation
Notes |note1=(etc)
Loose photo |photo= For a loose image of the model; input only the file name and extension (e.x. McQueen.jpg). Default size is 120px.
If desired, dimensions can be adjusted using |size= [Number]px
Carded photo |card= To be displayed as tooltip

Extra configuration

The following settings are not available in the main form, but can be configured in source mode.

  • |sort_name= can be set to modify the "model name" that will be called by a {{vehicle list}}. This is useful in situations where more than one Vehicle within the same series have the same model name -- an example being Green, Yellow, and Purple Ramone in the 2007 Mainline. Setting the latter's |sort_name= to Purple Ramone makes it so when the same is put in {{poster sort}} template on the series page, it can identify said Ramone.
  • |asst= manually sets/overrides the assortment number. Most are covered automatically but for certain series/items where the programming cannot determine its identity (such as Piston Cup Nights and its varying multipack assortments), this is necessary.
  • |exclusive= sets the exclusive status of an item. Retailer-specific series display by default, but this works for individual items/overrides the default setting.

Temporary:

  • |sub= allows for an extra level of specificity within series
  • |card2= and |int_card= for alternate cardbacks; Walmart Cars and 2023 Mainline are examples

Also see {{paired row}} for paired singles