Template:CardInfobox: Difference between revisions

From LOTR-TCG Wiki
No edit summary
No edit summary
 
(45 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'), IF(C.IsPhysical = 1, 'Yes', 'No'),
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 48: Line 54:
|fields= TRIM('Gameplay Info')=TableName,
|fields= TRIM('Gameplay Info')=TableName,
IF(C.IsPlayable = 1, 'Yes', 'No')=Playable,  
IF(C.IsPlayable = 1, 'Yes', 'No')=Playable,  
CONCAT('[[Image:', C.Culture, '.svg{{!}}x20px{{!}}text-bottom{{!}}link=', C.Culture, '_Culture{{!}}class=whitebg]] \'\'\'[[', C.Culture, '_Culture{{!}}', C.Culture, ']]\'\'\'')=Culture,
C.CardType,
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,
CONCAT('[[', IF(C.Side='Freeps', 'Free Peoples', C.Side), ']]')=Side,
CT.SubtypeClass, CR.Subtypes,
CT.SubtypeClass, CR.Subtypes,
Line 63: Line 70:
IF(CR.Block='None', NULL, CR.Block)=Block,
IF(CR.Block='None', NULL, CR.Block)=Block,
IF(CR.ShadowNum=0, NULL, CR.ShadowNum)=ShadowNum,
IF(CR.ShadowNum=0, NULL, CR.ShadowNum)=ShadowNum,
IF(CR.IsSanctuary=0, NULL, IF(CR.Subtypes LIKE '%Sanctuary%', 'Yes', 'No'))=IsSanctuary,
IF(C.CardType!='Site', NULL, IF(CR.SiteNum IN (3,6), 'Yes', 'No'))=IsSanctuary,
IF(CR.ArrowDir='None', NULL, CR.ArrowDir)=ArrowDir,
IF(CR.ArrowDir='None', NULL, CR.ArrowDir)=ArrowDir,
CR.FormattedGameText,
CR.FormattedGameText,
Line 91: Line 98:
CR._pageName = pn1,
CR._pageName = pn1,
C._pageName = pn2
C._pageName = pn2
|where=C.ID='{{IDLookup|{{{1}}}}}' AND L.Code NOT IN ('EN', 'TW')
|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=<!--
|intro=<!--
-->{{{!}} class="wikitable mw-collapsible mw-collapsed" style="width:100%;margin:0"
-->{{{!}} class="wikitable mw-collapsible mw-collapsed" style="width:100%;margin:0"
Line 99: Line 108:
|template=TranslationInfoboxTable
|template=TranslationInfoboxTable
|named args= yes
|named args= yes
|outro={{!}}}
|outro=<br>
{{!}}}
|default=
|delimiter=
|delimiter=
|no html
|no html
Line 112: Line 123:
TRIM('Wiki Base Card ID'), C.ID,  
TRIM('Wiki Base Card ID'), C.ID,  
TRIM('TLHH ID'), C.TLHH_ImageNum,
TRIM('TLHH ID'), C.TLHH_ImageNum,
TRIM('GEMP ID'), CONCAT(C.SetNum, '_', C.CardNum),
TRIM('GEMP ID'), C.GEMP_ID,
TRIM('LOTRO Hex ID'), C.LOTRO_HexNum,
TRIM('LOTRO Hex ID'), C.LOTRO_HexNum,
TRIM('LOTRO Image ID'), C.LOTRO_ImageNum
TRIM('LOTRO Image ID'), C.LOTRO_ImageNum,
TRIM('mLOTRO ID'), C.mLOTRO_ID
|where=C.ID='{{IDLookup|{{{1}}}}}' AND R.Sets HOLDS C.SetNum
|where=C.ID='{{IDLookup|{{{1}}}}}' AND R.Sets HOLDS C.SetNum
|format=template
|format=template

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.