Difference between revisions of "Template:Cite blog"

From GodWiki
Jump to: navigation, search
m (I'm an idiot. This should sort out the problem I caused...)
m (Restoring comments, they weren't causing the problem at all.)
 
Line 1: Line 1:
 
[https://godvillegame.com/blog/{{#if: {{{1|}}}|post/{{{1}}}{{#if: {{{page|}}}|?page{{=}}{{{page}}}}} Godville Blog, post {{{1}}}|<nowiki/> Godville Blog}}{{#if: {{{2|}}}|&#58; <span style="font-style:italic;">{{#ifeq:{{{2}}}|auto|{{#switch:{{{1}}}|#default=(title not found)
 
[https://godvillegame.com/blog/{{#if: {{{1|}}}|post/{{{1}}}{{#if: {{{page|}}}|?page{{=}}{{{page}}}}} Godville Blog, post {{{1}}}|<nowiki/> Godville Blog}}{{#if: {{{2|}}}|&#58; <span style="font-style:italic;">{{#ifeq:{{{2}}}|auto|{{#switch:{{{1}}}|#default=(title not found)
 +
<!-- Blog titles can be added to this list using the post number. If the URL for the blog entry is https://godvillegame.com/blog/post/1, then that is blog post number 1. If the same title is used for multiple posts, list the numbers together (e.g, 11 and 12 below). This list is only used when title=auto, any other value for title= will be displayed as the title text for the cited entry. Please don't 'correct' this list unless you have double-checked that the blog title is genuinely different to the listed title. :) -->
 
|1=Greetings!
 
|1=Greetings!
 
|2=Keeping you informed
 
|2=Keeping you informed
Line 21: Line 22:
 
|27|28=Rise and shrine
 
|27|28=Rise and shrine
 
|28=Haunted News
 
|28=Haunted News
 +
<!-- There is no blog 29. -->
 
|30|31=First Temple in Godville
 
|30|31=First Temple in Godville
 
|32|33=Breaking News
 
|32|33=Breaking News

Latest revision as of 19:23, 16 November 2019

Godville Blog

[view] [edit] [history] [refresh]
📚 Documentation

Description

A convenience template for citing or referencing Godville Blog posts in Godwiki articles.

Usage

Simply provide the number of the blog post being referenced, and the mention will be formatted and linked to that post. If you omit the post number, it will create a general link to the blog.

Parameters

First unnamed parameter
The blog post number.
Second unnamed parameter
The blog post name, if you want it displayed in the citation text. If you set the title to auto, the template will use a list of blog titles it knows to automatically insert the correct title for that blog. See more below.
|page=page number
If supplied, the link will link to the specified page of comments, and the citation text will include a reference to comments page specified.

Auto titling

If you set the second parameter to auto (examples below), the template will use the correct title for the blog, if known. If the title is displayed as "(title not found)", you can still set the title for the citation manually.

When a new blog is published, the title needs to be added to the template's list before if can be used automatically. This isn't difficult to do! You can try to do it yourself, or if you're not confident you understand how the template works, or your change breaks the template (preview and look at the examples below before saving), you can ask for someone to do the update for you at the Help:Requests page, and someone who's confident with templates will make the change for you.

Examples

Wikicode Renders as
{{Cite blog|89|Bingo!}} Godville Blog, post 89: Bingo!
{{Cite blog|99|auto}} Godville Blog, post 99: Little by Little
{{Cite blog|117}} Godville Blog, post 117
{{Cite blog}} Godville Blog
{{Cite blog|9999|auto}} Godville Blog, post 9999: (title not found)

The template is especially useful in citations (hence the name).

This code
Strange things are afoot in the world of Godville!<ref>{{Cite blog|1|auto}}</ref>

==References==
<references/>
will be presented as

Strange things are afoot in the world of Godville![1]

References