Difference between revisions of "Template:ArticleStatus"

From Game Logs
Jump to: navigation, search
m (Protected "Template:ArticleStatus": шаблон [edit=sysop:move=sysop])
(поправил "no" статус)
Line 1: Line 1:
<includeonly>{{ #vardefine: rip | RIP }}{{ #vardefine: frozen | FROZEN }}{{ #vardefine: active | ACTIVE }}{{  #vardefine: descriptionString |  {{    #if: {{{Description|}}} |      {{{Description|}}} |      {{{Name}}}  }}}}{{  #vardefine: activeArticleString |  {{    #if: {{{ActiveArticle|}}} |      {{{ActiveArticle|}}} |      {{{Name}}}  }}}}{{  #vardefine: lastTime |  {{#DateDiff: {{#time: c }} | {{#time: c |{{#pageInfo:{{ #var:activeArticleString }} }} }} }}}}{{  #vardefine: currentStatus |  {{    #ifexpr: {{ #var: lastTime }} > 180 |      {{ #var: rip }} |      {{        #ifexpr: {{ #var: lastTime }} > 30 |          {{ #var: frozen }} |          {{ #var: active }}      }}  }}}}{{  #vardefine: statusString |  {{    #switch: {{{Status|auto}}}      | rip = {{ #var: rip }}      | frozen = {{ #var: frozen }}      | active = {{ #var: active }}      | auto = {{ #var: currentStatus }}      | {{{Status|auto}}}  }}}}[[{{{Name}}}|{{ #var: descriptionString }}]] {{ #ifeq: {{{Status|auto}}} | no || [status: {{ #var: statusString }} &#124; updated: {{#time: j F Y |{{#pageInfo:{{ #var:activeArticleString }} }} }} }} ]</includeonly>
+
<includeonly>{{ #vardefine: rip | RIP }}{{ #vardefine: frozen | FROZEN }}{{ #vardefine: active | ACTIVE }}{{  #vardefine: descriptionString |  {{    #if: {{{Description|}}} |      {{{Description|}}} |      {{{Name}}}  }}}}{{  #vardefine: activeArticleString |  {{    #if: {{{ActiveArticle|}}} |      {{{ActiveArticle|}}} |      {{{Name}}}  }}}}{{  #vardefine: lastTime |  {{#DateDiff: {{#time: c }} | {{#time: c |{{#pageInfo:{{ #var:activeArticleString }} }} }} }}}}{{  #vardefine: currentStatus |  {{    #ifexpr: {{ #var: lastTime }} > 180 |      {{ #var: rip }} |      {{        #ifexpr: {{ #var: lastTime }} > 30 |          {{ #var: frozen }} |          {{ #var: active }}      }}  }}}}{{  #vardefine: statusString |  {{    #switch: {{{Status|auto}}}      | rip = {{ #var: rip }}      | frozen = {{ #var: frozen }}      | active = {{ #var: active }}      | auto = {{ #var: currentStatus }}      | {{{Status|auto}}}  }}}}[[{{{Name}}}|{{ #var: descriptionString }}]] [{{ #ifeq: {{{Status|auto}}} | no || status: {{ #var: statusString }} &#124; }}updated: {{#time: j F Y |{{#pageInfo:{{ #var:activeArticleString }} }} }}]</includeonly>
 
<noinclude>
 
<noinclude>
 
*This template can be used to show status of one wiki page on another page.
 
*This template can be used to show status of one wiki page on another page.
Line 13: Line 13:
 
***any other string - it'll be shown without change.
 
***any other string - it'll be shown without change.
 
**ActiveArticle - page, which will be used to determine auto status. Default is Name.
 
**ActiveArticle - page, which will be used to determine auto status. Default is Name.
 
+
* [[ArticleStatusTest|In action]]
 
[[Category:Appearance]]
 
[[Category:Appearance]]
 
</noinclude>
 
</noinclude>

Revision as of 09:21, 6 November 2007


  • This template can be used to show status of one wiki page on another page.
  • Parameters
    • Name - name of article, should be equal to link in wiki (e.g. The Schema). Required to proper work.
    • Description - description of article. Can be any string. It'll be shown to user. If empty or didn't specified - Name used instead of Description.
    • Status - status of article:
      • auto - this is used by default, means that status determined from last update date of page.
      • rip - predefined status. It would be set by auto, if article wasn't updated for 180 days.
      • frozen - predefined status. It would be set by auto, if article wasn't updated for 30 days.
      • active - predefined status. It would be set by auto, if article was updated in 30 days.
      • no - predefined status. Use this, if you don't want to see status string.
      • any other string - it'll be shown without change.
    • ActiveArticle - page, which will be used to determine auto status. Default is Name.
  • In action