Template:Rpl/doc: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Chris Day
imported>Chris Day
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This template is used on article lists like [[CZ:Core Articles/Natural Sciences|Natural Sciences Core Articles]]. It displays a pictorial representation of the article's status, the article's title (in blue if existent, otherwise in red), and a brief description of the term.
This template is used on article lists like [[CZ:Core Articles/Natural Sciences|Natural Sciences Core Articles]]. It displays a pictorial representation of the article's status, the article's title (in blue if existent, otherwise in red), and a brief [[CZ:Definition|description]] of the term.


The possible depictions are [[Image:Level3.jpg|20px]], [[Image:Level2.jpg|20px]], [[Image:Level1.jpg|20px]] and [[Image:Level0.jpg|20px]], with the status of the article increasing from stubby (left) to approved (right). An external article that has been imported into citizendium with no changes is indicated by an empty status image ([[Image:Level4.jpg|20px]]).
The possible depictions are [[Image:Level3.jpg|20px]], [[Image:Level2.jpg|20px]], [[Image:Level1.jpg|20px]] and [[Image:Level0.jpg|20px]], with the status of the article increasing from stubby (left) to approved (right). An external article that has been imported into citizendium with no changes is indicated by an empty status image ([[Image:Level4.jpg|20px]]).
Line 132: Line 132:
                   |Approval button
                   |Approval button
                   |x0 }}
                   |x0 }}
           | x0}} }}[[Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg|10px]] [[{{{1|}}}|{{{2|}}}]]
           | x0}} }}[[Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg|10px|
{{#ifeq: 0 | {{{{{1|}}}/Metadata|info=status}}|Approved Article|}}
{{#ifeq: 1 | {{{{{1|}}}/Metadata|info=status}}|Developed Article|}}
{{#ifeq: 2 | {{{{{1|}}}/Metadata|info=status}}|Developing Article|}}
{{#ifeq: 3 | {{{{{1|}}}/Metadata|info=status}}|Stub|}}
{{#ifeq: 4 | {{{{{1|}}}/Metadata|info=status}}|External Article|}}]] [[{{{1|}}}|{{{2|}}}]]
</pre>
</pre>


Line 141: Line 146:
                   |Approval button
                   |Approval button
                   |x0 }}
                   |x0 }}
           | x0}} }}[[Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg|10px]]&nbsp;[[{{{1|}}}]]
           | x0}} }}[[Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg|10px|
{{#ifeq: 0 | {{{{{1|}}}/Metadata|info=status}}|Approved Article|}}
{{#ifeq: 1 | {{{{{1|}}}/Metadata|info=status}}|Developed Article|}}
{{#ifeq: 2 | {{{{{1|}}}/Metadata|info=status}}|Developing Article|}}
{{#ifeq: 3 | {{{{{1|}}}/Metadata|info=status}}|Stub|}}
{{#ifeq: 4 | {{{{{1|}}}/Metadata|info=status}}|External Article|}}]]&nbsp;[[{{{1|}}}]]
</pre>
</pre>


Line 163: Line 173:
</pre>
</pre>


===To add the definition===
====[[Template:Approval button|Approval button]]====
<pre>
[[Image:Approval button.png|14px]]&nbsp;
</pre>
 
===To add definition.===
<pre>
<pre>
{{ {{#ifeq:{{{2|}}}|D
{{ {{#ifeq:{{{2|}}}|D
|Rpl def2
      |Rpl def2
|{{#ifexist: {{{1|}}} (disambiguation)
      |{{#ifexist: {{{1|}}} (disambiguation)
        |dabdef
          |dabdef
        |{{#ifexist: {{{1|}}}/Definition
          |{{#ifexist: {{{1|}}}/Definition
            |Rpl def1
              |Rpl def1
            |Rpl def3}} }} }}|1={{{1|}}}|2={{{2|}}} }}
              |Rpl def3}} }} }}|1={{{1|}}}|2={{{2|}}} }}
</pre>
====[[Template:Rpl def1|Rpl def1]]====
<pre>
{{:{{{1}}}/Definition}} <span class="plainlinks" style="font-size:0.8em;">[<nowiki></nowiki>
[http://en.citizendium.org/wiki?title={{urlencode:{{{1}}}}}/Definition&action=edit e]<nowiki></nowiki>]</span>}}
</pre>
 
====[[Template:Rpl def2|Rpl def2]]====
<pre>
{{#ifexist: {{{1|}}}/Definition
            |{{#ifexist: {{{1|}}} (disambiguation)
                      |''[http://en.citizendium.org/wiki?title={{urlencode:{{{1|}}}}}/
Definition&action=edit&section=new&preload=Template:Preload-disambig-speedydelete <font
color="darkred">Definition</font>]'' and disambiguation exist at [[{{{1|}}}/Definition]] and [[{{{1|}}}
(disambiguation)]]
::''Current definition is:'' {{def|{{{1}}}}}
                      |Definition exists at [[{{{1|}}}/Definition]]; [http://en.citizendium.org/wiki?
action=edit&preload=Template%3APreload-disambig&title={{urlencode:{{{1}}}}}_(disambiguation) ''<font
color=#666666>please add a disambiguation page</font>''].
::''Current definition is:'' {{def|{{{1}}}}} }}
            |{{#ifexist: {{{1|}}} (disambiguation)
                      |[[Image:Level0.jpg|15px]] Disambiguation exists at [[{{{1|}}} (disambiguation)]]
                      |[http://en.citizendium.org/wiki?action=edit&preload=Template%3APreload-
disambig&title={{urlencode:{{{1}}}}}_(disambiguation) ''<font color=#666666>Please add a disambiguation
page.</font>''] }} }}
</pre>
 
====[[Template:Rpl def3|Rpl def3]]====
<pre>
[http://en.citizendium.org/wiki?action=edit&preload=Template%3ADef_preload&title=
{{urlencode:{{{1}}}}}/Definition ''<font color=#666666>Add brief definition or description</font>'']
</pre>
 
====[[Template:dabdef|dabdef]]====
<pre>
''<font color=#666666>Please do not use this term in your topic list, because we do not have a single article for it.
Please substitute a more precise term. See </font> [[{{{1}}} (disambiguation)]] <font color=#666666>for a list of
available, more precise, topics.</font>''
</pre>
</pre>

Latest revision as of 11:26, 27 February 2009

This template is used on article lists like Natural Sciences Core Articles. It displays a pictorial representation of the article's status, the article's title (in blue if existent, otherwise in red), and a brief description of the term.

The possible depictions are Level3.jpg, Level2.jpg, Level1.jpg and Level0.jpg, with the status of the article increasing from stubby (left) to approved (right). An external article that has been imported into citizendium with no changes is indicated by an empty status image (Level4.jpg).


Example of use

{{rpl|Biology}} produces:

Adjusting name (variable 2)

The name does not have to be identical to the articles name. This might be useful when the context of the word is not in doubt. For example, on the Biology/Related Articles page it would be better to use the word Cell rather than Cell (biology).

{{rpl|Cell (biology)}} is seen as:

  • Developing Article Cell (biology): The basic unit of life, consisting of biochemical networks enclosed by a membrane. [e]

{{rpl|Cell (biology)|Cell}} is seen as:

  • Developing Article Cell: The basic unit of life, consisting of biochemical networks enclosed by a membrane. [e]

Formatting (variable3)

The default formatting is a single non-numbered list element, but this can be overridden using a third variable, which contains a different style. Note that you don't have to give a second argument, to be able to specify the third - just set the second argument to blank, by typing "||", and the name shown will be the same as the link. Some examples include:

Code Example
{{rpl|Biology}}
{{rpl|Zoology||**}}
{{rpl|Cell (biology)|Cell|*::}}
{{rpl|Ecology||**}}
  • Approved Article Biology: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
    • Stub Zoology: The scientific study of animals. [e]
    Developing Article Cell: The basic unit of life, consisting of biochemical networks enclosed by a membrane. [e]
    • Developing Article Ecology: The study of the distribution and abundance of organisms and how they are affected by the environment. [e]

Numbering could also be used:

Code Example
{{rpl|Biology||#}}
{{rpl|Genetics||:#}}
{{rpl|Zoology||:#}}
{{rpl|Ecology||:#}}
  1. Approved Article Biology: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
  1. Developing Article Genetics: The study of the inheritance of characteristics, genes and DNA. [e]
  2. Stub Zoology: The scientific study of animals. [e]
  3. Developing Article Ecology: The study of the distribution and abundance of organisms and how they are affected by the environment. [e]

In fact, any text you wish can be prepended to the line, using the third argument - or even nothing at all, if that's what you need:

Code Example
{{rpl|Biology||''See also: ''}}
See also: Approved Article Biology: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
{{rpl|Biology||}}
Approved Article Biology: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
Which means you can also do this, if you think it's preferable:
{{r|Biology}}
**{{rpl|Zoology||}}
**{{rpl|Ecology||}}
  • Biology [r]: The science of life — of complex, self-organizing, information-processing systems living in the past, present or future. [e]
    • Stub Zoology: The scientific study of animals. [e]
    • Developing Article Ecology: The study of the distribution and abundance of organisms and how they are affected by the environment. [e]

Redirects

If used on an entry that is a redirect, or an article without a metadata template, the link will appear as a purple color.

If used on a redirect that does have a definition:

{{rpl|Biological}} produces:

or:

{{rpl|Biological|B i o l o g i c a l}} produces:

Or for a redirect without a definition:

{{rpl|fMRI}} produces:


No article

If used on an entry that does not exist but does have a definition:

{{rpl|Botany}} produces:

Or:

{{rpl|Botany|Plant Science}} produces:

If used on an entry that does not exist (e.g. Foobar),

{{rpl|Foobar}} produces:

Notice that there are three links in the above output:

  • "Foobar" is a link to a blank article to be titled "Foobar".
  • "Add definition" is a link to a definition subpage for "Foobar". You would click on that link and write a definition, and save it, and then it would appear here. To learn what to write there, please see CZ:Definitions. Once you have written a definition, this link will disappear and the definition will appear in its place, as you can see above with the definition of "Biology".
  • "e" is another link to a (blank) definition subpage for "Foobar". But this link will not disappear. (Again, see the "Biology" line above; you can click the blue "e" on that line and from there, edit the definition of "Biology").

Code

To add the pictogram

{{ {{#ifeq:{{{2|}}}|D
|{{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |rpl style2
          |rpl style4}}
|{{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |{{#if: {{{2|}}} 
                 |rpl style1
                 |rpl style2 }}
          |rpl style3}} }}|1={{{1|}}}|2={{{2|}}} }}

Rpl style1

{{ {{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |{{#if:{{Template:{{{1|}}}/Metadata|info=ToA editor}}
                  |Approval button
                  |x0 }}
          | x0}} }}[[Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg|10px|
{{#ifeq: 0 | {{{{{1|}}}/Metadata|info=status}}|Approved Article|}}
{{#ifeq: 1 | {{{{{1|}}}/Metadata|info=status}}|Developed Article|}}
{{#ifeq: 2 | {{{{{1|}}}/Metadata|info=status}}|Developing Article|}}
{{#ifeq: 3 | {{{{{1|}}}/Metadata|info=status}}|Stub|}}
{{#ifeq: 4 | {{{{{1|}}}/Metadata|info=status}}|External Article|}}]] [[{{{1|}}}|{{{2|}}}]]

Rpl style2

{{ {{#ifexist: Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg
          |{{#if:{{Template:{{{1|}}}/Metadata|info=ToA editor}}
                  |Approval button
                  |x0 }}
          | x0}} }}[[Image:Level{{Template:{{{1|}}}/Metadata|info=status}}.jpg|10px|
{{#ifeq: 0 | {{{{{1|}}}/Metadata|info=status}}|Approved Article|}}
{{#ifeq: 1 | {{{{{1|}}}/Metadata|info=status}}|Developed Article|}}
{{#ifeq: 2 | {{{{{1|}}}/Metadata|info=status}}|Developing Article|}}
{{#ifeq: 3 | {{{{{1|}}}/Metadata|info=status}}|Stub|}}
{{#ifeq: 4 | {{{{{1|}}}/Metadata|info=status}}|External Article|}}]] [[{{{1|}}}]]

Rpl style3

{{#ifexist:{{{1|}}}
                 |{{#if: {{{2}}} 
                       |[[{{{1|}}}{{!}}'''''<font color="#cc9900">{{{2|}}}</font>''''']] 
                       |[[{{{1|}}}{{!}}'''''<font color="#cc9900">{{{1|}}}</font>''''']]}}
                 |{{#if: {{{2}}} 
                       |[[{{{1|}}}{{!}}{{{2|}}}]] 
                       |[[{{{1|}}}]] }} }}

Rpl style4

{{#ifexist:{{{1|}}}
                 |[[{{{1|}}}{{!}}'''''<font color="#cc9900">{{{1|}}}</font>''''']]
                 |[[{{{1|}}}]] }}

Approval button

[[Image:Approval button.png|14px]] 

To add definition.

{{ {{#ifeq:{{{2|}}}|D
      |Rpl def2
      |{{#ifexist: {{{1|}}} (disambiguation)
          |dabdef
          |{{#ifexist: {{{1|}}}/Definition
              |Rpl def1
              |Rpl def3}} }} }}|1={{{1|}}}|2={{{2|}}} }}

Rpl def1

{{:{{{1}}}/Definition}} <span class="plainlinks" style="font-size:0.8em;">[
[http://en.citizendium.org/wiki?title={{urlencode:{{{1}}}}}/Definition&action=edit e]]</span>}}

Rpl def2

{{#ifexist: {{{1|}}}/Definition
             |{{#ifexist: {{{1|}}} (disambiguation)
                      |''[http://en.citizendium.org/wiki?title={{urlencode:{{{1|}}}}}/
Definition&action=edit&section=new&preload=Template:Preload-disambig-speedydelete <font 
color="darkred">Definition</font>]'' and disambiguation exist at [[{{{1|}}}/Definition]] and [[{{{1|}}} 
(disambiguation)]]
::''Current definition is:'' {{def|{{{1}}}}}
                      |Definition exists at [[{{{1|}}}/Definition]]; [http://en.citizendium.org/wiki?
action=edit&preload=Template%3APreload-disambig&title={{urlencode:{{{1}}}}}_(disambiguation) ''<font 
color=#666666>please add a disambiguation page</font>''].
::''Current definition is:'' {{def|{{{1}}}}} }}
             |{{#ifexist: {{{1|}}} (disambiguation)
                      |[[Image:Level0.jpg|15px]] Disambiguation exists at [[{{{1|}}} (disambiguation)]]
                      |[http://en.citizendium.org/wiki?action=edit&preload=Template%3APreload-
disambig&title={{urlencode:{{{1}}}}}_(disambiguation) ''<font color=#666666>Please add a disambiguation 
page.</font>''] }} }}

Rpl def3

[http://en.citizendium.org/wiki?action=edit&preload=Template%3ADef_preload&title=
{{urlencode:{{{1}}}}}/Definition ''<font color=#666666>Add brief definition or description</font>'']

dabdef

''<font color=#666666>Please do not use this term in your topic list, because we do not have a single article for it. 
Please substitute a more precise term. See </font> [[{{{1}}} (disambiguation)]] <font color=#666666>for a list of 
available, more precise, topics.</font>''