Template:Title: Difference between revisions

From Shifti
Jump to navigation Jump to search
No edit summary
m make this template immune to people using custom CSS to get first-line indents on paragraphs
 
(40 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#ifeq: {{{title| }}} | |
{{#vardefine: auth  | {{#ifeq: {{NAMESPACE}} |User| {{{author|{{BASEPAGENAME}}}}} | {{{author| }}}}}}}<!--
  {{#ifeq: {{{author| }}} | |
-->{{#vardefine: uname | {{#ifeq: {{NAMESPACE}} |User| {{{user|{{BASEPAGENAME}}}}} | {{{user|{{#var:auth}}}}}}}}}<!--
    {{#ifeq: {{NAMESPACE}} |User|
-->{{#vardefine: pname | {{#ifeq: {{NAMESPACE}} |User| {{{name|{{SUBPAGENAME}}}}} | {{{name|{{PAGENAME}}}}}}}}}<!--
      <span style="font-size: 22px;?><b>{{SUBPAGENAME}}</b></span><br/>Author: ''{{BASEPAGENAME}}'' | {{PAGENAME}}
-->{{#vardefine: cauth | {{{coauthors| }}}}}<!--
     }} |
--><span style="font-size: 150%; font-weight: bold; text-indent: 0em;">{{#var:pname}}{{Title tag|{{#var:pname}}}}</span><br/>
     Author: ''{{{author}}}''
<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}}}}
    }}
   }} |
   }} |
   <span style="font-size: 22px;"><b>{{{title}}}</b></span><br/>
   {{#ifeq: {{#var:auth}} | |
  {{#ifeq: {{{author| }}} | | {{#ifeq: {{NAMESPACE}} |User| Author: ''{{BASEPAGENAME}}'' | }} | Author: ''{{{author}}}'' }}
    {{#ifeq: {{#var:uname}} | | Authors: ''{{#var:cauth}}'' |
}}
      Authors: ''[[User:{{#var:uname}}|{{#var:uname}}]] {{#var:cauth}}''
<hr/><noinclude>
    }} |  
Usage: <nowiki>{{TitleLine|title=Story Title|author=Author Name}}</nowiki>
    {{#ifeq: {{#var:uname}} | |
:This generates a headerbar like you see above, with &#123;&#123;&#123;title&#125;&#125;&#125; and &#123;&#123;&#123;author&#125;&#125;&#125; properly replaced. The parameters can be omitted entirely, and if the page is a sub-page of your user page the template will attempt to automatically fill in the values. Otherwise it will insert the page name as the Wiki sees it. For an example of what that means, take a look at [[User:ShadowWolf/Test Page]].
      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:
 
<pre>{{title
|name= Story Title
|author= Author Name
|user= shifti user name
|coauthors= extra authorship information
|category= name of author's category}}
</pre>
 
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.