Template:CTD article: Difference between revisions

m
+library links
mNo edit summary
m (+library links)
 
(13 intermediate revisions by the same user not shown)
Line 3: Line 3:
* To create a new article use form {{f|CTD article}}.  
* To create a new article use form {{f|CTD article}}.  
* Pages that use this template are placed in category {{c|CTD articles}} and other categories, named in "categories" parameter.
* Pages that use this template are placed in category {{c|CTD articles}} and other categories, named in "categories" parameter.
* [[Module:CTD|Module CTD]] with some additional functions.


{| class=wikitable  
{| class=wikitable  
Line 15: Line 16:
  | person =  
  | person =  
  | short name =  
  | short name =  
| initials =
  | origin =
  | origin =
  | variations =
  | variations =
Line 22: Line 24:
  | transliteration IAST =
  | transliteration IAST =
  | description =
  | description =
| short description =
  | image =  
  | image =  
  | image description =  
  | image description =  
Line 29: Line 32:
  | end =  
  | end =  
  | approximate duration =  
  | approximate duration =  
| library links =
  | library pages =  
  | library pages =  
  | quotes hpb =  
  | quotes hpb =  
Line 34: Line 38:
  | tsw en =  
  | tsw en =  
  | wikipedia =  
  | wikipedia =  
| other resources =
}}
}}
</pre>
</pre>
Line 39: Line 44:
* '''term''' -- term or name in full length in sortable form, i.e. without diacritical marks and if it is a name, it should be in following order: Last Name, Other Names, for example: ''Blavatsky, Helena Petrovna'' or ''Monier-Williams, Sir Monier'' (consider comma after last name); {{p|CTD term sortable}}, {{p|CTD term}}
* '''term''' -- term or name in full length in sortable form, i.e. without diacritical marks and if it is a name, it should be in following order: Last Name, Other Names, for example: ''Blavatsky, Helena Petrovna'' or ''Monier-Williams, Sir Monier'' (consider comma after last name); {{p|CTD term sortable}}, {{p|CTD term}}
* '''term to show''' -- the same term with diacritical marks (if exist) and stress mark (if needed); if term is a name then put it in a full form in regular order, for example: ''Helena Petrovna Blavatsky''; {{p|CTD term to show}}, {{p|CTD term}}
* '''term to show''' -- the same term with diacritical marks (if exist) and stress mark (if needed); if term is a name then put it in a full form in regular order, for example: ''Helena Petrovna Blavatsky''; {{p|CTD term to show}}, {{p|CTD term}}
* '''person''' -- "yes" if it is a person, in this case term will be added to category {{c|Persons}} and semantic properties {{p|Name}}, {{p|Full name}} and {{p|Short name}} are set; ''full name'' is a name set in ''term to show'' parameter or equals ''term'' otherwise
* '''person''' -- "yes" if it is a person, in this case term will be added to category {{c|Persons}} and semantic properties {{p|Name}}, {{p|Full name}}, {{p|Short name}} and {{p|Short name regular}} are set; ''full name'' is a name set in ''term to show'' parameter or equals ''term'' otherwise
* '''short name''' -- short version of name for bibliography, i.e. ''Blavatsky, H. P.'' or ''Slaughter, Rev. W. B.'' or ''Mirville, J.-E. de''; {{p|Short name}}
* '''short name''' -- short version of name or family name (surname) for bibliography, i.e. ''Blavatsky'' or ''Avicenna''; {{p|Short name}}
* '''initials''' -- initials to add to surname for bibliography and short references; if set, then '''short name''' is interpreted as surname and two properties are set:
: • {{p|Short name regular}} in regular format '''N. M. Surname''', f.e.: ''H. P. Blavatsky'', or ''Rev. W. B. Slaughter'', or ''J.-E. de Mirville''
: • {{p|Short name}} in sortable format '''Surname, N. M.''', f.e.: ''Blavatsky, H. P.'', or ''Slaughter, Rev. W. B.'', or ''Mirville, J.-E. de''
 
* '''origin''' -- spelling in original language, original meaning, etymology; {{p|CTD term origin}}
* '''origin''' -- spelling in original language, original meaning, etymology; {{p|CTD term origin}}
* '''variations''' -- different spellings (list separated by ";"); {{p|CTD term variations}}, {{p|CTD term}}
* '''variations''' -- different spellings (list separated by ";"); {{p|CTD term variations}}, {{p|CTD term}}
Line 51: Line 60:
''Description, relationship:''
''Description, relationship:''
* '''description''' -- description of a term, the article itself; {{p|CTD term description}}
* '''description''' -- description of a term, the article itself; {{p|CTD term description}}
* '''short description''' -- short description of a term, optional; if empty, set to first 100 chars from ''description''; {{p|CTD term short description}}
* '''short description''' -- short description, used in footnotes and popup information; optional; if empty, set to first 100 chars from ''description''; {{p|CTD term short description}}
* '''image''' -- filename of an image; {{p|CTD term image}}
* '''image''' -- filename of an image; {{p|CTD term image}}
* '''image description''' -- for person, if this parameter is not set, there will be automatic description generated from name and dates of life; {{p|CTD term image}}
* '''image description''' -- for person, if this parameter is not set, there will be automatic description generated from name and dates of life; {{p|CTD term image}}
Line 66: Line 75:


''Teopedia links:''
''Teopedia links:''
* '''library pages''' -- wiki pages in Library
* '''library links''' -- wiki pages in Library in user defined style; showed as set, with or without link
* '''library pages''' -- wiki page name; it will be wraped in brackets, making a link: <nowiki>[[text]]</nowiki>
* '''quotes hpb''' -- page with quotes by H.P. Blavatsky
* '''quotes hpb''' -- page with quotes by H.P. Blavatsky
* '''ctd rus''' -- Glossary article in Russian
* '''ctd rus''' -- article in Russian




Line 78: Line 88:


== See also ==
== See also ==
* [[:t-ru-lib:Шаблон:Понятие БТС|Понятие БТС]] -- corresponding template in Russian section [[t-ru-lib:Шаблон:Понятие БТС]]
* [[:t-ru-lib:Шаблон:Понятие БТС|Понятие БТС]] -- corresponding template in Russian section  


[[Category: Templates with forms]]
[[Category: Templates with forms]]
[[Category: Templates for CTD]]
[[Category: Templates for CTD]]
[[t-ru-lib:Шаблон:Понятие БТС]]
</noinclude><includeonly><!-- consider compatibility with old parameters
</noinclude><includeonly><!-- consider compatibility with old parameters
-->{{#vardefine:term to show| {{{term to show|}}} }}<!-- new name
  new name:
-->{{#if: {{{term diacritical|}}}| {{#vardefine:term to show| {{{term diacritical|}}} }} |}}<!-- old name
-->{{#vardefine:term to show| {{{term to show|}}} }}<!--  
  old name:
-->{{#if: {{{term diacritical|}}}| {{#vardefine:term to show| {{{term diacritical|}}} }} |}}<!--  
  set short name according to initials value
-->{{#if: {{{initials|}}}
| {{#vardefine:short name|{{{short name|}}}, {{{initials|}}}}} {{#vardefine:short name regular|{{{initials|}}} {{{short name|}}}}}
| {{#vardefine:short name|{{{short name|}}}}}
}}<!--
 
 
   set property "CTD term" to any possible variant, those that may consist of a list are processed later
   set property "CTD term" to any possible variant, those that may consist of a list are processed later
-->{{#set: CTD term sortable={{{term|}}}
-->{{#set: CTD term sortable={{{term|}}}
Line 90: Line 111:
  |+sep=;
  |+sep=;
}}<!--  
}}<!--  
  set lifetime; priority for approximate value
-->{{#vardefine:lifetime|}}<!-- set it empty, initialize
-->{{#if: {{{start|}}} | {{#vardefine:lifetime|{{#time: Y | {{{start|}}}}}-{{#time: Y | {{{end|}}}}} }} |}}<!--
-->{{#if: {{{approximate duration|}}} | {{#vardefine:lifetime| {{{approximate duration}}} }} |}}<!--
-->{{#set: Lifetime={{#var:lifetime}} }}<!--
   Glossary HEADER -->
   Glossary HEADER -->
{{CTD header}}
{{CTD header}}
Line 95: Line 122:
   IMAGE -->
   IMAGE -->
{{#if: {{{image|}}}
{{#if: {{{image|}}}
  | <div style="font-size: 90%; width: 214px; border: 2px grey solid; float:right; padding-top: 5px; margin: 0 0 5px 5px;">
  | <div style="font-size: 90%; width: 214px; border: 2px grey solid; float:right; padding-top: 5px; margin: 0 0 5px 5px; background: white;">
<div style="border:1px grey solid; width: 200px; margin: 0 auto;">[[File:{{{image}}}|200px]] {{#set: CTD term image={{{image|}}}}} </div><!--
<div style="border:1px grey solid; width: 200px; margin: 0 auto;">[[File:{{{image}}}|200px]] {{#set: CTD term image={{{image|}}}}} </div><!--
   image description -->
   image description -->
<div style="text-align: center;">{{{term|}}}</div>
<div style="text-align: center;">{{{term to show|}}}</div>
{{#if: {{{approximate duration|}}}
<div style="text-align: center;">{{#var:lifetime}}</div>
| <div style="text-align: center; >{{{approximate duration}}}</div>{{#set: Lifetime={{{approximate duration}}}}}
{{#if: {{{image description|}}}| <center>{{{image description}}}</center>|}}
|}}<!--
-->{{#if: {{{start|}}}
| <div style="text-align: center; >{{#time: Y | {{{start|}}}}}-{{#time: Y | {{{end|}}}}}</div> {{#set: Lifetime={{#time: Y | {{{start|}}}}}-{{#time: Y | {{{end|}}}}} }}
|}}<!--
-->{{#if: {{{image description|}}}| <center>{{{image description}}}</center>|}}
</div>
</div>
|}}<!-- done with image section
|}}<!-- done with image section
Line 118: Line 140:
-->{{#vardefine:person|{{lc: {{{person|}}} }}}}<!-- turn letters to lower case
-->{{#vardefine:person|{{lc: {{{person|}}} }}}}<!-- turn letters to lower case
-->{{#switch: {{#var:person}}
-->{{#switch: {{#var:person}}
  | yes = {{#set: Name={{{term|}}}|Short name={{{short name|}}}}} {{#if: {{{term to show|}}}| {{#set: Full name={{{term to show|}}}}} | {{#set: Full name={{{term|}}}}} }}[[Category: Persons]]
  | yes = {{#set: Name={{{term|}}} | Short name={{#var:short name}} | Short name regular={{#var:short name regular}} }} {{#if: {{{term to show|}}}| {{#set: Full name={{{term to show|}}}}} | {{#set: Full name={{{term|}}}}} }}[[Category: Persons]]
  | default = [[Category: CTD terms]]
  | default = [[Category: CTD terms]]
}}<!--  
}}<!--  
Line 124: Line 146:
   set variable {{#var:variants}}, with all the variations
   set variable {{#var:variants}}, with all the variations
-->{{#if: {{{variations|}}}
-->{{#if: {{{variations|}}}
|{{#vardefine:variants| • {{#arraymap:{{{variations|}}}|,|@@|[[CTD term::@@]]|&#32;•&#32;}} }}   
|{{#vardefine:variants| • {{#arraymap:{{{variations|}}}|;|@@|[[CTD term::@@]]|&#32;•&#32;}} }}   
|}}<!--
|}}<!--
-->{{#if: {{{transliteration SD|}}}  
-->{{#if: {{{transliteration SD|}}}  
Line 157: Line 179:
   Links to other pages and resources;
   Links to other pages and resources;
   see if there are any:
   see if there are any:
-->{{#if: {{{library pages|}}}     | {{#vardefine:link_exists|yes}} |}}<!--
-->{{#if: {{{library pages|}}} | {{#vardefine:link_exists|yes}} |}}<!--
-->{{#if: {{{library links|}}}  | {{#vardefine:link_exists|yes}} |}}<!--
-->{{#if: {{{quotes hpb|}}}    | {{#vardefine:link_exists|yes}} |}}<!--
-->{{#if: {{{quotes hpb|}}}    | {{#vardefine:link_exists|yes}} |}}<!--
-->{{#if: {{{ctd rus|}}}        | {{#vardefine:link_exists|yes}} |}}<!--
-->{{#if: {{{ctd rus|}}}        | {{#vardefine:link_exists|yes}} |}}<!--
Line 167: Line 190:
-->{{#varexists:link_exists|{{Style P-No indent|'''Some links:'''}}
-->{{#varexists:link_exists|{{Style P-No indent|'''Some links:'''}}
<ul>
<ul>
{{#if: {{{library pages|}}}|<li>Related pages: {{#arraymap:{{{library pages|}}}|;|@@|[[@@]]}}</li>|}}<!--
{{#if: {{{library links|}}}|<li>Related pages: {{#arraymap:{{{library links|}}}|;|@@|@@}}</li>|}}<!--
-->{{#if: {{{library pages|}}}|<li>Related pages: {{#arraymap:{{{library pages|}}}|;|@@|[[@@]]}}</li>|}}<!--
-->{{#if: {{{quotes hpb|}}}|<li>H.P.Blavatsky quotes: {{#arraymap:{{{quotes hpb|}}}|;|@@|[[:t-en-hpb:@@|@@]]}}</li>|}}<!--
-->{{#if: {{{quotes hpb|}}}|<li>H.P.Blavatsky quotes: {{#arraymap:{{{quotes hpb|}}}|;|@@|[[:t-en-hpb:@@|@@]]}}</li>|}}<!--
-->{{#if: {{{ctd rus|}}}|<li>CTD article in Russian: [[:t-ru-lib:{{{ctd rus|}}}|{{{ctd rus|}}}]] [[t-ru-lib:{{{ctd rus|}}}]]</li>|}}<!--
-->{{#if: {{{ctd rus|}}}|<li>CTD article in Russian: [[:t-ru-lib:{{{ctd rus|}}}|{{{ctd rus|}}}]] [[t-ru-lib:{{{ctd rus|}}}]]</li>|}}<!--
Line 175: Line 199:
</ul>|}}
</ul>|}}


<div style="border: 1px grey solid; background:#f8f8ff; width: 100%; font-size: 90%; color: grey; margin-top: 2em;">
<!-- Some important data for semantic requests -->
<p style="text-indent: 5px;">'''TERM DATA'''</p>
<div style="border: 1px grey solid; background: #f8f8ff; width: 98%; font-size: 90%; color: grey; margin: 2em 2em 2em 0; padding: 0 5px 3px 5px; float: left;">
<p style="text-indent: 5px;">To show: <b>{{#var:term to show}}</b>; Full sortable: <b>{{{term|}}}</b>; Short sortable: <b>{{{short name|}}}</b></p>
<p style="text-indent: 5px; font-size: 80%;">'''{{tip|DATA|Some important data for semantic requests}}'''</p>
{{#if: {{{term diacritical|}}}| <p style="text-indent: 5px; color: #9b111e;">'''! Template needs update !''' some parameters have been changed, see [[Template:CTD_article|description]].</p> [[Category:Pages to update template]]|}}
<p style="text-indent: 0px;">To show: <b>{{#var:term to show}}</b>; sortable: <b>{{{term|}}}</b><br>
{{#switch: {{#var:person}}
| yes =Person's short name: <b>{{#var:short name regular}}</b>; sortable: <b>{{#var:short name}}</b><br>
|}}
Lifetime: <b>{{#var:lifetime}}</b><br>
{{tip|Shortly|Short description used in footnotes and popup information.}}: <b>[[CTD term short description::{{#invoke: CTD |shortly| short_text = {{{short description|}}} | long_text = {{{description|}}}}}]]</b>
</p>
{{#if: {{{term diacritical|}}}| <p style="text-indent: 0px; color: #9b111e;">'''! Template needs update !''' some parameters have been changed, see [[Template:CTD_article|description]].</p> [[Category:Pages to update template]]|}}
</div>
</div>