Template:LinkForumThread: Difference between revisions

From LifeWiki
Jump to navigation Jump to search
m Added example for reference link to specific post in a thread
Allow passing p= in the absence of f=
Line 1: Line 1:
<includeonly>{{#ifeq: {{{format|}}} | ref | {{#if:{{{f|}}}|[http://www.conwaylife.com/forums/viewtopic.php?f={{{f}}}&t={{{t|}}}{{#if:{{{p|}}}|&p={{{p}}}#p{{{p}}}}} {{{title|}}}]|[http://www.conwaylife.com/forums/viewtopic.php?t={{{t|}}} {{{title|}}}]}} (discussion thread) at the ConwayLife.com forums | * {{#if:{{{f|}}}|[http://www.conwaylife.com/forums/viewtopic.php?f={{{f}}}&t={{{t|}}}{{#if:{{{p|}}}|&p={{{p}}}#p{{{p}}}}} {{{title|}}}]|[http://www.conwaylife.com/forums/viewtopic.php?t={{{t|}}} {{{title|}}}]}} (discussion thread) at the ConwayLife.com forums }} [[Category:Pages that link to the ConwayLife.com forums]]</includeonly><noinclude>This is a template for including links to threads at the '''[http://www.conwaylife.com/forums/ ConwayLife.com forums]''' in the "External Links" section of an article. It can take five parameters:
<includeonly>{{#ifeq: {{{format|}}} | ref | {{#if:{{{f|}}} |[http://www.conwaylife.com/forums/viewtopic.php?f={{{f}}}&t={{{t|}}}{{#if:{{{p|}}}|&p={{{p}}}#p{{{p}}}}} {{{title|}}}]|[http://www.conwaylife.com/forums/viewtopic.php?t={{{t|}}}{{#if:{{{p|}}}|&p={{{p}}}#p{{{p}}}}} {{{title|}}}]}} (discussion thread) at the ConwayLife.com forums | * {{#if:{{{f|}}}|[http://www.conwaylife.com/forums/viewtopic.php?f={{{f}}}&t={{{t|}}}{{#if:{{{p|}}}|&p={{{p}}}#p{{{p}}}}} {{{title|}}}]|[http://www.conwaylife.com/forums/viewtopic.php?t={{{t|}}}{{#if:{{{p|}}}|&p={{{p}}}#p{{{p}}}}} {{{title|}}}]}} (discussion thread) at the ConwayLife.com forums }} [[Category:Pages that link to the ConwayLife.com forums]]</includeonly><noinclude>This is a template for including links to threads at the '''[http://www.conwaylife.com/forums/ ConwayLife.com forums]''' in the "External Links" section of an article. It can take five parameters:


* ''t'', the id number of the thread being linked to;
* ''t'', the id number of the thread being linked to;
* ''f'', the id number of the forum the thread is located in (optional, but required for ''p'' references to work correctly);
* ''f'', the id number of the forum the thread is located in (optional);
* ''p'', the id number of a specific post to be linked to (optional, in combination with ''f'' parameter);
* ''p'', the id number of a specific post to be linked to (optional);
* ''title'', the title of the thread as it will appear in the link text;
* ''title'', the title of the thread as it will appear in the link text;
* ''format'', the way the resulting link should be formatted (optional):
* ''format'', the way the resulting link should be formatted (optional):

Revision as of 09:37, 27 July 2017

This is a template for including links to threads at the ConwayLife.com forums in the "External Links" section of an article. It can take five parameters:

  • t, the id number of the thread being linked to;
  • f, the id number of the forum the thread is located in (optional);
  • p, the id number of a specific post to be linked to (optional);
  • title, the title of the thread as it will appear in the link text;
  • format, the way the resulting link should be formatted (optional):
    • format=ref, format in a way suitable for <ref> ... </ref> tags.

Here are two simple usage examples:

You type:

{{LinkForumThread|t=1452|title=Soup search results}}

You see:

You type:

<ref name="post46748" />

==References==
<references>
<ref name="post46748">{{LinkForumThread
|f      = 7
|t      = 2036
|p      = 46748
|title  = Re: Thread for basic questions
|format = ref
}}</ref>
</references>

You see: a footnote link1 at the ref tag location, and a reference section containing

1. Re: Thread for basic questions (discussion thread) at the ConwayLife.com forums

See also