Template:CardInfobox: Difference between revisions

From LOTR-TCG Wiki
No edit summary
No edit summary
 
(82 intermediate revisions by the same user not shown)
Line 3: Line 3:
</noinclude><includeonly>
</noinclude><includeonly>
{| class="wikitable card-infobox-container" style="float:right; width:370px; margin:0 0 0 50px"
{| class="wikitable card-infobox-container" style="float:right; width:370px; margin:0 0 0 50px"
|+ <big>Gimli, Son of Gloin</big>
|-
|-
|
|
{{#tag:gallery|{{#cargo_query:tables=Cards=C,CardReleases=CR
{{#tag:gallery|{{#cargo_query:tables=Cards=C,CardReleases=CR,Languages=L,Rarities=R
|join on=C.ID = CR.BaseCardID
|join on=C.ID = CR.BaseCardID,CR.LanguageCode=L.Code,C.Rarity=R.Abbr
|fields= CR.ImageFilename=Filename,CR.LanguageCode,CR.Subset=Style
|fields= IFNULL(CR.ImageFilename
,'Card_Not_Found.jpg')=Filename
,CR.LanguageCode
,CR.Subset=Style
,R.Name=Rarity
,CR.Revision=Revision
|where=C.ID='{{IDLookup|{{{1}}}}}'
|where=C.ID='{{IDLookup|{{{1}}}}}'
|order by=L.SortOrder,{{StandardSort}},CR._rowID
|format=template
|format=template
|template=GalleryQuery
|template=GalleryQuery
Line 15: Line 20:
|delimiter=\n
|delimiter=\n
|no html
|no html
}}|mode="slideshow"|showthumbnails="true"}}
}}|mode="slideshow"}}
|-
|-
|style="padding:0px;"|<!--
|style="padding:0px;"|<!--
Line 23: Line 28:
|fields= TRIM('Collection Info'),
|fields= TRIM('Collection Info'),
TRIM('Title'), CR.Title,  
TRIM('Title'), CR.Title,  
TRIM('Subtitle'), CR.Subtitle,
TRIM('Subtitle'), IFNULL(CR.Subtitle,' '),
TRIM('Collectible'), C.IsPhysical,
TRIM('Unique'), IF(CR.IsUnique = 1, 'Yes', 'No'),
TRIM('Notes'), C.Notes,
TRIM('Collectible'),  IF(IFNULL(CR.IsPhysical, C.IsPhysical) = 1, 'Yes', 'No'),
TRIM('Set'), CONCAT(CS.ID, ' - [[', CS.Name, ']]'),
TRIM('Notes'), IFNULL(C.Notes,' '),
TRIM('Rarity'), CONCAT(R.Abbr, ' - [[Rarity{{!}}', R.Name, ']]'),
TRIM('[[Set]]'), CONCAT(CS.ID, ' - [[', CS.Name, ']]'),
TRIM('[[Rarity]]'), CONCAT(R.Abbr, ' - [[Rarity{{!}}', R.Name, ']]'),
TRIM('Card Number'), C.CardNum,
TRIM('Card Number'), C.CardNum,
TRIM('Language'), CONCAT(L.Code, ' - [[Languages{{!}}', L.Name, ']]'),
TRIM('[[Language]]'), CONCAT(L.Code, ' - [[Languages{{!}}', L.Name, ']]'),
TRIM('Revision'), C.Revision,
TRIM('Revision'), C.Revision,
TRIM('Notes'), CONCAT(C.Notes, '<br>', CR.Notes)  
TRIM('Notes'), CONCAT(C.Notes, '<br>', CR.Notes)  
Line 46: Line 52:
-->{{#cargo_query:tables=Cards=C,CardReleases=CR,CardTypes=CT
-->{{#cargo_query:tables=Cards=C,CardReleases=CR,CardTypes=CT
|join on=C.ID = CR.ID,C.CardType = CT.Name
|join on=C.ID = CR.ID,C.CardType = CT.Name
|fields= TRIM('Gameplay Info'),
|fields= TRIM('Gameplay Info')=TableName,
TRIM('Playable'), C.IsPlayable ,  
IF(C.IsPlayable = 1, 'Yes', 'No')=Playable,  
TRIM('Culture'), CONCAT('[[Image:', C.Culture, '.svg{{!}}x20px{{!}}text-bottom{{!}}link=', C.Culture, '_Culture{{!}}class=whitebg]] \'\'\'[[', C.Culture, '_Culture{{!}}', C.Culture, ']]\'\'\''),
C.CardType,
TRIM('Side'), CONCAT('[[', C.Side, ']]'),
CONCAT('[[Image:Culture_', C.Culture, '.svg{{!}}x20px{{!}}text-bottom{{!}}link=', C.Culture, '_Culture{{!}}class=whitebg]] \'\'\'[[', C.Culture, '_Culture{{!}}', C.Culture, ']]\'\'\'')=Culture,
CONCAT('[[', IF(C.Side='Freeps', 'Free Peoples', C.Side), ']]')=Side,
CT.SubtypeClass, CR.Subtypes,
CT.SubtypeClass, CR.Subtypes,
TRIM('Twilight Cost'), CR.TwilightCost,
CR.TwilightCost,
TRIM('Strength'), CR.Strength,
IF(CR.Strength=0, NULL, CR.Strength)=Strength,
TRIM('Strength'), IF(CR.StrengthMod=0, NULL, CR.StrengthMod),
IF(CR.StrengthMod=0, NULL, CR.StrengthMod)=StrengthMod,
TRIM('Vitality'), CR.Vitality,
IF(CR.Vitality=0, NULL, CR.Vitality)=Vitality,
TRIM('Vitality'), CR.VitalityMod,
IF(CR.VitalityMod=0, NULL, CR.VitalityMod)=VitalityMod,
TRIM('Home Site'), CR.SiteNum,
IF(CR.SiteNum=0, NULL, CR.SiteNum)=SiteNum,
TRIM('Site Number'), CR.SiteNumMod,
IF(CR.SiteNumMod=0, NULL, CR.SiteNumMod)=SiteNumMod,
TRIM('Resistance'), CR.Resistance,
IF(CR.Resistance=0, NULL, CR.Resistance)=Resistance,
TRIM('Resistance'), CR.ResistanceMod,
IF(CR.ResistanceMod=0, NULL, CR.ResistanceMod)=ResistanceMod,
TRIM('Signet'), CR.Signet,
IF(CR.Signet='None', NULL, CR.Signet)=Signet,
TRIM('Block'), CR.Block,
IF(CR.Block='None', NULL, CR.Block)=Block,
TRIM('Shadow Number'), CR.ShadowNum,
IF(CR.ShadowNum=0, NULL, CR.ShadowNum)=ShadowNum,
TRIM('Sanctuary'), CR.IsSanctuary,
IF(C.CardType!='Site', NULL, IF(CR.SiteNum IN (3,6), 'Yes', 'No'))=IsSanctuary,
TRIM('Arrow Direction'), CR.ArrowDir,
IF(CR.ArrowDir='None', NULL, CR.ArrowDir)=ArrowDir,
TRIM('Game Text'), CR.FormattedGameText,
CR.FormattedGameText,
TRIM('Lore'), CONCAT('\'\'', CR.Lore, '\'\'')
IF(CR.Lore IS NOT NULL, CONCAT('\'\'', CR.Lore, '\'\''), NULL)=Lore,
IF(CR.PromoText IS NOT NULL, CONCAT('\'\'\'', CR.PromoText, '\'\'\''), NULL)=PromoText
|where=C.ID='{{IDLookup|{{{1}}}}}'
|where=C.ID='{{IDLookup|{{{1}}}}}'
|format=template
|format=template
|template=CardSubInfoTable
|template=CardInfoTable
|named args= no
|named args= yes
|delimiter=\n
|delimiter=\n
|no html
|no html
Line 77: Line 85:
-->
-->
|-
|-
|style="padding:0px;"|
|style="padding:0px;"|<!--


{| class="wikitable mw-collapsible" style="width:100%;margin:0"
-->{{#cargo_query:tables=Cards=C,CardReleases=CR,Languages=L
|join on=C.ID = CR.BaseCardID,CR.LanguageCode=L.Code
|fields=CONCAT(L.Code, ' - ', L.Name)=LanguageName,
CR.Title,
CR.Subtitle,
CR.FormattedGameText,
IF(CR.Lore IS NOT NULL, CONCAT('\'\'', CR.Lore, '\'\''), NULL)=Lore,
IF(CR.PromoText IS NOT NULL, CONCAT('\'\'\'', CR.PromoText, '\'\'\''), NULL)=PromoText
CR.Notes,
CR._pageName = pn1,
C._pageName = pn2
|where=C.ID='{{IDLookup|{{{1}}}}}'
AND L.Code NOT IN ('EN', 'TW')
AND (C.SetNum IN ('9', '14', '16', '19') OR CR.Subset IN ('S'))
|intro=<!--
-->{{{!}} class="wikitable mw-collapsible mw-collapsed" style="width:100%;margin:0"
{{!}}-
!colspan="2" {{!}}Translations
|format=template
|template=TranslationInfoboxTable
|named args= yes
|outro=<br>
{{!}}}
|default=
|delimiter=
|no html
}}<!--
-->
|-
|-
!colspan="2" class="mw-customtoggle-section1"|Gameplay Info
|style="padding:0px;"|<!--
|-
|style="width:140px"| '''Playable'''
| Yes
|-
| '''Culture'''
| {{C|Dwarven}}
|-
| '''Side'''
| [[Free Peoples]]
|-
| '''Race'''
| [[Dwarf]]
|-
| '''Twilight Cost'''
| 2
|-
| '''Strength'''
| 6
|-
| '''Vitality'''
| 3
|-
| '''Signet'''
| Gandalf
|-
| '''Game Text'''
| '''Damage +1'''.
'''Skirmish''': Exert Gimli to make him strength +2.
|-
| '''Lore'''
| ''“There was a younger dwarf at Glóin's side: his son Gimli.”''
|}
 
|-
|style="padding:0px;"|
 
{| class="wikitable mw-collapsible mw-collapsed" style="width:100%;margin:0"
|-
!colspan="2" class="mw-customtoggle-section1"|Translations
|-
!style="width:140px"| '''Language'''
! FR - French
|-
| '''Name'''
| Gimli, Fil de Gloin
|-
| '''Game Text'''
| '''Dégâts +1'''.
'''Combat:''' Affaiblissez Gimli pour lui donner +2 en force.
|-
| '''Lore'''
| “À côté de Glóin se trouvait un jeune Nain: son fils Gimli.”
|-
| '''Notes'''
|
|}
 
|-
|style="padding:0px;"|
 
{| class="wikitable mw-collapsible mw-collapsed" style="width:100%;margin:0"
|-
!colspan="3" class="mw-customtoggle-section1"|Technical Info
|-
|style="width:140px"| '''Wiki Base Card ID'''
| LOTR-EN01S013.0
|-
| '''TLHH ID'''
| TLHH_ImageNum
|-
| '''Gemp ID'''
| GEMP_ID
|-
| '''LOTRO Hex ID'''
| LOTRO_HexNum
|-
| '''LOTRO Image ID'''
| LOTRO_ImageNum
|}


-->{{#cargo_query:tables=Cards=C,CardReleases=CR,CardSets=CS,Rarities=R,Languages=L
|join on=C.ID = CR.ID,C.SetNum=CS.ID,R.Abbr=C.Rarity,CR.LanguageCode=L.Code
|fields= TRIM('Technical Info'),
TRIM('Wiki Base Card ID'), C.ID,
TRIM('TLHH ID'), C.TLHH_ImageNum,
TRIM('GEMP ID'), C.GEMP_ID,
TRIM('LOTRO Hex ID'), C.LOTRO_HexNum,
TRIM('LOTRO Image ID'), C.LOTRO_ImageNum,
TRIM('mLOTRO ID'), C.mLOTRO_ID
|where=C.ID='{{IDLookup|{{{1}}}}}' AND R.Sets HOLDS C.SetNum
|format=template
|template=CollapsedCardSubInfoTable
|named args= no
|delimiter=\n
|no html
}}
|}
|}
</includeonly>
</includeonly>

Latest revision as of 15:04, 1 July 2022

This is the "CardInfobox" template.

It should be called in the following format:

{{CardInfobox
|ID=
}}

Edit the page to see the template text.