More actions
add platform and stunt support |
Obbybigfast (talk | contribs) make image not super big |
||
| (One intermediate revision by the same user not shown) | |||
| Line 2: | Line 2: | ||
<!-- Params: | <!-- Params: | ||
trackId = required (MX TrackId) | trackId = required (MX TrackId) | ||
site = tmnf | tmuf | original | sunrise | nations | tm2 | tm2020 (default: tmnf) | site = tmnf | tmuf | original | tmo | sunrise | tms | nations | tmn | tm2 | tm2020 (default: tmnf) | ||
title, image, game = optional manual overrides (Game stays manual) | title, image, game = optional manual overrides (Game stays manual) | ||
--> | --> | ||
| Line 11: | Line 11: | ||
| tmnf = https://tmnf.exchange | | tmnf = https://tmnf.exchange | ||
| original = https://original.tm-exchange.com | | original = https://original.tm-exchange.com | ||
| tmo = https://original.tm-exchange.com | |||
| sunrise = https://sunrise.tm-exchange.com | | sunrise = https://sunrise.tm-exchange.com | ||
| tms = https://sunrise.tm-exchange.com | |||
| nations = https://nations.tm-exchange.com | | nations = https://nations.tm-exchange.com | ||
| tmn = https://nations.tm-exchange.com | |||
| tm2 = https://tm.mania.exchange | | tm2 = https://tm.mania.exchange | ||
| tm2020 = https://trackmania.exchange | | tm2020 = https://trackmania.exchange | ||
| Line 20: | Line 23: | ||
| tmnf | | tmnf | ||
| original | | original | ||
| tmo | |||
| sunrise | | sunrise | ||
| nations = /api/tracks?id={{{trackId}}}&count=1&fields=TrackId%2CTrackName%2CUId%2CAuthorTime%2CAuthorScore%2CGoldTarget%2CSilverTarget%2CBronzeTarget%2CUploader.UserId%2CUploader.Name%2CAuthors%5B%5D%2CWRReplay.ReplayTime%2CWRReplay.ReplayScore%2CWRReplay.User.Name%2CUploadedAt%2CUpdatedAt%2CActivityAt%2CPrimaryType%2CTrackValue%2CStyle%2CRoutes%2CDifficulty%2CEnvironment%2CCar%2CMood%2CAwards%2CComments%2CReplayType | | tms | ||
| nations | |||
| tmn = /api/tracks?id={{{trackId}}}&count=1&fields=TrackId%2CTrackName%2CUId%2CAuthorTime%2CAuthorScore%2CGoldTarget%2CSilverTarget%2CBronzeTarget%2CUploader.UserId%2CUploader.Name%2CAuthors%5B%5D%2CWRReplay.ReplayTime%2CWRReplay.ReplayScore%2CWRReplay.User.Name%2CUploadedAt%2CUpdatedAt%2CActivityAt%2CPrimaryType%2CTrackValue%2CStyle%2CRoutes%2CDifficulty%2CEnvironment%2CCar%2CMood%2CAwards%2CComments%2CReplayType | |||
| tm2 | | tm2 | ||
| tm2020 = /api/maps?id={{{trackId}}}&count=1&fields=MapId%2CName%2CMapUid%2CMedals.Author%2CMedals.Gold%2CMedals.Silver%2CMedals.Bronze%2CUploader.UserId%2CUploader.Name%2CAuthors%5B%5D%2COnlineWR%2CUploadedAt%2CUpdatedAt%2CActivityAt%2CType%2CTrackValue%2CStyle%2CRoutes%2CDifficulty%2CEnvironment%2CVehicle%2CMood%2CAwardCount%2CCommentCount%2CReplayType | | tm2020 = /api/maps?id={{{trackId}}}&count=1&fields=MapId%2CName%2CMapUid%2CMedals.Author%2CMedals.Gold%2CMedals.Silver%2CMedals.Bronze%2CUploader.UserId%2CUploader.Name%2CAuthors%5B%5D%2COnlineWR%2CUploadedAt%2CUpdatedAt%2CActivityAt%2CType%2CTrackValue%2CStyle%2CRoutes%2CDifficulty%2CEnvironment%2CVehicle%2CMood%2CAwardCount%2CCommentCount%2CReplayType | ||
| Line 28: | Line 34: | ||
| cache seconds = 300 | | cache seconds = 300 | ||
| data = | | data = | ||
id = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].TrackId | tm2 | tm2020 = $.Results[0].MapId}}, | id = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].TrackId | tm2 | tm2020 = $.Results[0].MapId}}, | ||
name = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].TrackName | tm2 | tm2020 = $.Results[0].Name}}, | name = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].TrackName | tm2 | tm2020 = $.Results[0].Name}}, | ||
uid = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].UId | tm2 | tm2020 = $.Results[0].MapName}}, | uid = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].UId | tm2 | tm2020 = $.Results[0].MapName}}, | ||
time_author = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].AuthorTime | tm2 | tm2020 = $.Results[0].Medals.Author}}, | time_author = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].AuthorTime | tm2 | tm2020 = $.Results[0].Medals.Author}}, | ||
score_author = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].AuthorScore | tm2 | tm2020 = $.Results[0].Medals.Author}}, | score_author = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].AuthorScore | tm2 | tm2020 = $.Results[0].Medals.Author}}, | ||
time_gold = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].GoldTarget | tm2 | tm2020 = $.Results[0].Medals.Gold}}, | time_gold = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].GoldTarget | tm2 | tm2020 = $.Results[0].Medals.Gold}}, | ||
time_silver = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].SilverTarget | tm2 | tm2020 = $.Results[0].Medals.Silver}}, | time_silver = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].SilverTarget | tm2 | tm2020 = $.Results[0].Medals.Silver}}, | ||
time_bronze = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].BronzeTarget | tm2 | tm2020 = $.Results[0].Medals.Bronze}}, | time_bronze = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn= $.Results[0].BronzeTarget | tm2 | tm2020 = $.Results[0].Medals.Bronze}}, | ||
uploader_id = $.Results[0].Uploader.UserId, | uploader_id = $.Results[0].Uploader.UserId, | ||
uploader_name = $.Results[0].Uploader.Name, | uploader_name = $.Results[0].Uploader.Name, | ||
wr_time = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].WRReplay.ReplayTime | tm2 | tm2020 = $.Results[0].OnlineWR.RecordTime}}, | wr_time = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn= $.Results[0].WRReplay.ReplayTime | tm2 | tm2020 = $.Results[0].OnlineWR.RecordTime}}, | ||
wr_score = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].WRReplay.ReplayScore | tm2 | tm2020 = $.Results[0].OnlineWR.RecordTime}}, | wr_score = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].WRReplay.ReplayScore | tm2 | tm2020 = $.Results[0].OnlineWR.RecordTime}}, | ||
wr_player = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].WRReplay.User.Name | tm2 | tm2020 = $.Results[0].OnlineWR.DisplayName}}, | wr_player = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].WRReplay.User.Name | tm2 | tm2020 = $.Results[0].OnlineWR.DisplayName}}, | ||
uploaded_at = $.Results[0].UploadedAt, | uploaded_at = $.Results[0].UploadedAt, | ||
updated_at = $.Results[0].UpdatedAt, | updated_at = $.Results[0].UpdatedAt, | ||
activity_at = $.Results[0].ActivityAt, | activity_at = $.Results[0].ActivityAt, | ||
primary_type = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].PrimaryType | tm2 | tm2020 = $.Results[0].Type}}, | primary_type = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].PrimaryType | tm2 | tm2020 = $.Results[0].Type}}, | ||
track_value = $.Results[0].TrackValue, | track_value = $.Results[0].TrackValue, | ||
style = $.Results[0].Style, | style = $.Results[0].Style, | ||
| Line 50: | Line 56: | ||
difficulty = $.Results[0].Difficulty, | difficulty = $.Results[0].Difficulty, | ||
environment = $.Results[0].Environment, | environment = $.Results[0].Environment, | ||
car = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].Car | tm2 | tm2020 = $.Results[0].Vehicle}}, | car = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].Car | tm2 | tm2020 = $.Results[0].Vehicle}}, | ||
mood = $.Results[0].Mood, | mood = $.Results[0].Mood, | ||
awards = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].Awards | tm2 | tm2020 = $.Results[0].AwardCount}}, | awards = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].Awards | tm2 | tm2020 = $.Results[0].AwardCount}}, | ||
comments = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | sunrise | nations = $.Results[0].Comments | tm2 | tm2020 = $.Results[0].CommentCount}}, | comments = {{#switch:{{lc:{{{site|tmnf}}}}}| tmuf | tmnf | original | tmo | sunrise | tms | nations | tmn = $.Results[0].Comments | tm2 | tm2020 = $.Results[0].CommentCount}}, | ||
replay_type = $.Results[0].ReplayType, | replay_type = $.Results[0].ReplayType, | ||
authors_json = $.Results[0].Authors[*].User.Name | authors_json = $.Results[0].Authors[*].User.Name | ||
| Line 77: | Line 83: | ||
| Unknown }} }} | | Unknown }} }} | ||
|- | |- | ||
| colspan="2" class="infobox-image" | {{ShowImage|https://{{#switch:{{lc:{{{site|tmnf}}}}} | | colspan="2" class="infobox-image" style="text-align:center; padding:5px;" | <div style="width: 280px; height: 160px; margin: 0 auto; overflow: hidden; display: flex; align-items: center; justify-content: center;"> | ||
<div style="width: 100%;"> | |||
{{ShowImage|https://{{#switch:{{lc:{{{site|tmnf}}}}} | |||
| tmuf = tmuf.exchange/trackshow/{{#external_value:id}}/image/1 | | tmuf = tmuf.exchange/trackshow/{{#external_value:id}}/image/1 | ||
| tmnf = tmnf.exchange/trackshow/{{#external_value:id}}/image/1 | | tmnf = tmnf.exchange/trackshow/{{#external_value:id}}/image/1 | ||
| original = original.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | | original = original.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | ||
| tmo = original.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | |||
| sunrise = sunrise.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | | sunrise = sunrise.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | ||
| tms = sunrise.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | |||
| nations = nations.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | | nations = nations.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | ||
| tmn = nations.tm-exchange.com/trackshow/{{#external_value:id}}/image/1 | |||
| tm2 = tm.mania.exchange/mapimage/{{#external_value:id}}/1 | | tm2 = tm.mania.exchange/mapimage/{{#external_value:id}}/1 | ||
| tm2020 = trackmania.exchange/mapimage/{{#external_value:id}}/1 | | tm2020 = trackmania.exchange/mapimage/{{#external_value:id}}/1 | ||
| #default = tmnf.exchange/trackshow/{{#external_value:id}}/image/1 | | #default = tmnf.exchange/trackshow/{{#external_value:id}}/image/1 | ||
}}}} | }}}}</div> | ||
</div> | |||
|- | |- | ||
! Game || {{{game|{{#switch: {{lc:{{{site|}}}}} | ! Game || {{{game|{{#switch: {{lc:{{{site|}}}}} | ||
| Line 92: | Line 104: | ||
| tmnf = TrackMania Nations Forever | | tmnf = TrackMania Nations Forever | ||
| original = TrackMania Original | | original = TrackMania Original | ||
| tmo = TrackMania Original | |||
| sunrise = TrackMania Sunrise | | sunrise = TrackMania Sunrise | ||
| tms = TrackMania Sunrise | |||
| nations = TrackMania Nations | | nations = TrackMania Nations | ||
| tmn = TrackMania Nations | |||
| tm2 = TrackMania² | | tm2 = TrackMania² | ||
| tm2020 = Trackmania 2020 | | tm2020 = Trackmania 2020 | ||
| Line 113: | Line 128: | ||
| tmnf | | tmnf | ||
| original | | original | ||
| tmo | |||
| sunrise | | sunrise | ||
| nations = {{#switch:{{#external_value:primary_type}} | | tms | ||
| nations | |||
| tmn = {{#switch:{{#external_value:primary_type}} | |||
| 0 = {{Time|{{#external_value:wr_time|}}}} by {{#external_value:wr_player|Unknown}} | | 0 = {{Time|{{#external_value:wr_time|}}}} by {{#external_value:wr_player|Unknown}} | ||
| 2 = {{Time|{{#external_value:wr_time|}}}} by {{#external_value:wr_player|Unknown}} | | 2 = {{Time|{{#external_value:wr_time|}}}} by {{#external_value:wr_player|Unknown}} | ||
| Line 145: | Line 163: | ||
| tmnf | | tmnf | ||
| original | | original | ||
| tmo | |||
| sunrise | | sunrise | ||
| nations = {{#switch:{{#external_value:primary_type}} | | tms | ||
| nations | |||
| tmn = {{#switch:{{#external_value:primary_type}} | |||
| 0 = {{Time|{{#external_value:time_author}}}} | | 0 = {{Time|{{#external_value:time_author}}}} | ||
| 2 = {{#external_value:time_author}} respawns | | 2 = {{#external_value:time_author}} respawns | ||
| Line 178: | Line 199: | ||
| tmnf | | tmnf | ||
| original | | original | ||
| tmo | |||
| sunrise | | sunrise | ||
| nations = {{#switch:{{#external_value:primary_type}} | | tms | ||
| nations | |||
| tmn = {{#switch:{{#external_value:primary_type}} | |||
| 0 = {{Time|{{#external_value:time_gold}}}} | | 0 = {{Time|{{#external_value:time_gold}}}} | ||
| 2 = {{#external_value:time_gold}} respawns | | 2 = {{#external_value:time_gold}} respawns | ||
| Line 211: | Line 235: | ||
| tmnf | | tmnf | ||
| original | | original | ||
| tmo | |||
| sunrise | | sunrise | ||
| nations = {{#switch:{{#external_value:primary_type}} | | tms | ||
| nations | |||
| tmn = {{#switch:{{#external_value:primary_type}} | |||
| 0 = {{Time|{{#external_value:time_silver}}}} | | 0 = {{Time|{{#external_value:time_silver}}}} | ||
| 2 = {{#external_value:time_silver}} respawns | | 2 = {{#external_value:time_silver}} respawns | ||
| Line 244: | Line 271: | ||
| tmnf | | tmnf | ||
| original | | original | ||
| tmo | |||
| sunrise | | sunrise | ||
| nations = {{#switch:{{#external_value:primary_type}} | | tms | ||
| nations | |||
| tmn = {{#switch:{{#external_value:primary_type}} | |||
| 0 = {{Time|{{#external_value:time_bronze}}}} | | 0 = {{Time|{{#external_value:time_bronze}}}} | ||
| 2 = {{#external_value:time_bronze}} respawns | | 2 = {{#external_value:time_bronze}} respawns | ||
| Line 305: | Line 335: | ||
| tmnf = https://tmnf.exchange | | tmnf = https://tmnf.exchange | ||
| original = https://original.tm-exchange.com | | original = https://original.tm-exchange.com | ||
| tmo = https://original.tm-exchange.com | |||
| sunrise = https://sunrise.tm-exchange.com | | sunrise = https://sunrise.tm-exchange.com | ||
| tms = https://sunrise.tm-exchange.com | |||
| nations = https://nations.tm-exchange.com | | nations = https://nations.tm-exchange.com | ||
| tmn = https://nations.tm-exchange.com | |||
| tm2 = https://tm.mania.exchange | | tm2 = https://tm.mania.exchange | ||
| tm2020 = https://trackmania.exchange | | tm2020 = https://trackmania.exchange | ||
| #default = https://tmnf.exchange | | #default = https://tmnf.exchange | ||
}}{{#switch:{{lc:{{{site|tmnf}}}}} | }}{{#switch:{{lc:{{{site|tmnf}}}}} | ||
| tmuf | | tmuf | ||
| tmnf | | tmnf | ||
| original | | original | ||
| tmo | |||
| sunrise | | sunrise | ||
| nations = /trackshow/{{#external_value:id|{{{trackId|}}}}} TrackMania Exchange] | | tms | ||
| nations | |||
| tmn = /trackshow/{{#external_value:id|{{{trackId|}}}}} TrackMania Exchange] | |||
| tm2 | | tm2 | ||
| tm2020 = /mapshow/{{#external_value:id|{{{trackId|}}}}} TrackMania Exchange] | | tm2020 = /mapshow/{{#external_value:id|{{{trackId|}}}}} TrackMania Exchange] | ||
| Line 329: | Line 365: | ||
| tmnf = TMNF | | tmnf = TMNF | ||
| original = TMO | | original = TMO | ||
| tmo = TMO | |||
| sunrise = TMS | | sunrise = TMS | ||
| tms = TMS | |||
| nations = TMN | | nations = TMN | ||
| tmn = TMN | |||
| tm2 = TM² | | tm2 = TM² | ||
| tm2020 = TM2020 | | tm2020 = TM2020 | ||
| Line 342: | Line 381: | ||
{{Infobox track | {{Infobox track | ||
| trackId = 123456 | | trackId = 123456 | ||
| site = tmuf, tmnf, original, sunrise, nations, tm2, tm2020 (Default: tmnf) | | site = tmuf, tmnf, original, tmo, sunrise, tms, nations, tmn, tm2, tm2020 (Default: tmnf) | ||
| title = Track Title (Optional) | | title = Track Title (Optional) | ||
| image = Example.jpg (Optional) | | image = Example.jpg (Optional) | ||
Latest revision as of 19:55, 28 January 2026
Usage[edit]
This is the infobox template for tracks. To use it, copy and paste the following code into an article (trackId is required, site is tmnf by default):
{{Infobox track
| trackId = 123456
| site = tmuf, tmnf, original, tmo, sunrise, tms, nations, tmn, tm2, tm2020 (Default: tmnf)
| title = Track Title (Optional)
| image = Example.jpg (Optional)
| game = TrackMania Game (Optional)
}}