Template:Infobox family: Difference between revisions

Reverted to revision 241294 by K6ka (talk) (TW)
imported>Ferretwings
No edit summary
(Reverted to revision 241294 by K6ka (talk) (TW))
 
(17 intermediate revisions by 3 users not shown)
Line 1:
<templatestyles src="Metainfobox/styles.css" />
{{infobox family test2
{|theme class={{#switch:"metainfobox {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{game|basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }}|ts1=The-Sims|ts2=The-Sims-2|ts3=The-Sims-3|ts4=The-Sims-4 }}" cellpadding="1.5"
! class="metainfobox-header large {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2"{{!}}{{{name|{{PAGENAME}}}}}
|name = {{{name|{{PAGENAME}}}}}
<includeonly>{{Namespace detect |main=[[Category:Premade families]] |fanon=[[Category:Families (fanon)]] |custom content = [[Category:Families (custom)]]}}</includeonly>
|image = {{{image|}}}
{{!}}-
|caption = {{{caption|}}}
 
|members = {{{members|}}}
{{#if:{{{game<includeonly>|</includeonly>}}} |
|generations = {{{generations|}}}
{{!}} class="metainfobox-logo" colspan="2" {{!}} <small><center>{{GetGameImage|{{{game}}}|{{{neighbor|}}}}}</center></small>
|connect = {{{connect|}}}
{{!}}-
|lot = {{{lot|}}}
|funds = {{{funds|}}}
|worth = {{{worth|}}}
|difficulty = {{{difficulty|}}}
|game = {{{game|}}}
|play = {{{play|}}}
|neighbor = {{{neighbor|}}}
}}
 
{{#if:{{{image<includeonly>|</includeonly>}}} |
{{!}} class="metainfobox-image" colspan="2" {{!}} {{{image}}}
{{!}}-
}}
 
{{#if:{{{caption<includeonly>|</includeonly>}}} |
{{!}} class="metainfobox-header {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2" {{!}} Description
{{!}}-
{{!}} class="metainfobox-caption" colspan="2" {{!}} {{{caption}}}
{{!}}-
{{!}} class="metainfobox-header line {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2" {{!}}
{{!}}-
}}
 
{{#if:{{{name<includeonly>|</includeonly>}}} |
{{!}} Name
{{!}} {{{name}}}
{{!}}-
}}
 
{{#if:{{{members<includeonly>|</includeonly>}}} |
{{!}} Members
{{!}} {{{members}}}
{{!}}-
}}
 
{{#if:{{{generations<includeonly>|</includeonly>}}} |
{{!}} Number of generations
{{!}} {{{generations}}} generations{{!}}{{{generations}}} {{#ifeq: {{{generations|}}} | 1 | generation | generations}}
<includeonly>{{Namespace detect |main={{#if: {{{generations|}}} | {{#ifeq: {{{generations|}}} | 1 | [[Category:Families with 1 generation]] | [[Category:Families with {{{generations}}} generations]] }} }} |fanon={{#if: {{{generations|}}} | {{#ifeq: {{#switch:{{{generations}}} | 1 | 2 | 3 | 4 | 5 | 6 = 1 }} | 1 | {{#ifeq: {{{generations|}}} | 1 | [[Category:Families with 1 generation (fanon)]] | [[Category:Families with {{{generations}}} generations (fanon)]] }} | [[Category:Families with other generations (fanon)]]}} }} |custom content = {{#if: {{{generations|}}} | {{#ifeq: {{#switch:{{{generations}}} | 1 | 2 | 3 | 4 | 5 | 6 = 1 }} | 1 | {{#ifeq: {{{generations|}}} | 1 | [[Category:Families with 1 generation (custom)]] | [[Category:Families with {{{generations}}} generations (custom)]] }} | [[Category:Families with other generations (custom)]]}} }} }}</includeonly>
{{!}}-
}}
 
{{#if:{{{connect<includeonly>|</includeonly>}}} |
{{!}} Family connections
{{!}} {{{connect}}}
{{!}}-
}}
 
{{#if:{{{lot<includeonly>|</includeonly>}}} |
{{!}} Lot
{{!}} {{{lot}}}
{{!}}-
}}
 
{{#if:{{{funds<includeonly>|</includeonly>}}} |
{{!}} Funds
{{!}} §{{{funds}}}
{{!}}-
}}
 
{{#if:{{{worth<includeonly>|</includeonly>}}} |
{{!}} Net worth
{{!}} §{{{worth}}}
{{!}}-
}}
 
{{#if:{{{resources<includeonly>|</includeonly>}}} |
{{!}} Resources
{{!}} {{{resources}}}
{{!}}-
}}
 
{{#if:{{{food<includeonly>|</includeonly>}}} |
{{!}} Food
{{!}} {{{food}}}
{{!}}-
}}
 
{{#if:{{{difficulty<includeonly>|</includeonly>}}} |
{{!}} Difficulty level
{{!}} [[File:Difficulty{{{difficulty}}}.png|{{{difficulty}}} of 6]]
<includeonly>{{Namespace detect |main={{#if: {{{difficulty|}}} | [[Category:Families with difficulty level {{{difficulty}}}]] }} |fanon={{#if: {{{difficulty|}}} | [[Category:Families with difficulty level {{{difficulty}}} (fanon)]] }} |custom content={{#if: {{{difficulty|}}} | [[Category:Families with difficulty level {{{difficulty}}} (custom)]] }} }}</includeonly>
{{!}}-
}}
 
{{#ifeq: {{#expr: {{#if:{{{game|<noinclude>-</noinclude>}}}|1|0}} or {{#if:{{{play|}}}|1|0}} or {{#if:{{{cod|}}}|1|0}} or {{#if:{{{neighbor|}}}|1|0}} }} | 1 |
{{!}} class="metainfobox-header {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2" {{!}} Other information
{{!}}-
 
{{#if:{{{game<includeonly>|</includeonly>}}} |
{{!}} Game
{{!}} {{GetGameIcon|{{{game}}}|{{{neighbor}}} }} ''{{Addlink|{{{game}}}}}''
<includeonly>{{GetFamilyGameCat|{{{game}}}}}</includeonly>
{{!}}-
}}
 
{{#if:{{{play<includeonly>|</includeonly>}}} |
{{!}} Playability
{{!}}{{{play}}}<includeonly>{{GetFamilyPlayCat| {{{play}}} }}</includeonly>
{{!}}-
}}
 
{{#if:{{{neighbor<includeonly>|</includeonly>}}} |
{{!}} {{#switch:{{MGL|{{{game}}} }}
|TS3
|TS4= World
|#default= Neighborhood}}
{{!}}{{Namespace detect |main= {{#switch: {{{neighbor}}}
|Downtown = {{#ifeq:{{{game}}}|The Sims: Hot Date|[[Downtown (The Sims)|Downtown]]|[[Downtown (The Sims 2)|Downtown]]}}
|Pets = [[Pets (neighborhood)|Pets]]
|Weather = [[Weather (neighborhood)|Weather]]
|Hobbies = [[Hobbies (neighborhood)|Hobbies]]
|Magic = [[Magic (neighborhood)|Magic]]
|{{Addlink|{{{neighbor}}}}}
}}
|other = {{Addlink|{{{neighbor}}}}}
}}
<includeonly>{{Namespace detect |main=[[Category:{{Delink|{{{neighbor}}}}} families]] |fanon=[[Category:{{Delink|{{Remove fanon prefix|{{{neighbor}}}}}}} families (fanon)]] |custom content=[[Category:{{Delink|{{Remove custom prefix|{{{neighbor}}}}}}} families (custom)]]}}</includeonly>
{{!}}-
}}
}}
<!-- Not used on Miraheze:
{{#ifeq: {{#expr: {{#if:{{{fanoncomments|<noinclude>-</noinclude>}}}|1|0}} }} | 1 |
{{!}} class="metainfobox-header large {{lc: {{MGL | {{vgcode | {{#if:{{{basegame|}}}|{{{basegame}}}|{{{game<includeonly>|</includeonly>}}} }} }} }} }}" colspan="2"{{!}} {{{fanoncomments}}}
}} -->
|}<noinclude>
{{clr}}
{{Documentation}}
</noinclude>