Help:Templates

From Shifti
Jump to: navigation, search

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
{{title|name=Example|author=Example}}
Example
Author: Example
{{byline|author=Author's Name
|user=Shifti Username}}

Full documentation available at Template:byline
{{byline|name=Example|author=Example}}
Author: Example
{{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.
{{author's note|This template is for...}}
This template is for formatting a bit of text before the main story begins, to be used as an out-of-story "intro" where the author can say whatever he'd like to say about the story. For example, one could use it to explain where the idea for the story came from, or other background details about why it was written.

{{author note|An alternative template...}}
Author's Comments

An alternative template to the previous template that does the same thing but with a different appearance.

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}}
Separator d.png
Separator d left.png Text Separator d right.png
{{Separator|f}}
Separator f.png
Separator f left.png Text Separator f right.png
{{Separator|j}}
Separator j.png
Separator j left.png Text Separator j right.png
{{Separator|k}}
Separator k.png
Separator k left.png Text Separator k right.png
{{Separator|r}}
Separator r.png
Separator r left.png Text Separator r right.png
{{Separator|x}}
Separator x.png
Separator x left.png Text Separator x right.png
{{Separator|stars}}
Separator stars.png
Separator stars left.png Text Separator stars right.png

To format the above dingbats with text in the middle, do the following:

{{Separator|f|Add a Single Vertical Line After the Letter}}

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.

You can override the default image widths (200 pixels for the text-free image, 100 pixels for the text-bracketing images) by inserting a third parameter indicating how wide in pixels each image should be:

{{Separator|f|Text|200px}}

To override the default width for the text-free image use an empty text parameter:

{{Separator|f||300px}}

Tags to indicate content or status

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 and to inform them of the story's status:

Tags to be placed at the top of stories
Template code Displayed template
{{Universe|Universe Name}}
Icon
Universe Name story universe
{{editing requested}}
Icon
Copyediting is welcome
{{Comment tag}}
Icon
Add new comment (read old comments)
{{XXX}}
Icon
This story contains adult content.
{{Violence}}
Icon
Contains depictions of extreme violence.
{{WIP}}
Icon
This story is a work in progress.
{{Hiatus}}
Icon
Work on this story is on hiatus.
{{Stopped}}
Icon
No further updates are expected.
{{Critique requested}}
Icon
Constructive criticism and in-depth critiques are welcome

When multiple tags are placed at the top of the same page they automatically group themselves in a column. These tags are all optional, though in some cases we may insist on the use of the adult content tag ("adult content" can sometimes be highly subjective so we'll only require its use in obvious cases. In borderline cases it's merely polite).

The following tags are for use on your own user page:

Tags to be placed at the top of user pages
{{my stories
|name=Preferred byline name
|category=Name of story category
}}
(Both parameters are optional and default to your username)
Icon
Works by Preferred byline name on Shifti

These tags are all generated using Template:Float tag (see template page for full documentation). If you want, you can use float tag directly to create your own custom tags. For example:

Template code Displayed template
{{float tag|text=This story is intended for people who like apples. If you don't like apples, you may not enjoy this much.}}
This story is intended for people who like apples. If you don't like apples, you may not enjoy this much.

In addition to these simple tags, there's the "info" template that's useful for combining a large number of different bits of information in the upper right corner. You can use this instead of the above tags or in conjunction with them, in whatever combination you like.

Info omnibus tag
Template code Displayed template
{{info
|author= author name
|title= story title
|website= author website
|contact= author email
|setting= universe
|series= series name
|position= position of story in series
|previous= link to previous story in series
|next= link to next story in series
|genre= the genre of the story
}}
Info icon.pngstory title
Author:email author name
Website:author website
Genre:the genre of the story
Series:series name (#position of story in series)
Previous:link to previous story in series
Next:link to next story in series
Setting/Universe:universe

All of the parameters used in the example above are optional, if you don't want to use one of them just omit it and it won't appear in the info box.

Linking stories in a series

These templates are handy for creating nicely formatted and easy to find links between stories that form a connected series. This is intended primarily for stories that should be read in a specific order, not necessarily stories that are simply set in the same general universe; for those it is normally enough to just put that shared setting's category on the story.

The first template, series box, is intended to be used at the top of the story. It tucks itself away to the right, allowing the text of the story to flow around it. The second template, series bar, is horizontally oriented and centered on the page. It's intended for use down at the bottom of the story, though if you like it works at the top just fine as well.

All three parameters are optional and can be omitted.

Template code Displayed template
{{series box
|series=Series name
|previous=[[Previous story]]
|next=[[Next story]]}}
Series name
Preceded by: Previous story
Succeeded by: Next story
{{series bar
|series=Series name
|previous=[[Previous story]]
|next=[[Next story]]}}
Preceded by:
Previous story
Series name Succeeded by:
Next story

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}} inline note text
{{Side note|Side note text}}
Side note text

One could also use footnotes to annotate a story, see the Help:Footnotes page for details on how to use them.

Licensing templates

By default, the contents of Shifti aren't under any specific license other than that implied by Shifti:Copyrights. Each user retains the full copyright to their own work. However, there are some types of contents that may be easier to work with under a more permissive copyleft-style license, for example an open collaborative story or list of resources. The following templates are available for placing particular pages under particular licenses; they're meant to be put at the bottom of a page as a footer.

Note that placing one's work under a license doesn't cause one to lose the copyright to the work, so one can always choose to release the work again under additional licenses. So if by some chance you license a story under a noncommercial-only license, you still have the right to sell the story commercially later on; the noncommercial-only license merely restricts other people from selling the story commercially.

License templates
Template code Displayed template
{{cc-by-nc-sa}}
Creative Commons License All contributions to this page are licensed under the attribution-noncommercial-sharealike 3.0 Creative Commons license.

(In case the question ever arises, these license templates are displayed on this help page only for informational purposes and are not intended to place this help page under any of them.)