Difference between revisions of "Template:Cite Mullié"

From blackwiki
Jump to navigation Jump to search
imported>PBS
m
imported>PBS
(update to handle three different B pages)
Line 4: Line 4:
 
|first=Charles
 
|first=Charles
 
|year=1852
 
|year=1852
 +
 +
<!--
 +
The names for the title parameter are laid out surname (or title) as the fist name, and the Christian names as the second third etc.
 +
All the first names apart from those starting with B are on a single page under the first letter. So the logic for those pages is simple:
 +
*Unless the first name starts with a "B"
 +
**Take the first letter from the name prepend a forward slash and the letter and a # to the name. "/[a-z]#Name"
 +
**Othewise if it start with a "B" it is a special case.
 +
 +
If the name starts with a B it can be on one of three pages: Names before Bonaparte, Bonaparte and those names after.
 +
"B" "BONEPARTE" or "B (suite)"
 +
 +
The algorithm to extract the correct link for a name starting with a B is:
 +
*If the first name is Bonaparte then prepend "/BONEPARTE#" to the name
 +
*There are two other names close to Bonaparte so deal with them uniquely "BON" and "BONAMY"  prepend "/B#" to then name
 +
*If the second letter is "O" then if the third letter is "I", it is before BONEPARTE so prepend "/B#" to then name
 +
**Otherwise it is after BONEPARTE so prepend "/B (suite)#"
 +
*If the second letter is after O then it is after BONEPARTE so prepend "/B (suite)#"
 +
**Othewise it is before O and BONEPARTE so prepend "/B#"
 +
-->
 
|title={{#if: {{{title|}}}|{{{title|}}}
 
|title={{#if: {{{title|}}}|{{{title|}}}
           |{{#if: {{{wstitle|}}}|[[s:fr:Biographie des célébrités militaires des armées de terre et de mer de 1789 à 1850/{{Str left|{{{wstitle|}}} }}#{{{wstitle|}}}|{{{wstitle|}}}]]
+
           |{{#if: {{{wstitle|}}}|[[s:fr:Biographie des célébrités militaires des armées de terre et de mer de 1789 à 1850/{{#ifeq:{{Str left|{{{wstitle|}}} }}|B
                                |[[s:fr:Biographie des célébrités militaires des armées de terre et de mer de 1789 à 1850|<sup><span style="color:red">article name needed]]</span></sup>
+
                      |{{#switch:{{str letter/trim|{{{wstitle|}}} }}
 +
                        |BON|Bon=B
 +
                        |BONAMY|Bonamy=B
 +
                        |BONAPARTE|Bonaparte=BONAPARTE
 +
                        |{{#switch:{{str mid|{{{wstitle|}}}|2|1}}
 +
                            |O|o={{#switch:{{str mid|{{{wstitle|}}}|3|1}}
 +
                                  |I|i=B
 +
                                  |B (suite)
 +
                                }}
 +
                            |P|Q|R|S|T|U|p|q|r|s|t|u=B (suite)
 +
                            |B
 +
                          }}
 +
                      }}
 +
                      |{{Str left|{{{wstitle|}}} }}
 +
            }}#{{{wstitle|}}}|{{{wstitle|}}}]]
 +
          |[[s:fr:Biographie des célébrités militaires des armées de terre et de mer de 1789 à 1850|<sup><span style="color:red">article name needed]]</span></sup>
 
           }}
 
           }}
 
       }}
 
       }}

Revision as of 19:56, 24 May 2017

Mullié, Charles (1852). "article name needed". Biographie des célébrités militaires des armées de terre et de mer de 1789 à 1850  (in French).

Template documentation[view] [edit] [history] [purge]

This template simplifies linking to articles in the Biographie des célébrités militaires des armées de terre et de mer de 1789 à 1850 a French book of biographies written by Charles Mullié and published in 1852

This template is a wrapper around {{cite encyclopedia}} see Help:CS1 for details of that standard template. This template includes a limited set of parameters supported by CS1. However any of the standard parameters can be added easily into this template if required.

Usage

These parameters are pre-set

|last=Mullié
|first=Charles
|year=1852
|encyclopedia= — set to link to the instance of the article name on Wikisource:
                 Biographie des célébrités militaires des armées de terre et de mer de 1789 à 1850
|language=fr — can be changed

One of these two parameters must be set:

|title=name — article name in the biography. if neither "title" or "wstitle" is set 
                  then a red waning message is displayed requesting an article name
|wstitle=name – link to the article name in wikisource

In addition to the two title parameters there is a display parameter that obfuscates the article name with one that may be more acceptable to the MOS (e.g. MOS:ALLCAPS). At the moment the articles on the French Wikisource to which that template links tend to have all upper case surnames, so the display variable can be used to present the name in upper and lower case e.g. wstitle=MASSÉNA (ANDRE) |display=Masséna (Andre)

|display=name

Optional parameters see Help:CS1

|volume=
|page=
|pages=
|ref=
|mode=

Examples

Linking to an article on Wikisource:

Linking to an article on Wikisource and including page numbers:

Linking to an article on Wikisource and including page numbers, and a display parameter: