Difference between revisions of "Template:Asbox"

From Self-sufficiency
Jump to: navigation, search
(simplify logic)
m
 
(35 intermediate revisions by 10 users not shown)
Line 1: Line 1:
<table class="metadata plainlinks asbox" {{#if|{{{id|}}}|id="stub-{{{id}}}" }} style="clear:left; margin: 0em 0em; background: transparent;"><tr>
+
<table class="metadata plainlinks stub" style="background: transparent;"><tr>
{{#if: {{{icon|}}}{{{image|}}} |<td class="mbox-image" style="padding: 0em;">{{#if:{{{icon|}}}|{{{icon}}}&nbsp;|{{#if:{{{image|}}}|[[Image:{{{image}}}|{{#if:{{{pix|}}}|{{{pix}}}|40x30}}px]]&nbsp;|}}}}</td>}}
+
{{#if:{{{icon|}}}{{{image|}}}
<td class="mbox-text" style="font-style: italic; padding: 0em; width: auto;">This {{{subject|}}} article {{{qualifier|}}} is a [[Wikipedia:stub|stub]].  You can help Wikipedia by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it].{{#if:{{{note|}}}|<br/><span style="font-style: normal; font-size: smaller;">{{{note|}}} }}</td></tr></table><includeonly><!--
+
|<td>{{#if:{{{icon|}}}
 +
  |{{{icon}}}
 +
  |[[File:{{{image}}}|{{#if:{{{pix|}}}|{{{pix}}}|40x30}}px|alt={{{imagealt|Stub icon}}}]]
 +
}}</td>
 +
}}
 +
<td>''This {{{subject|}}} {{{article|article}}} {{{qualifier|}}} is a [[Wikipedia:stub|stub]].  You can help ssf by [{{fullurl:{{FULLPAGENAME}}|action=edit}} expanding it].''{{#if:{{{name|}}}
 +
|{{navbar|{{{name}}}|mini=yes|style=position: absolute; right: 15px; display: none;}}
 +
}}{{#if:{{{note|}}}
 +
|<br /><span style="font-style: normal; font-size: smaller;">{{{note}}}
 +
}}</td>
 +
</tr></table>{{#ifeq:{{NAMESPACE}}|{{ns:0}}<!--Article space-->|<!--
  
  *** Stub article category sorted by DEFAULTSORT or PAGENAME. ***
+
  *** Stub category ***
 +
-->{{#if:{{{category|}}}|[[Category:{{{category}}}]]}}<!--
  
-->{{#ifeq:{{NAMESPACE}}||[[Category:{{{category}}}]]}}<!--
+
  *** Optional second stub category ***
 
+
-->{{#if:{{{category1|}}}|[[Category:{{{category1}}}]]}}<!--
*** Template category - sorted by " tempsort". ***
+
 
+
-->{{#ifeq:{{NAMESPACE}}|Template|[[Category:{{{category}}}| {{{tempsort|}}}]]|}}<!--
+
 
+
  *** Is there a second stub category? ***
+
 
+
-->{{#if:{{{category1|}}}|<!--
+
 
+
  *** Stub article second category sorted by DEFAULTSORT or PAGENAME. ***
+
 
+
  -->{{#ifeq:{{NAMESPACE}}||[[Category:{{{category1}}}]]}}<!--
+
 
+
  *** Template second category - sorted by " tempsort1". ***
+
 
+
  -->{{#ifeq:{{NAMESPACE}}|Template|[[Category:{{{category1}}}| {{{tempsort1|}}}]]|}}<!--
+
  
 +
*** Optional third stub category ***
 +
-->{{#if:{{{category2|}}}|[[Category:{{{category2}}}]]}}<!--
 
-->}}<!--
 
-->}}<!--
  
*** Is there a third stub category? ***
+
*** check for valid name parameter and transclude /templatepage on template page ***
 
+
-->{{#if:{{{demo|<noinclude>yes</noinclude>}}}
-->{{#if:{{{category2|}}}|<!--
+
  |<!--Demonstration version-->
 
+
  |{{#switch:{{FULLPAGENAME:{{{name|}}}}}
  *** Stub article third category sorted by DEFAULTSORT or PAGENAME. ***
+
    |{{FULLPAGENAME}}=<!--Template page-->{{Asbox/templatepage
 
+
      |image    = {{{image|}}}
  -->{{#ifeq:{{NAMESPACE}}||[[Category:{{{category2}}}]]}}<!--
+
      |pix      = {{{pix|}}}
 
+
      |imagealt  = {{{imagealt|}}}
  *** Template third category - sorted by " tempsort2". ***
+
      |icon      = {{{icon|}}}
 
+
      |subject  = {{{subject|}}}
  -->{{#ifeq:{{NAMESPACE}}|Template|[[Category:{{{category2}}}| {{{tempsort2|}}}]]|}}<!--
+
      |article  = {{{article|}}}
 
+
      |qualifier = {{{qualifier|}}}
-->}} <!-- *** Is there a date specified? ***
+
      |category  = {{{category|}}}
 
+
      |tempsort  = {{{tempsort|}}}
-->{{#if:{{{date|}}}|<!--
+
      |category1 = {{{category1|}}}
 
+
      |tempsort1 = {{{tempsort1|}}}
  *** Put it in the appropriate dated category ***
+
      |category2 = {{{category2|}}}
 
+
      |tempsort2 = {{{tempsort2|}}}
--  ->{{#ifeq:{{NAMESPACE}}||[[Category:Stubs from {{{date|}}}]]}}|<!--
+
      |note      = {{{note|}}}
 
+
      |name      = {{{name|}}}
  *** Stub in undated category - this drives the dating agents. ***
+
    }}
 
+
    |{{#titleparts:{{FULLPAGENAME}}|1}}=<!--Is a subtemplate, e.g. a sandbox version. Don't display documentation.-->
-->{{#ifeq:{{NAMESPACE}}||[[Category:Stubs undated]]}}<!--
+
    |#default={{#ifeq:{{NAMESPACE}}|Template
 
+
      |<!--{{ombox
-->}}<!--
+
        |type=content
 
+
        |text=It appears that the ''name'' parameter of this template is undefined or incorrect. If this is the stub template, please set {{para|name|{{FULLPAGENAME}}}}. If this is a demonstration please set {{para|demo|yes}}.
*** Whatlinkshere marker and exclude in print category***
+
      }}-->[[Category:Stub message boxes needing attention|{{#if:{{{name|}}}|E|W}}{{PAGENAME}}]]
 
+
    }}
-->{{#ifeq:{{NAMESPACE}}|Template|[[Template:Asbox/whatlinkshere|<s/>]][[Category:Exclude in print]]|}}<!--
+
  }}
 
+
}}<noinclude><!--
 
+
--></includeonly><noinclude><!--
+
  
 
  *** Documentation ***
 
  *** Documentation ***
 
+
-->{{documentation}}
-->
+
{{documentation}}
+
 
<!-- Add categories and inter-wikis to the /doc subpage, not here! -->
 
<!-- Add categories and inter-wikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Latest revision as of 12:12, 17 February 2013