Difference between revisions of "Template:IRC"

From Archiveteam
Jump to navigation Jump to search
(Switch default network from EFnet to hackint)
 
(16 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
For an IRC channel name with a link to EFNet's web IRC interface. The sole parameter is the name of the channel (# sign must be omitted).
This renders an IRC channel name with a link to the webchat interface and takes the following parameters:
 
* (unnamed): the name of the channel ''without'' the #. Default: <code>archiveteam-bs</code>
* <code>network</code>: the IRC network this channel is/was located on. This can have the values <code>hackint</code> (default) or <code>EFnet</code>.
* <code>abandoned</code>: the presence of a non-empty value for this parameter marks the channel as abandoned. This causes the main output of the template to instead point to the general discussion channel (#archiveteam-bs on hackint) while keeping a reference to the former channel.
* <code>abandoned_render_mode</code>: how the abandoned channel should be rendered. Possible values are <code>inline</code> (default), <code>br+small</code>, <code>oldtextonly</code>. See below for examples.
 
Examples:
* <code><nowiki>{{IRC|archiveteam}}</nowiki></code> results in: {{IRC|archiveteam}}
* <code><nowiki>{{IRC}}</nowiki></code> results in: {{IRC}}
* <code><nowiki>{{IRC|}}</nowiki></code> results in: {{IRC|}}
* <code><nowiki>{{IRC|channelname|network=EFnet}}</nowiki></code> results in: {{IRC|channelname|network=EFnet}}
* <code><nowiki>{{IRC|channelname|EFnet}}</nowiki></code> results in: {{IRC|channelname|EFnet}}
* <code><nowiki>{{IRC|foo|EFnet|abandoned}}</nowiki></code> results in (note the hover text): {{IRC|foo|EFnet|abandoned}}
* <code><nowiki>{{IRC|foo|EFnet|abandoned|oldtextonly}}</nowiki></code> results in: {{IRC|foo|EFnet|abandoned|oldtextonly}}
 
The <code>br+small</code> render mode produces two lines of output: <code><nowiki>{{IRC|foo|EFnet|abandoned|br+small}}</nowiki></code> results in:
 
{{IRC|foo|EFnet|abandoned|br+small}}


Example:
<nowiki>{{IRC|archiveteam}}</nowiki>
Result:
<span class="plainlinks">[http://chat.efnet.org:9090/?channels=%23archiveteam #archiveteam]</span>
</noinclude><includeonly><span class="plainlinks">[http://chat.efnet.org:9090/?channels=%23{{{1}}} #{{{1}}}]</span></includeonly>
[[Category:Templates]]
[[Category:Templates]]
</noinclude><includeonly>{{ #if: {{{abandoned|{{{3|}}}}}}
  |{{#switch:{{{abandoned_render_mode|{{{4|}}}}}}|br+small={{IRC channel|archiveteam-bs|hackint}}<br /><small>(formerly&nbsp;{{IRC channel|{{#if:{{{1|}}}|{{{1}}}|archiveteam-bs}}|{{#if:{{{network|{{{2|}}}}}}|{{{network|{{{2|}}}}}}|hackint}}|_nolink=true}})</small>|oldtextonly={{IRC channel|{{#if:{{{1|}}}|{{{1}}}|archiveteam-bs}}|{{#if:{{{network|{{{2|}}}}}}|{{{network|{{{2|}}}}}}|hackint}}|_nolink=true}} (abandoned)|#default=<span title="formerly {{IRC channel|{{#if:{{{1|}}}|{{{1}}}|archiveteam-bs}}|{{#if:{{{network|{{{2|}}}}}}|{{{network|{{{2|}}}}}}|hackint}}|_nolink=true}}">{{IRC channel|archiveteam-bs|hackint}}</span>}}
  |{{IRC channel|{{#if:{{{1|}}}|{{{1}}}|archiveteam-bs}}|{{#if:{{{network|{{{2|}}}}}}|{{{network|{{{2|}}}}}}|hackint}}}}
}}</includeonly>

Latest revision as of 18:36, 31 October 2021

This renders an IRC channel name with a link to the webchat interface and takes the following parameters:

  • (unnamed): the name of the channel without the #. Default: archiveteam-bs
  • network: the IRC network this channel is/was located on. This can have the values hackint (default) or EFnet.
  • abandoned: the presence of a non-empty value for this parameter marks the channel as abandoned. This causes the main output of the template to instead point to the general discussion channel (#archiveteam-bs on hackint) while keeping a reference to the former channel.
  • abandoned_render_mode: how the abandoned channel should be rendered. Possible values are inline (default), br+small, oldtextonly. See below for examples.

Examples:

  • {{IRC|archiveteam}} results in: #archiveteam (on hackint)
  • {{IRC}} results in: #archiveteam-bs (on hackint)
  • {{IRC|}} results in: #archiveteam-bs (on hackint)
  • {{IRC|channelname|network=EFnet}} results in: #channelname (on EFnet)
  • {{IRC|channelname|EFnet}} results in: #channelname (on EFnet)
  • {{IRC|foo|EFnet|abandoned}} results in (note the hover text): #archiveteam-bs (on hackint)
  • {{IRC|foo|EFnet|abandoned|oldtextonly}} results in: #foo (on EFnet) (abandoned)

The br+small render mode produces two lines of output: {{IRC|foo|EFnet|abandoned|br+small}} results in:

#archiveteam-bs (on hackint)
(formerly #foo (on EFnet))