Template:Title: Difference between revisions

From Shifti
Jump to navigation Jump to search
m double-check the formatting and clean it up a bit. Ready to rock&roll!
m make this template immune to people using custom CSS to get first-line indents on paragraphs
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#vardefine: auth  | {{#ifeq: {{NAMESPACE}} |User| {{{author|{{BASEPAGENAME}}}}} | {{{author| }}}}}}}
{{#vardefine: auth  | {{#ifeq: {{NAMESPACE}} |User| {{{author|{{BASEPAGENAME}}}}} | {{{author| }}}}}}}<!--
{{#vardefine: uname | {{#ifeq: {{NAMESPACE}} |User| {{{user|{{BASEPAGENAME}}}}} | {{{user|{{#var:auth}}}}}}}}}
-->{{#vardefine: uname | {{#ifeq: {{NAMESPACE}} |User| {{{user|{{BASEPAGENAME}}}}} | {{{user|{{#var:auth}}}}}}}}}<!--
{{#vardefine: pname | {{#ifeq: {{NAMESPACE}} |User| {{{name|{{SUBPAGENAME}}}}} | {{{name|{{PAGENAME}}}}}}}}}
-->{{#vardefine: pname | {{#ifeq: {{NAMESPACE}} |User| {{{name|{{SUBPAGENAME}}}}} | {{{name|{{PAGENAME}}}}}}}}}<!--
-->{{#vardefine: cauth | {{{coauthors| }}}}}<!--
--><span style="font-size: 150%; font-weight: bold; text-indent: 0em;">{{#var:pname}}{{Title tag|{{#var:pname}}}}</span><br/>
<span style="text-indent: 0em;">{{#ifeq: {{#var:cauth}} | |
  {{#ifeq: {{#var:auth}} | |
    {{#ifeq: {{#var:uname}} | ||
      Author: ''[[User:{{#var:uname}}|{{#var:uname}}]]'' {{Author tag|{{#var:uname}}}}
    }} |
    {{#ifeq: {{#var:uname}} | |
      Author: ''{{#var:auth}}'' |
      Author: ''[[User:{{#var:uname}}|{{#var:auth}}]]'' {{Author tag|{{#var:auth}}}}
    }}
  }} |
  {{#ifeq: {{#var:auth}} | |
    {{#ifeq: {{#var:uname}} | | Authors: ''{{#var:cauth}}'' |
      Authors: ''[[User:{{#var:uname}}|{{#var:uname}}]] {{#var:cauth}}''
    }} |
    {{#ifeq: {{#var:uname}} | |
      Authors: ''{{#var:auth}} {{#var:cauth}}''|
      Author: ''[[User:{{#var:uname}}|{{#var:auth}}]] {{#var:cauth}}''
    }}
  }}
}} {{#if:{{{category|}}}| &mdash; see [[:Category:{{{category}}}|other works by this author]]}}</span><hr/><noinclude>
Usage:


<span style="font-size: 132%; font-weight: bold;">{{#var:pname}}</span><br/>
<pre>{{title
{{#ifeq: {{#var:auth}} | |
|name= Story Title
  {{#ifeq: {{#var:uname}} | ||
|author= Author Name
    Author: ''[[User:{{#var:uname}}|{{#var:uname}}]]''
|user= shifti user name
  }} |
|coauthors= extra authorship information
  {{#ifeq: {{#var:uname}} | |
|category= name of author's category}}
    Author: ''{{#var:auth}}'' |
</pre>
    Author: ''[[User:{{#var:uname}}|{{#var:auth}}]]''
 
  }}
This generates a headerbar like you see above, with <nowiki>{{{name}}}, {{{author}}} and {{{user}}}</nowiki> values properly replaced. <nowiki>{{{user}}}</nowiki> is used to generate a link back to the authors user page. Any of the parameters can be omitted - in fact, on a page that is a sub-page of a user page they can be omitted entirely and the header will still be be properly generated. On other pages omission of all the parameters will result in only the addition of the story title. For an example of what all of the preceding means, take a look at [[User:ShadowWolf/Test Page]].
}}<hr/><noinclude>
Usage: <nowiki>{{title|name=Story Title|author=Author Name|user=shifti user name}}</nowiki>
:This generates a headerbar like you see above, with <nowiki>{{{name}}}, {{{author}}} and {{{user}}}</nowiki> values properly replaced. <nowiki>{{{user}}}</nowiki> is used to generate a link back to the authors user page. Any of the parameters can be omitted - in fact, on a page that is a sub-page of a user page they can be omitted entirely and the header will still be be properly generated. On other pages omission of all the parameters will result in only the addition of the story title. For an example of what all of the preceding means, take a look at [[User:ShadowWolf/Test Page]].
</noinclude>
</noinclude>

Latest revision as of 01:18, 15 February 2009

{{#ifeq: Template |User| Title | Title}}[[Title::{{#ifeq: Template |User| Title | Title}}| ]]
{{#ifeq: | |

 {{#ifeq: {{#ifeq: Template |User| Title |  }} | | 
   {{#ifeq: {{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}} | || 
     Author: [[User:{{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}}|{{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}}]] [[Author::{{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}}| ]]
   }} | 
   {{#ifeq: {{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}} | |
     Author: {{#ifeq: Template |User| Title |  }} |
     Author: [[User:{{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}}|{{#ifeq: Template |User| Title |  }}]] [[Author::{{#ifeq: Template |User| Title |  }}| ]]
   }}
 }} |
 {{#ifeq: {{#ifeq: Template |User| Title |  }} | |
   {{#ifeq: {{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}} | | Authors: ' | 
     Authors: [[User:{{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}}|{{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}}]] 
   }} | 
   {{#ifeq: {{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}} | |
     Authors: {{#ifeq: Template |User| Title |  }} |
     Author: [[User:{{#ifeq: Template |User| Title | {{#ifeq: Template |User| Title |  }}}}|{{#ifeq: Template |User| Title |  }}]] 
   }}
 }}

}} {{#if:| — see [[:Category:{{{category}}}|other works by this author]]}}


Usage:

{{title
|name= Story Title
|author= Author Name
|user= shifti user name
|coauthors= extra authorship information
|category= name of author's category}}

This generates a headerbar like you see above, with {{{name}}}, {{{author}}} and {{{user}}} values properly replaced. {{{user}}} is used to generate a link back to the authors user page. Any of the parameters can be omitted - in fact, on a page that is a sub-page of a user page they can be omitted entirely and the header will still be be properly generated. On other pages omission of all the parameters will result in only the addition of the story title. For an example of what all of the preceding means, take a look at User:ShadowWolf/Test Page.