Help:Templates: Difference between revisions

From Shifti
Jump to navigation Jump to search
reordering sections; story formatting is more important than the status indicators, IMO
Line 1: Line 1:
A "template" is a small Shifti page in the template namespace that one can insert into the body of another page via a process called "transclusion". Templates are denoted using curley brackets instead of square brackets.
A "template" is a small Shifti page in the template namespace that one can insert into the body of another page via a process called "transclusion". Templates are denoted using curley brackets instead of square brackets.
==Story formatting==
These templates are useful for adding a title and author byline or section headers in a standardized manner.
{| border="1"
|+ Templates for some story markup
|-
!Template Code
!Displayed template
|-
| <nowiki>{{title|name=name of page|author=page author|user=shifti user name}}</nowiki><br/>Full documentation available at [[Template:Title]]
| <nowiki>{{title|name=Example|author=Example}}</nowiki><br/>{{title|name=Example|author=Example}}
|-
| <nowiki>{{dropcap|O}}nce upon a time...</nowiki>
| {{dropcap|O}}nce upon a time there was a lovely little template for creating "drop caps" at the beginning of a story - ie, a very large letter descending below the first line that the text in subsequent lines flows around. See [[Template:dropcap]] for more extensive description and example text.
|}
===Decorative dingbats===
[[Template:Separator]] allows the use of a variety of separator "dingbats", or decorative images, for dividing up a story in a fancy way. The template takes three parameters; an identifier determining which particular image to use, an optional bit of text to insert in the middle of the separator, and an optional parameter to define the width of the images in pixels.
{{Separator dingbats}}
Note how separator "r" overrides the default image widths. Since the decorative images used by separator "r" are taller than the other images, the default widths (200 pixels for separators without text and 100 pixels for separators with text) would result in a much larger image overall.
One may include wiki markup in the text, for example the following uses boldface:
<pre>{{Separator|f|'''The End'''}}</pre>
One may also combine a separator with a header, like so:
<pre>=={{separator|f|Chapter 7: The Bit With The Cheese}}==</pre>
Make sure to put the header markup outside the separator template rather than inside with the text.


==Tags to be placed at the top of stories==
==Tags to be placed at the top of stories==
Line 51: Line 86:
|{{note|note text}}
|{{note|note text}}
|}
|}
==Story formatting==
These templates are useful for adding a title and author byline or section headers in a standardized manner.
{| border="1"
|+ Templates for some story markup
|-
!Template Code
!Displayed template
|-
| <nowiki>{{title|name=name of page|author=page author|user=shifti user name}}</nowiki><br/>Full documentation available at [[Template:Title]]
| <nowiki>{{title|name=Example|author=Example}}</nowiki><br/>{{title|name=Example|author=Example}}
|-
| <nowiki>{{dropcap|O}}nce upon a time...</nowiki>
| {{dropcap|O}}nce upon a time there was a lovely little template for creating "drop caps" at the beginning of a story - ie, a very large letter descending below the first line that the text in subsequent lines flows around. See [[Template:dropcap]] for more extensive description and example text.
|}
==Decorative dingbats==
[[Template:Separator]] allows the use of a variety of separator "dingbats", or decorative images, for dividing up a story in a fancy way. The template takes three parameters; an identifier determining which particular image to use, an optional bit of text to insert in the middle of the separator, and an optional parameter to define the width of the images in pixels.
{{Separator dingbats}}
Note how separator "r" overrides the default image widths. Since the decorative images used by separator "r" are taller than the other images, the default widths (200 pixels for separators without text and 100 pixels for separators with text) would result in a much larger image overall.
One may include wiki markup in the text, for example the following uses boldface:
<pre>{{Separator|f|'''The End'''}}</pre>
One may also combine a separator with a header, like so:
<pre>=={{separator|f|Chapter 7: The Bit With The Cheese}}==</pre>
Make sure to put the header markup outside the separator template rather than inside with the text.

Revision as of 20:11, 7 August 2007

A "template" is a small Shifti page in the template namespace that one can insert into the body of another page via a process called "transclusion". Templates are denoted using curley brackets instead of square brackets.

Story formatting

These templates are useful for adding a title and author byline or section headers in a standardized manner.

Templates for some story markup
Template Code Displayed template
{{title|name=name of page|author=page author|user=shifti user name}}
Full documentation available at Template:Title
User| Example | Example}}[[Title::{{#ifeq: Help |User| Example | Example}}| ]]

{{#ifeq: | |

 {{#ifeq: {{#ifeq: Help |User| Example | Example}} | | 
   {{#ifeq: {{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}} | || 
     Author: [[User:{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}|{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}]] [[Author::{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}| ]]
   }} | 
   {{#ifeq: {{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}} | |
     Author: {{#ifeq: Help |User| Example | Example}} |
     Author: [[User:{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}|{{#ifeq: Help |User| Example | Example}}]] [[Author::{{#ifeq: Help |User| Example | Example}}| ]]
   }}
 }} |
 {{#ifeq: {{#ifeq: Help |User| Example | Example}} | |
   {{#ifeq: {{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}} | | Authors: ' | 
     Authors: [[User:{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}|{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}]] 
   }} | 
   {{#ifeq: {{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}} | |
     Authors: {{#ifeq: Help |User| Example | Example}} |
     Author: [[User:{{#ifeq: Help |User| Templates | {{#ifeq: Help |User| Example | Example}}}}|{{#ifeq: Help |User| Example | Example}}]] 
   }}
 }}
}} {{#if:| — see [[:Category:{{{category}}}|other works by this author]]}}
{{dropcap|O}}nce upon a time... Once upon a time there was a lovely little template for creating "drop caps" at the beginning of a story - ie, a very large letter descending below the first line that the text in subsequent lines flows around. See Template:dropcap for more extensive description and example text.

Decorative dingbats

Template:Separator allows the use of a variety of separator "dingbats", or decorative images, for dividing up a story in a fancy way. The template takes three parameters; an identifier determining which particular image to use, an optional bit of text to insert in the middle of the separator, and an optional parameter to define the width of the images in pixels.

Inter-paragraph divider dingbats
Template code Without text With text
{{Separator|d}} {{#if:|
 {{{2}}} 
|
}}|
}}
{{#if:Text|
 Text 
|
}}|
}}
{{Separator|f}} {{#if:|
 {{{2}}} 
|
}}|
}}
{{#if:Text|
 Text 
|
}}|
}}
{{Separator|j}} {{#if:|
 {{{2}}} 
|
}}|
}}
{{#if:Text|
 Text 
|
}}|
}}
{{Separator|k}} {{#if:|
 {{{2}}} 
|
}}|
}}
{{#if:Text|
 Text 
|
}}|
}}
{{Separator|r}} {{#if:|
 {{{2}}} 
|
}}|
}}
{{#if:Text|
 Text 
|
}}|
}}
{{Separator|x}} {{#if:|
 {{{2}}} 
|
}}|
}}
{{#if:Text|
 Text 
|
}}|
}}
{{Separator|stars}} {{#if:|
 {{{2}}} 
|
}}|
}}
{{#if:Text|
 Text 
|
}}|
}}

Note how separator "r" overrides the default image widths. Since the decorative images used by separator "r" are taller than the other images, the default widths (200 pixels for separators without text and 100 pixels for separators with text) would result in a much larger image overall.

One may include wiki markup in the text, for example the following uses boldface:

{{Separator|f|'''The End'''}}

One may also combine a separator with a header, like so:

=={{separator|f|Chapter 7: The Bit With The Cheese}}==

Make sure to put the header markup outside the separator template rather than inside with the text.

Tags to be placed at the top of stories

The following content warning templates may be used at the start of a story page to alert readers to potentially displeasing content they may encounter in the story:

Tags to be placed at the top of stories
Template code Displayed template
{{editing requested}} {{#if:Icono copyedit2.png|}}
Icon
Icon
Copyediting is welcome
{{#ifeq:Help|Help||}}
{{XXX}} {{#if:Triple X.png|}}
Icon
Icon
This story contains adult content.
{{#ifeq:Help|Help||}}
{{WIP}} {{#if:Work in progress.png|}}
Icon
Icon
This story is a work in progress.
{{#ifeq:Help|Help||}}
{{Hiatus}} {{#if:Clock warning.png|}}
Icon
Icon
Work on this story is on hiatus.
{{#ifeq:Help|Help||}}
{{Stopped}} {{#if:Clock stopped.png|}}
Icon
Icon
No further updates are expected.
{{#ifeq:Help|Help||}}

When multiple tags are placed at the top of the same page they automatically group themselves in a column.

Templates for suggesting edits within story text

These templates may be useful for collaborative editing. They allow an editor to add notes to a story making suggestions about things that he or she thinks should be changed, similar to the wiki's built-in function for displaying the differences between revisions of a page but without having to go digging into the article's revision history to find it.

Templates for suggesting edits within story text
Template code Displayed template
{{add|text to add}} text to add
{{remove|text to remove}} text to remove
{{replace|text to remove|text to replace it with}} text to removetext to replace it with
{{note|note text}} note text