Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Talk quote block/doc
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
Move
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{redirect|Template:Talkquote|quoting inline|Template:Talk quote inline}} {{High-use}} {{Template shortcut|tqb|tq2}} {{Uses TemplateStyles|Template:Talk quote block/styles.css}} Use {{tnull|Talk quote block}} or {{tnull|tqb}} 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 ({{section link||Caveats}}). For a short inline quote, instead use {{tlx|Talk quote inline}}. == Usage == Unnamed (positional) parameters: * {{tlx|Talk quote block|text|by}} ** The order of positional parameters cannot change - {{var|text}} must come before {{var|by}}. Named parameters: * {{tlx|Talk quote block|text{{=}}|by{{=}}|source{{=}}|ts{{=}}|id{{=}}}} == Parameters == * {{para|text}} (or {{para|1}}): The text being quoted. * {{para|by}} (or {{para|2}}): The author of the text being quoted. A [[WP:U|Wikipedia username]] is expected, and the username will be provided as a [[WP:Link|wikilink]] to the author's user page. * {{para|source}}: The source of the text being quoted. Use instead of {{para|by}} when source is not individual user name, or when copy-pasting an entire sig. * {{para|ts}}: The [[WP:Timestamp|timestamp]] of the edit whose text is being quoted. Hint: You can use [[WP:5TILDES|five tildes]] to supply the current date and time: <code><nowiki>|ts=~~~~~</nowiki></code>. * {{para|id}}: The ID of the comment that will be used in a link to it if the {{para|ts}} parameter is also present. You can copy it by right-clicking the timestamp. * {{para|oldid}}: The [[Wikipedia: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 {{para|ts}} or is not shown). * {{para|diff}}: The link to the [[Help:Diff|diff]] comparing target. * {{para|style}}: [[HTML]] in-line style. (see the [[Template:Talk quote block/testcases#Parameter "style"|testcases]]) * {{para|nodash|y}} or {{para|no-dash|y}}: Suppresses the em dash and space before {{para|source}}, for when pasting a sig that already starts with a dash. * {{para|noping|y}} or {{para|no-ping|y}}: Suppresses the link to the author to avoid [[Help:Notifications|notifying them]]. == Examples == * {{tlx|Talk quote block|some random text|Example}} gives: <div style="background-color: var(--background-color-neutral-subtle, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:10px 10px">{{talk quote block|some random text|Example}}</div> * {{tlx|Talk quote block|more random text|Example|ts{{=}}08:52, 21 May 2011 (UTC)}} gives: <div style="background-color: var(--background-color-neutral-subtle, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:10px 10px">{{talk quote block|more random text|Example|ts=08:52, 21 May 2011 (UTC)}}</div> * {{tlx|Talk quote block|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.|Example User|ts{{=}}08:52, 21 May 2011 (UTC)|id{{=}}c-Example_User-20240604182100-Example}} gives: <div style="background-color: var(--background-color-neutral-subtle, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:10px 10px">{{talk quote block|Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.|Example User|ts=08:52, 21 May 2011 (UTC)|id=c-Example_User-20240604182100-Example}}</div> * {{tlx|Talk quote block|different random text|Example|ts{{=}}08:52, 21 May 2011 (UTC)|oldid{{=}}139992}} gives: <div style="background-color: var(--background-color-neutral-subtle, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:10px 10px">{{talk quote block|different random text|Example|ts=08:52, 21 May 2011 (UTC)|oldid=139992}}</div> Note: {{para|ts}} must be present for {{para|oldid}} link to show. === Suggested boilerplate === <syntaxhighlight lang="wikitext"> {{Talk quote block|1=<nowiki/> |source=}} </syntaxhighlight> <syntaxhighlight lang="wikitext"> {{Talk quote block|1=<nowiki/> |by=|ts=|id=}} </syntaxhighlight> <syntaxhighlight lang="wikitext"> {{Talk quote block|1=<nowiki/> |by=|ts=|oldid=}} </syntaxhighlight> === Indenting === The template works with standard talk page indentation, as the following example illustrates. This wiki-markup: <syntaxhighlight lang="wikitext"> Random paragraph of text. [[User:Example|Example]] ([[User talk:Example|talk]]) 09:20, 21 May 2011 (UTC) :Opening statement by [[User:Example2|Some other user]]. :{{talk quote block|Quoting an item from random paragraph.}} :Response to quoted text. [[User:Example2|Some other user]] ([[User talk:Example2|talk]]) ~~~~~ </syntaxhighlight> Displays the following: <div style="background-color: var(--background-color-neutral-subtle, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:3px 10px 3px 10px"> Random paragraph of text. [[User:Example|Example]] ([[User talk:Example|talk]]) 09:20, 21 May 2011 (UTC) :Opening statement by [[User:Example2|Some other user]]. :{{talk quote block|Quoting an item from random paragraph.}} :Response to quoted text. [[User:Example2|Some other user]] ([[User talk:Example2|talk]]) 09:26, 21 May 2011 (UTC) </div> ==== Indented multi-line quote ==== To create an indented multi-line quote (such as within a a reply on a talk page), you ''must'' use <nowiki><br/></nowiki> tags to indicate the line breaks, but do ''not'' use manual line breaks. Refer to the following example: <syntaxhighlight lang="wikitext"> Random paragraph of text. [[User:Example|Example]] ([[User talk:Example|talk]]) 09:20, 21 May 2011 (UTC) :Opening statement by [[User:Example2|Some other user]]. :{{talk quote block|Quoting an item from random paragraph.<br/>Including a second line.}} :Response to quoted text. [[User:Example2|Some other user]] ([[User talk:Example2|talk]]) ~~~~~ </syntaxhighlight> Displays the following: <div style="background-color: var(--background-color-neutral-subtle, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:3px 10px 3px 10px"> Random paragraph of text. [[User:Example|Example]] ([[User talk:Example|talk]]) 09:20, 21 May 2011 (UTC) :Opening statement by [[User:Example2|Some other user]]. :{{talk quote block|Quoting an item from random paragraph.<br/>Including a second line.}} :Response to quoted text. [[User:Example2|Some other user]] ([[User talk:Example2|talk]]) 09:26, 21 May 2011 (UTC) </div> === Quoting lists === If the text you are quoting is a bulleted or numbered list, the first list item must start on a new line, or it won't be rendered properly. For example: {| class="wikitable" ! Wiki-markup !! Output |- | '''Wrong way''' <syntaxhighlight lang="wikitext"> {{talk quote block|* Item one * Item two }} </syntaxhighlight> | First item isn't bulleted correctly: <div style="background-color: var(--background-color-base, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:3px 10px 3px 10px"> {{talk quote block|* Item one * Item two }} </div> |- | '''Right way''' <syntaxhighlight lang="wikitext"> {{talk quote block| * Item one * Item two }} </syntaxhighlight> | All items are bulleted correctly: <div style="background-color: var(--background-color-base, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:3px 10px 3px 10px"> {{talk quote block| * Item one * Item two }} </div> |} If you are using the {{para|text}} named parameter (as opposed to simply supplying your list as the first parameter) please add the following code: <code><nowiki /></code> after the <code>=</code> sign. The reason is that the MediaWiki parser automatically removes line breaks at the start of the text, causing the list to be displayed improperly otherwise. Example: {| class="wikitable" ! Wiki-markup !! Output |- | '''Wrong way''' <syntaxhighlight lang="wikitext"> {{talk quote block|text= # Item one # Item two }} </syntaxhighlight> | First item isn't numbered correctly: <div style="background-color: var(--background-color-base, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:3px 10px 3px 10px"> {{talk quote block|text= # Item one # Item two }} </div> |- | '''Right way''' <syntaxhighlight lang="wikitext"> {{talk quote block|text=<nowiki /> # Item one # Item two }} </syntaxhighlight> | All items are numbered correctly: <div style="background-color: var(--background-color-base, #f8f9fa); color: inherit; border:1px dashed #3170ab; padding:3px 10px 3px 10px"> {{talk quote block|text=<nowiki /> # Item one # Item two }} </div> |} === Caveats === ==== Complex formatting compatibility ==== Check {{section link||Quoting}}, and {{section link|Help:Table|Nested tables}} (for nesting demo). ==== Quoted URLs with query strings break the template ==== <syntaxhighlight lang="wikitext"> {{Talk quote block|This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977}} </syntaxhighlight> 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 {{em|explicit}}, so that your entire argument is unambiguously parsed as the value being assigned to that parameter. <syntaxhighlight lang="wikitext"> {{Talk quote block|1=This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977}} </syntaxhighlight> {{Talk quote block|1=This here diff: https://en.wikipedia.org/w/index.php?title=User:IamNotU/sandbox&diff=904787385&oldid=904785977}} Writing the transclusion as {{tlx|Talk quote block|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="wikitext" inline>This here diff: https://en.wikipedia.org/w/index.php?title</syntaxhighlight> that's being assigned the value <syntaxhighlight lang="wikitext" inline>User:IamNotU/sandbox&diff=904787385&oldid=904785977</syntaxhighlight>. 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 [[Special:PermaLink/961705865#Common_mistakes|Help:List §§ Common mistakes]], and [[Special:PermaLink/961705865#Paragraphs_and_other_breaks|Paragraphs and other breaks]]). ==== Play nice with ordered and unordered lists ==== <syntaxhighlight lang="wikitext"> {{Lorem ipsum}} : {{Talk quote block|source=Talk quote block|text=<nowiki/> # Item one # Item two }} </syntaxhighlight> {{Lorem ipsum}} : {{Talk quote block|source=Talk quote block|text=<nowiki/> # Item one # Item two }} <syntaxhighlight lang="wikitext"> <dl><dd>{{Talk quote block|1=<nowiki/> # Item one # Item two|source={{tlx|Talk quote block}}}}</dd></dl> </syntaxhighlight> <dl><dd>{{Talk quote block|1=<nowiki/> # Item one # Item two|source={{tlx|Talk quote block}}}}</dd></dl> == TemplateData == {{templatedata header}} <templatedata> { "params": { "style": { "description": "HTML in-line style." }, "text": { "aliases": [ "1" ], "description": "The text being quoted.", "type": "content", "required": true }, "by": { "aliases": [ "2" ], "description": "The author of the text being quoted.", "type": "wiki-user-name", "suggested": true }, "source": { "description": "The source of the text being quoted. Use instead of by when source is not individual user name, or when copy-pasting an entire sig.", "type": "line" }, "nodash": { "aliases": [ "no-dash" ], "label": "No dash?", "description": "Suppresses the em dash and space before source, for when pasting a sig that already starts with a dash.", "type": "boolean" }, "ts": { "label": "Timestamp", "description": "The timestamp of the edit whose text is being quoted.", "suggestedvalues": [ "~~~~~" ], "suggested": true }, "id": { "label": "ID", "description": "The ID of the comment that will be used in a link to it if the ts parameter is also present. You can copy it by right-clicking the timestamp.", "type": "string" }, "oldid": { "label": "Revision ID", "description": "The 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)", "type": "number" }, "diff": { "description": "The link to the diff comparing target.", "type": "number" }, "noping": { "aliases": [ "no-ping" ], "label": "No ping?", "description": "Suppresses the link to the author to avoid notifying them.", "type": "boolean" } }, "description": "Formats quoted text (from another's comments, a policy statement, etc.) in a block, for use on talk pages and noticeboards.", "paramOrder": [ "text", "by", "source", "nodash", "ts", "id", "oldid", "diff", "style", "noping" ] } </templatedata> == See also == {{Quotation templates}} {{Inline talk templates}} <includeonly>{{Sandbox other|| <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Talk namespace quotation templates]] }}</includeonly>
Summary:
Please note that all contributions to Ikwipedia are considered to be released under the Creative Commons Attribution-ShareAlike (see
Ikwipedia:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width