|
<!-- Categories and interwikis go at the bottom of this page. -->
=== Usage ===
Use {{tnull|Talk quote block}} or {{tnull|tqb}} (a.k.a. {{tnull|Talkquote}}, {{tnull|Talk quote}}, or {{tnull|tq2}}) to quote (another's comments, a policy statement, etc.) in a block, on talk pages and noticeboards. It can be safely used after colon-indenting as well (see the [[#Indenting|§ Indenting]] example below <sup>[[[#Caveats|§ Caveats]]]</sup>). For a short inline quote, instead use {{tlx|Talk quote inline}} (a.k.a. {{tlx|Talk quotation}} or {{tlx|tq}}).
: Explanation of named parameters:
:*'''text''' (or '''1'''): The text being quoted.
:*'''by''' (or '''2'''): The author of the text being quoted. A [[Wikipedia:WP:U|Wikipedia username]] is expected, and the username will be provided as a [[Wikipedia:WP:Link|wikilink]] to the author's user page.
:*'''source''': The source of the text being quoted. Use instead of ''by'' when source is not individual user.
:*'''ts''': The [[Wikipedia:WP:Timestamp|timestamp]] of the edit whose text is being quoted. Hint: You can use [[Wikipedia:WP:5TILDES|five tildes]] to supply the current date and time: <code><nowiki>|ts=~~~~~</nowiki></code>.
:*'''oldid''': The [[Wikipedia:WP:Revision id|revision ID]] of the edit introducing the change that was made. Displayed as the timestamp linking to the Diff of the edit. (requires ''ts'' parameter or is not shown)
:*'''diff''': The revision ID of the [[Wikipedia:Help:Diff|Diff]] comparing target.
:*'''style''': [[Wikipedia:HTML|HTML]] in-line style. (see the [[Wikipedia:Template:Talk_quote_block/testcases#Parameter_"style"|testcases]])
</div>
|}
=== Caveats ===
==== Complex formatting compatibility ====
<ol><li>Check [[#Quoting_lists|§ Quoting lists]], and [[Help:Table#Nested_tables|Help:Table § Nested tables]] (for nesting demo).</li>
<li>{{tq2|1=<nowiki/>{{tq2|1=<nowiki/>
'''Quoted URLs with query strings break the template'''
...
<syntaxhighlight lang="moin">
{{tq2|This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977}}
</syntaxhighlight>
Doesn't display at all:
{{tq2|This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977}}|by=IamNotU|ts=15:12, 4 July 2019 (UTC)|oldid=904789911}}
When your template arguments contain an equals sign, you can't use implicit positional parameters because everything preceding the first equals sign gets parsed as the parameter name. The trick, in those situations, is to make the assignment ''explicit'', so that your entire argument is unambiguously parsed as the value being assigned to that parameter.
[[wikt:IOW#Adverb|IOW]]:
<syntaxhighlight lang="moin">
{{tq2|1=This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977}}
</syntaxhighlight>
{{tq2|1=This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977}}
Writing the transclusion as {{tlx|tq2|2=1=...}} puts the entire URL on the right-hand side of an assignment to the first unnamed parameter, rather than it being parsed as a template parameter named <syntaxhighlight lang="moin" inline>This here diff: https://en.wikipedia.org/w/index.php?title</syntaxhighlight> that's being assigned the value <syntaxhighlight lang="moin" inline>User:IamNotU/sandbox&diff=904787385&oldid=904785977</syntaxhighlight>.|by=FeRDNYC|ts=16:25, 5 July 2019 (UTC)|oldid=904932036}}</li>
<li>Due to [[MediaWiki]]'s parsing limitations, embedding such templates into a [[Help:List|list]] (using the leading <code>*</code>/<code>#</code>/<code>;</code>/<code>:</code> syntax) is very likely to lead to unexpected results. (for it regards the [[newline]] as the syntax delimiter <sup>[Help:List §§ [[Special:PermaLink/961705865#Common_mistakes|Common mistakes]], and [[Special:PermaLink/961705865#Paragraphs_and_other_breaks|Paragraphs and other breaks]]]</sup>)</li>
<li>{{tq2|1=<nowiki/>{{tq2|1=<nowiki/>{{tq2|1=<nowiki/>
'''Play nice with ordered and unordered lists'''
* {{talkquote|Lorem ipsum}}
Is there a way to get this template to function when used at the beginning of a list item? For instance <syntaxhighlight lang="moin" inline>* {{talkquote|Lorem ipsum}}</syntaxhighlight> will turn the bullet (or number) into a regular indent, rather than showing the bullet/number. It's fine if you put something between the bullet and template, but it'd be nice if it didn't need the hack.|by=Czar|ts=23:05, 6 February 2017 (UTC)|oldid=764078325}}
As you can see by your own example above, this is now fixed. (It was fixed some time ago, I'm not sure exactly when.) Lists now play nicely with the {{tlc|tq}} templates, or vice versa. You can even colon-indent them on Talk pages, now!
:::: {{tqb|I suspect the colon-indenting was the ''real'' motivation for fixing this.|source=[[User:FeRDNYC|FeRDNYC]] ([[User talk:FeRDNYC|talk]]) 14:31, 6 July 2019 (UTC)}}|by=FeRDNYC|ts=14:31, 6 July 2019 (UTC)|oldid=905053757}}
<syntaxhighlight lang="moin">
:::: {{tqb|I suspect the colon-indenting was the ''real'' motivation for fixing this.|source=[[User:FeRDNYC|FeRDNYC]] ([[User talk:FeRDNYC|talk]]) 14:31, 6 July 2019 (UTC)}}
</syntaxhighlight>
<br/><br/>
{{tq2|1=<nowiki/>
{{cot|expand=yes|title=Ordered list, named parameter with nowiki, colon-indented following lorem ipsum paragraph}}
{{lorem ipsum}}
: {{Talk quote block|source={{tlx|Talk quote block}}|text=<nowiki />
# Item one
# Item two
}}
{{cob}}|source=[[Special:PermaLink/962402214|Template:Talk quote block/testcases]]}}
<syntaxhighlight lang="moin">
: {{Talk quote block|source={{tlx|Talk quote block}}|text=<nowiki />
# Item one
# Item two
}}
</syntaxhighlight>
<br/>
<syntaxhighlight lang="moin">
<dl><dd>{{tq2|1=<nowiki/>
# Item one
# Item two|source={{tlx|Talk quote block}}}}</dd></dl>
</syntaxhighlight>
<dl><dd>{{tq2|1=<nowiki/>
# Item one
# Item two|source={{tlx|Talk quote block}}}}</dd></dl>|source=The hack}}</li></ol>
[[Category:Talk namespace quotation templates]]
[[ja:Template:Talkquote]]
}}</includeonly>
|