Template:Infobox object: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
sims>LostInRiverview (Starting with original code from Template:Object - http://sims.wikia.com/wiki/Template:Object?oldid=704790) |
(Simplify categorization scheme; add support for CC namespace) |
||
(19 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<templatestyles src="Metainfobox/styles.css" /><!---*****OVERALL DESIGN CODE*****---> |
|||
<div style="width: 260px; font-size:94%; float:right; margin-left: 5px; margin-right: 0px; margin-top: 0px; margin-bottom: 0px; border-right: {{Vgbordercolor|{{Vgcode|{{{game}}} }} }} 1px solid; border-left: {{Vgbordercolor|{{Vgcode|{{{game}}} }} }} 1px solid; border-top: {{Vgbordercolor|{{Vgcode|{{{game}}} }} }} 1px solid; border-bottom: {{Vgbordercolor|{{Vgcode|{{{game}}} }} }} 1px solid; background: {{Vgsecondaryheadercolor|{{Vgcode|{{{game}}} }} }}; color: black; vertical-align: top; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; background-position: -40px -15px;"> |
|||
{| class="metainfobox {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" cellpadding="1.5" |
|||
{| cellspacing="1.5" <div style="float:right;background:#99bbff;color:black;"> |
|||
! class="metainfobox-header large {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2"{{!}}{{{name|{{PAGENAME}}}}} |
|||
| |
|||
{| cellpadding="3" cellspacing="0" style="float:center; width:255px; font-size: 90%; background-color: #ffffff; text-align: left" |
|||
|- |
|||
{{#ifeq: {{#expr: {{#if:{{{name|<noinclude>-</noinclude>}}}|1|0}} }} | 1 | |
|||
{{!}} align="center" colspan="2" bgcolor="{{Vgmainheadercolor|{{Vgcode|{{{game}}} }} }}" style="font-size:110%; padding:1px; color:#FFFFFF;" {{!}} '''{{{name|{{PAGENAME}}}}}''' |
|||
{{!}}- |
{{!}}- |
||
⚫ | |||
{{#if:{{{image<includeonly>|</includeonly>}}} | |
{{#if:{{{image<includeonly>|</includeonly>}}} | |
||
{{!}} class="metainfobox-image" colspan="2" {{!}} {{{image}}} |
|||
{{!}} colspan="2" style="float:center; border-top:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; text-align:center" {{!}}{{{image}}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
{{#if:{{{ |
{{#if: {{{caption<includeonly>|</includeonly>}}} | |
||
{{!}} class="metainfobox-caption" colspan="2" {{!}} {{{caption}}} |
|||
{{!}} colspan="2" style="background: #FFFFFF; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; text-align:center"{{!}}<small><font color="{{Vgmainheadercolor|{{Vgcode|{{{game}}} }} }}">''{{{desc}}}''</font></small> |
|||
{{!}}- |
|||
{{!}} class="metainfobox-header line {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2" {{!}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
<!---LEGACY CODE FOR "desc" PARAMETER---> |
|||
⚫ | |||
{{#if: {{{desc|}}} | |
|||
{{!}} width="75" style="background: {{Vgbodycolor|{{Vgcode|{{{game}}} }} }}; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; color: #4B4B4B"{{!}}'''Game''' |
|||
{{!}} class="metainfobox-caption" colspan="2" {{!}} {{{desc}}} |
|||
{{!}} style="background: #FFFFFF; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid;" {{!}} {{#ifexist:{{{game}}}|''[[{{{game}}}]]''|{{{game}}} }} |
|||
{{!}}- |
|||
{{!}} class="metainfobox-header line {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2" {{!}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
{{#if:{{{ |
{{#if: {{{game<includeonly>|</includeonly>}}} | |
||
{{!}} Game |
|||
{{!}} width="75" style="background: {{Vgbodycolor|{{Vgcode|{{{game}}} }} }}; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; color: #4B4B4B"{{!}}'''Buyable''' |
|||
{{!}} |
{{!}} {{#ifexist:{{{game}}}|''[[{{{game}}}]]''|{{{game}}}}} |
||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
{{#if:{{{ |
{{#if: {{{buy<includeonly>|</includeonly>}}} | |
||
{{!}} Buyability |
|||
{{!}} width="75" style="background: {{Vgbodycolor|{{Vgcode|{{{game}}} }} }}; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; color: #4B4B4B"{{!}}{{#switch: {{{buy}}} |
|||
{{!}} {{{buy}}} |
|||
|Built |
|||
|Invented |
|||
⚫ | |||
⚫ | |||
{{!}} style="background: #FFFFFF; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid;" {{!}} {{{price}}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
{{#if:{{{ |
{{#if: {{{price<includeonly>|</includeonly>}}} | |
||
{{!}} {{#switch: {{lc:{{{buy}}} }} |
|||
{{!}} width="75" style="background: {{Vgbodycolor|{{Vgcode|{{{game}}} }} }}; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; color: #4B4B4B"{{!}}'''Selling price''' |
|||
|built |
|||
{{!}} style="background: #FFFFFF; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid;" {{!}} {{{sell}}} |
|||
|invented |
|||
⚫ | |||
⚫ | |||
{{!}} {{{price}}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
⚫ | |||
{{#ifeq: {{#expr: {{#if:{{{type|<noinclude>-</noinclude>}}}|1|0}} or {{#if:{{{type1|}}}|1|0}} }} | 1 | |
|||
{{!}} Selling price |
|||
{{!}} width="75" style="background: {{Vgbodycolor|{{Vgcode|{{{game}}} }} }}; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; color: #4B4B4B"{{!}}'''Type''' |
|||
{{!}} {{{sell}}} |
|||
{{!}} style="background: #FFFFFF; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid;" {{!}}{{ |
|||
{{!}}- |
|||
⚫ | |||
{{{type}}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
}} |
}} |
||
{{#if: {{{type|{{{type1<includeonly>|</includeonly>}}} }}} | |
|||
⚫ | |||
{{!}} {{{type|{{{type1}}} }}} |
|||
{{!}}- |
|||
⚫ | |||
⚫ | |||
{{!}} {{{type2}}} |
|||
{{!}}- |
|||
⚫ | |||
⚫ | |||
{{!}} {{{type3}}} |
|||
{{!}}- |
|||
⚫ | |||
{{#if:{{{type4<includeonly>|</includeonly>}}} | |
|||
{{!}} {{{type4}}} |
|||
{{!}}- |
|||
}} |
|||
{{#if:{{{type5<includeonly>|</includeonly>}}} | |
|||
{{!}} {{{type5}}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
{{#if:{{{size<includeonly>|</includeonly>}}} | |
{{#if:{{{size<includeonly>|</includeonly>}}} | |
||
{{!}} Size |
|||
{{!}} width="75" style="background: {{Vgbodycolor|{{Vgcode|{{{game}}} }} }}; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; color: #4B4B4B"{{!}}'''Size''' |
|||
{{!}} {{{size}}} |
|||
{{!}} style="background: #FFFFFF; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid;" {{!}} {{{size}}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
{{#if:{{{uses<includeonly>|</includeonly>}}} | |
{{#if:{{{uses<includeonly>|</includeonly>}}} | |
||
{{!}} Number of uses |
|||
{{!}} width="75" style="background: {{Vgbodycolor|{{Vgcode|{{{game}}} }} }}; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; color: #4B4B4B"{{!}}'''Uses''' |
|||
{{!}} {{{uses}}} |
|||
{{!}} style="background: #FFFFFF; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid;" {{!}} {{{uses}}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
{{#if:{{{badge<includeonly>|</includeonly>}}} | |
{{#if:{{{badge<includeonly>|</includeonly>}}} | |
||
{{!}} [[Talent badge|Badge required]] |
|||
{{!}} width="75" style="background: {{Vgbodycolor|{{Vgcode|{{{game}}} }} }}; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid; color: #4B4B4B"{{!}}<small>'''Badge required to craft'''</small> |
|||
{{!}} {{#if:{{{badgelevel|}}}|[[File:{{{badge}}} {{lc: {{{badgelevel}}}}}.png|25px|link={{{badge}}}]] [[{{{badge}}} {{{badgelevel}}}]]|{{{badge}}} }} |
|||
{{!}} style="background: #FFFFFF; border-bottom:{{Vglinecolor|{{Vgcode|{{{game}}} }} }} 1px solid;" {{!}} {{{badge}}} |
|||
{{!}}- |
{{!}}- |
||
}} |
}} |
||
|} |
|} |
||
<includeonly>{{#ifeq: {{Yesno-yes|{{{cat}}}|no=no}}|no| <!-- Don't add categories --> | |
|||
</div> |
|||
{{Namespace detect |
|||
⚫ | |||
⚫ | |main = [[Category:Objects]] {{GetObjectCats|game|{{{game}}}}}{{GetObjectCats|type|{{{type}}}}}{{GetObjectCats|type|{{{type1}}}}}{{GetObjectCats|type|{{{type2}}}}}{{GetObjectCats|type|{{{type3}}}}}{{GetObjectCats|type|{{{type4}}}}}{{GetObjectCats|type|{{{type5}}}}}{{GetObjectCats|buy|{{{buy}}}|{{{game}}}}} |
||
</div> |
|||
|custom = [[Category:Objects (custom)]] {{GetObjectCats|game|{{{game}}}}}{{GetObjectCats|type|{{{type}}}}}{{GetObjectCats|type|{{{type1}}}}}{{GetObjectCats|type|{{{type2}}}}}{{GetObjectCats|type|{{{type3}}}}}{{GetObjectCats|type|{{{type4}}}}}{{GetObjectCats|type|{{{type5}}}}}{{GetObjectCats|buy|{{{buy}}}|{{{game}}}}} |
|||
<includeonly>{{#ifeq: {{lc:{{{cat}}}}}|n| |{{#ifeq: {{lc:{{{cat}}}}}|no| |{{#ifeq:{{NAMESPACE}}| |[[Category:Objects]] |
|||
}} |
|||
⚫ | |||
}}</includeonly><noinclude>{{clr}}{{Documentation}} |
|||
{{Documentation}} |
|||
</noinclude> |
</noinclude> |
Latest revision as of 20:24, 19 August 2019
Infobox object | |
---|---|
{{{image}}} | |
{{{caption}}} | |
Game | {{{game}}} |
Buyability | {{{buy}}} |
Price in game | {{{price}}} |
Selling price | {{{sell}}} |
Object type(s) | {{{type1}}} |
{{{type2}}} | |
{{{type3}}} | |
{{{type4}}} | |
{{{type5}}} | |
Size | {{{size}}} |
Number of uses | {{{uses}}} |
Badge required | {{{badge}}} |
Description
Infobox for objects. Uses {{GetObjectCats}}.
Syntax
{{Infobox object|<...>}}
Copy and paste the information below into an Object's page and then add the information after the "=" with the information of the object.
{{Infobox object |name = |desc = |image = |game = |buy = |price = |type1 = |type2 = |type3 = |type4 = |type5 = |size = |uses = }}
- Types:
- Use
type
ortype1...type5
- Skill, needs, money, toy, crafting, decorative, appliance, aspiration reward, career reward, electronics, food, vehicle, special, others, etc. A complete list is at {{GetObjectCats}}.
- Use
- Buyability
- Buy mode (for objects available in Buy mode), Build mode (for objects available in Build mode), Community lot (for objects bought on community lots)
- Limited (rewards/unlockable)
- No (NPC object/scenario objects)
- Uses
- Use for objects which have a limited number of uses, or can only be used for a limited amount of time.
Visit Template:Infobox object/doc to edit this text! (How does this work?) (Refresh this text - why?)