Jump to content

Template talk:Quote box/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 2Archive 3

Discussion

Hi, this template seems to be clashing with text in some browsers/preferences. See Talk:English Channel#Box conflicting with text. Cheers, JackyR | Talk 23:23, 23 August 2006 (UTC)

Attempting to center

I took your example and changed only the alignment:

{{Quote_box|
 width=45%
|align=center
|quote=Cry "Havoc," and let slip the dogs of war.
|source=[[William Shakespeare]], ''[[Julius Caesar (play)|Julius Caesar]]'', Act III, Scene I.
|}}

produces this:

Cry "Havoc," and let slip the dogs of war.

William Shakespeare, Julius Caesar, Act III, Scene I.

Why isn't it centered on the page? In deference to Shakespeare, I tried "centre", but that didn't work, either. JamesMLane t c 21:01, 27 September 2006 (UTC)

Your example is centered on my page. (WP default skin, IE) —Kevin 21:07, 27 September 2006 (UTC)
But not on mine (WP default skin, Safari on Mac) JackyR | Talk 23:07, 27 September 2006 (UTC)
Weird. Someone who knows how these computer-thingys work will have to figure it out. This rules me out. —Kevin 23:24, 27 September 2006 (UTC)
More data for the nerds' use: I'm using Win XP. I usually edit with Firefox and the Classic skin for WP. In Firefox 1.5.0.7, the box was left-aligned in both the Classic skin and the default (MonoBook) skin. In MSIE, the box was centered in both those skins. JamesMLane t c 06:14, 28 September 2006 (UTC)
I fixed this, hopefully without causing any harm. Nikola 11:15, 17 November 2006 (UTC)

Used for vandalism

A shock image was added to this template to vandalize an article linked to from the main page.[1] I will accordingly protect this template as high risk, given the recent spate of such similar vandalism. Postdlf 17:09, 27 December 2006 (UTC)

Background color

can the template be modified to allow for a background color. If no color is specified, then the current default color of grey will be used--Ccson 15:29, 30 December 2006 (UTC)

Dash and italics

I think the dash is ugly, and italics are hard to read. They are both unnecessary and should be removed — if people want them, they can still put them in boxes manually with the text. Grant | Talk 05:31, 21 June 2007 (UTC)

I agree as far as italics go since such a "stylistic device" can be added should someone want it. Cliff smith 00:52, 11 July 2007 (UTC)
Exactly, and since there seem to be no objections, I'm going to change it. Grant | Talk 08:29, 11 July 2007 (UTC)
My guess is that most people who have used this template don't keep it on their watchlist, so they won't notice that you've changed the style until they revisit an article where it was used. (Even I, who created it, didn't watch it because it was protected and I figured no one would try to "fix" what wasn't broken.) Personally, I think your changes were for the worse. Italics are a traditional device for epigraph-style quotations; they give a visual cue that the text in question is a quote. Presumably, the many folks who used the template did not have difficulty reading italics—perhaps reading glasses are in order. ;-) The dash, likewise, is a traditional visual cue indicating the source of the quote. You've removed both visual cues, which means that the text left in the box is perhaps a bit ambiguous in some cases. Probably it's unambiguous in most cases, but there's really no reason to change it. Sure, people can re-add the elements you've removed in the dozens of places where it has been used, but what a hassle. The added acre of whitespace is also a problem. I suggest reverting all of your changes, and would if I could. —Kevin Myers 17:12, 20 July 2007 (UTC)
I did not think that the dash should be removed, just for the record. Cliff smith 00:47, 29 July 2007 (UTC)

Kevin I have reverted the dash and the italics in "source", for the reasons stated above. Yes, italics are a convention in lengthy quotes, but not in sources, unless the source is the title of long book (e.g. The Bible) The gap between "quote" and "source" and the italics in the quote are a sufficient visual cue without the dash. Grant | Talk 05:36, 1 August 2007 (UTC)

You're confused: the "source" was never italicized. Cliff & I think the dash should stay, but since you can use your administrator tools to modify the template at your whim, you win the debate, even in your confusion. —Kevin Myers 05:54, 1 August 2007 (UTC)
OK, Kevin fair point about "source". But I waited nearly three weeks after my initial comment before changing the box; it's not my problem if you didn't have it on your watchlist. By the way, the reason why I became interested in this was that, when I first used the box — through some quirk of coding and Murphy's law being operant — italics were appearing in the first par of a "quote" and not the second. Attempts at workarounds only complicated matters, but I eventually worked it out by coding the text. That has been my point all along — we can add whatever font (e.g. italics) or punctuation (e.g. dashes) they want, by coding in the text they put in the box. And it helps us to avoid Murphy's law. Grant | Talk 06:34, 1 August 2007 (UTC)

I, too, think the italics should go. They make for ugly layout problems in multiparagraph quotes, e.g. the boxes in Title 2 of the Swiss Federal Constitution. Apparently the italics have reappeared for some reason after Grant took them out; I'll cut them back out. Sandstein 19:22, 12 August 2007 (UTC)

Extra carriage return

{{editprotected}} The template seems to have an extra carriage return when it's right- or left-aligned, though it's fine if it's centered, as seen by the two examples in previous sections. Unfortunately, I'm not quite sure where the problem is to point it out and request a specific edit to fix it. Can someone else find it, or an admin experiment a bit, perhaps, and see what works? Alternately, any chance of the page being un- or semi-protected, since it's been fully protected since December and never got more than two vandal edits in the first place? Then I can do the experimenting myself, and revert if I screw it up. -Bbik 15:23, 20 July 2007 (UTC)

Perhaps the page should be semi-protected at best. It's a bit of a pisser that I cannot edit a template I created, not even to fix the "improvements" which created this problem. —Kevin Myers 17:17, 20 July 2007 (UTC)
It's standard practice to protect templates like this. Experimenting with the template where it is is not ideal. It would be better to copy the source to a sandbox and edit it there. My guess is that the extra newlines are from the newlines in the template source code near the top. The template has some other issues, like using the invalid css "margin-center" if align is set to center. I can do it, if needed, but perhaps someone else would rather play with it. — Carl (CBM · talk) 00:46, 21 July 2007 (UTC)
Er. There have already been two of us who have offered to "play with it", one of whom who even knows what to do without testing. Except that the template is protected, so neither of us can do anything, for better or for worse, since neither of us are admins. Which means either either an admin (you at this point, since you've seen it) needs to do it, or the template needs to be unprotected so "someone else" can do it.
And for what it's worth, by "experimenting" I meant try a few things and hit preview a bunch of times to make sure the template still looks like it should, then save and make sure it didn't screw it up elsewhere, and revert immediately if it did (which so far has happened to me... once, I think? And even then, it was a very minor issue and I quickly fixed it). I really can't see what's wrong with that, thirty seconds with a possibly slightly broken template won't kill anyone. Now, making a minor change, saving, and realizing it broke something, then making another minor change to "fix" it, saving, and still having it broken, and so on over and over, I can see how that would be annoying. But that's not what I was talking about at all. Preview is your friend, and I like taking full advantage of that. -Bbik 01:18, 21 July 2007 (UTC)
I don't see how you can test different values of the parameters just by previewing. Make the changes in a sandbox and give me a link and I'll copy the sandbox here - that's how a lot of edits to protected templates are accomplished. As I said, the template has other errors like "margin-center" that need to be fixed at the same time. It would also be possible to use CSS align=center instead of the center tag. — Carl (CBM · talk) 01:35, 21 July 2007 (UTC)

{{editprotected}} Let's try this again. Moving {|width=... to the previous line, rather than a new line, removes the extra space, which is obviously a problem, and has a quick and easy solution. Perhaps other things should also be fixed, but I don't see why the one that currently has a solution shouldn't be fixed now just because the rest don't -- especially when one problem is a behind-the-scenes code issue, rather than an issue that clearly affects the visual aspect of the page the template is used on, unless workarounds are used every time, which should not be necessary. I also don't understand why one edit was done after this one was vetoed, when the same issue that hindered this one before wasn't fixed in that one, either, but that's another topic entirely. -Bbik 05:22, 17 August 2007 (UTC)

Done. I cleaned up the code; everything should be working much better now. Cheers. --MZMcBride 20:21, 17 August 2007 (UTC)

Align?

This template is calling {{align}} on the top line of the table structure. As this template doesn't exist, should the code actually be {{{align}}}? SeveroTC 23:29, 28 July 2007 (UTC) {{editprotected}}

In other words:

{|width="{{{width}}}" align="{{{align|right}}}" cellspacing="4" cellpadding="4" style="border: 2px solid #aaa; font-size: 90%; padding: 4px; margin: 0 1em; margin-{{align}}:0; background-color: #f9f9f9;clear:{{{align}}};"

should be changed to

{|width="{{{width}}}" align="{{{align|right}}}" cellspacing="4" cellpadding="4" style="border: 2px solid #aaa; font-size: 90%; padding: 4px; margin: 0 1em; margin-{{{align}}}:0; background-color: #f9f9f9;clear:{{{align}}};"

SeveroTC 11:50, 30 July 2007 (UTC)

I wondered about that align thingy; appears to be an old error I made. Taking into account the recent changes which don't seem to have much support, the complete correct code should probably be:

{{#ifeq:{{{align}}}|center|<center>}} {|width="{{{width}}}" align="{{{align|right}}}" cellspacing="4" cellpadding="4" style="border: 2px solid #aaa; font-size: 90%; padding: 4px; margin: 0 1em; margin-{{{align}}}:0; background-color: #f9f9f9;clear:{{{align}}};" |- |align="center"|''{{{quote}}}''<br>—{{{source}}} |}{{#ifeq:{{{align}}}|center|</center>}}<!-- Inserted from [[Template:Quote box]] --><noinclude> <br clear="both"/>

Kevin Myers 12:43, 30 July 2007 (UTC)
Done. Cheers. --MZMcBride 22:27, 31 July 2007 (UTC)
The extra line at before the template is still there, however. Moving {|width=... to the same line as the first align bit seems to fix it, but would that break something that I'm not seeing? (It doesn't seem like the |- is needed, either, but that doesn't seem to affect the beginning space, so whatever.) -Bbik 22:47, 31 July 2007 (UTC)

New and improved

I was working on a specialized template, but realized that it would be better if we had one versatile template. You can view the template at User:Gadget850/T1 and play with testcases at User:Gadget850/T1/testcases. The current Quote box does not align with infoboxes, so I removed the padding— this is the only thing that will not be backward compatible added an adjustable margin that defaults to the current setting of 1em. The new box allows setting a background color and has an optional title with background color. The source field no longer shows an error if it is not entered and the alignment of the quote text can now be controlled. So, look and play. --Gadget850 ( Ed) 21:06, 24 September 2007 (UTC)

Any comments? --Gadget850 ( Ed) 18:34, 27 September 2007 (UTC)

With no discussion on folding any enhancements into this template, I have created {{Quote box2}}. --Gadget850 ( Ed) 13:39, 3 October 2007 (UTC)

WP:DOC

{{Editprotected}}

So that the documentation can be edited per WP:DOC, please replace the whole noinclude bottom section:

{{pp-template|small=yes}}<div style="clear:both;"></div>
== Related templates ==
* [[Template:Cquote]]
* [[Template:Quotation]]
* [[Template:Quote box]]
* [[Template:Rquote]]
[[Category:Quotation templates|{{PAGENAME}}]]
</noinclude>

with:

{{pp-template|small=yes}}
{{Documentation}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS TO THE /doc SUBPAGE, THANKS -->
</noinclude>

(I have already initialized a complete Template:Quote box/doc.) Thanks. — Komusou talk @ 11:17, 12 November 2007 (UTC)

checkY Done --ais523 14:32, 12 November 2007 (UTC)

Quote box catching on infoboxes

{{editprotected}} There seems to be a problem when a quote box is placed alongside one of the infobox templates, particularly when width (and alignment) are left as default. With defaults, the quote box drops to below the infobox while the rest of the page continues where it was and jumps when it gets to the quote box (sometimes causing the text to leak into the quote box). See example for this, although you'll need a high resolution for it to work, I'm currently on 1680x1050. If you specify alignment, the quote box appears in the correct place, but overlaps the infobox unless a width is specified which gives it sufficient clearance. The width is also relative to the page, not the available room, which makes using the template frustrating. Could this be fixed? (At least to remove the catching and overlap). Ryu Ike (talk) 00:44, 23 May 2008 (UTC) (Firefox 2.0.0.14, WinXP)

 Not done I can see the problem, but not how to fix it (I'm rubbish at browser-layout issues and HTML/CSS/whatever). Can you provide a specific description of what code needs to be changed? Happymelon 11:49, 25 May 2008 (UTC)

Alignment and margins

{{editprotected}}

It appears there may be a problem with the existing code for setting margins based on alignment:

{|width="{{{width}}}" align="{{{align|right}}}" cellspacing="4" cellpadding="4" style="border: 2px solid #aaa; font-size: 90%; padding: 4px; margin:0 {{#ifeq:{{{align}}}|center|auto}} 1em; margin-{{{align}}}:0; background-color: #f9f9f9;clear:{{{align}}};"

From the code above, it looks as if the intent is to set the left margin to 0 for left-aligned quoteboxes, and the right margin to 0 for right-aligned quoteboxes. However, when I look at the right-aligned boxes in Abyssinia, Henry they appear to have a right margin of 1em causing them not to be flush against the right margin. I would suggest:

{| cellspacing="4" cellpadding="4" style="width:{{{width}}}; float:{{{align|right}}}; border: 2px solid #aaa; font-size:90%; padding:4px; margin: {{ #switch: {{{align}}} | left = 1em 1em 1em 0em | center = auto | 1em 0em 1em 1em }}; background-color: #f9f9f9;clear:{{{align}}};" |- |align="center"|{{{quote}}}<br>{{{source}}} |}<!-- Inserted from [[Template:Quote box]] -->

Here are some examples of how it would work:

sed do eiusmod tempor incididunt
Unknown


Lorem ipsum dolor sit amet
Unknown


Consectetur adipisicing elit
Unknown


Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Can this change be incorporated into the live template? No changes to the template call syntax is necessary. --SSBohio 17:30, 11 June 2008 (UTC)

 Done - let me know if it causes any unforeseen problems —  Tivedshambo  (t/c) 18:39, 11 June 2008 (UTC)

{{editprotected}}

…if we turned on the [television] set we would see fifteen people [killed in Vietnam every night]. They don't complain about that because it is unfelt violence, it is unfelt trauma. And that's not good. I think that if there is such a thing as the loss of life there should be some connection. And we did make a connection. It was a surprise, it was somebody they loved. They didn't expect it but it made the point. People like Henry Blake are lost in war.

Gene Reynolds, Producer[1]

The template appears to have broken due to the removal of line breaks. It should appear like this:
{| cellspacing="4" cellpadding="4" style="width:{{{width}}}; float:{{{align|right}}}; border: 2px solid #aaa; font-size:90%; padding:4px; margin: {{ #switch: {{{align}}} | left = 1em 1em 1em 0em | center = auto | 1em 0em 1em 1em }}; background-color: #f9f9f9;clear:{{{align}}};" |- |align="center"|{{{quote}}}<br>{{{source}}} |}<!-- Inserted from [[Template:Quote box]] -->
The carriage returns before and after the |-, and the one after |align="center"|{{{quote}}}
{{{source}}}
are particularly important. This is because these are part of table syntax. Everything within the <nowiki></nowiki> tags should be copied verbatim from the edit window for correct line breaks, or copied from Template talk:Quote box/Sandbox. --SSBohio 19:20, 11 June 2008 (UTC)
 Done - my fault. Should have copied the source rather than cut-and pasting. —  Tivedshambo  (t/c) 19:34, 11 June 2008 (UTC)
Not a problem. I even looked at the source after you changed it and didn't pick up on the problem. It wasn't until I went to one of the articles using this template and noticed that all the quotes had disappeared. Oops. Thanks for your help. --SSBohio 19:38, 11 June 2008 (UTC)

Almost good

The top of the box lines up at the bottom of a line of text. The top margin should be reduced or set to zero, so that the box top aligns with the text top, or with the top of the x-height.

And why is this a table? There is no tabular data here. There's no reason not to use a div. Michael Z. 2008-11-16 06:17 z

Distinguishing quote from source

Unlike templates such as {{Epigraph}} or {{bquote}}, this template does very little to differentiate between the text of the quote and the text of the citation. I propose that an {{emdash}} precede the name of the source, and/or that the source be indented a little. Compare this epigraph:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

— Surname, Firstname. Sourcename.

with this quote_box:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Surname, Firstname. Sourcename.

The lines starting "Loren..." and "Surname..." are clearly visually indistinct.

Would anyone object to introducing the {{Epigraph}} form here? the skomorokh 17:52, 17 November 2008 (UTC)

{{editprotected}} Per the above statement and lack of discussion, could an admin insert an mdash (—) before {{{source}}} in the template? the skomorokh 14:23, 26 November 2008 (UTC)

Done. Cheers. --MZMcBride (talk) 20:06, 28 November 2008 (UTC)
Thanks, I appreciate it. the skomorokh 20:33, 28 November 2008 (UTC)

Style and parameter tweaks

{{editprotected}}

I made some tweaks to the template which allow for the parameters to be given without being named, in the same way as with {{quote}}. No change to any existing deplyments - just easier to use in future. Code is in the new sandbox, just needs synced. Chris Cunningham (not at work) - talk 14:02, 7 December 2008 (UTC)

 Done. Cirt (talk) 14:32, 8 December 2008 (UTC)

Missing quote

The quotations are no longer appearing within the box. see Alpha Phi Alpha.--Ccson (talk) 16:41, 12 December 2008 (UTC)

There was an extra pipe in that article. Removing it has fixed the problem. Chris Cunningham (not at work) - talk 12:29, 13 December 2008 (UTC)

Tests

I just fixed The New Colossus's call of this Template:Quote box by removing a trailing pipe character. However, as I do not understand why the extra pipe should have made the quote parameter's value disappear, I'm adding some tests here.

some of these hidden tests have been copied to Template:Quote box/sandbox#Tests, click show to view

1. No parameters at all: {{Quote box}} gives:

Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)

2. source parameter only: {{Quote box|source=source value only}} gives:

Error: No text given for quotation (or equals sign used in the actual argument to an unnamed parameter)

source value only

3. all parameters with range of characters:

{{Quote box
 | quote = quote value 0123456789 !"£$%&/()=?^ é*ç°§;:_ ,.- òàù è+ {} @# ' many characters
 | source = source value 0123456789 !"£$%&/()=?^ é*ç°§;:_ ,.- òàù è+ {} @# ' many characters
 | width = 50%
 | align = left
}}

gives:

quote value 0123456789 !"£$%&/()=?^ é*ç°§;:_ ,.- òàù è+ {} @# ' many characters

source value 0123456789 !"£$%&/()=?^ é*ç°§;:_ ,.- òàù è+ {} @# ' many characters

4. all parameters with simple characters:

{{Quote box
 | quote = quote value 0123456789 simple
 | source = source value 0123456789 simple
 | width = 50%
 | align = left
}}

gives:

quote value 0123456789 simple

source value 0123456789 simple

5. all parameters with trailing pipe:

{{Quote box
 | quote = quote value 0123456789 simple
 | source = source value 0123456789 simple
 | width = 50%
 | align = left
 |}}

gives:

quote value 0123456789 simple

source value 0123456789 simple

Can the template code alert the use in this case?

6. parameters align, quote and lastly source:

{{Quote_box
|align=left
|quote=quote value second
|source=source value third and last
}}

gives:

quote value second

source value third and last

7. parameters align, quote, source and lastly a nondefined parameter:

{{Quote_box
|align=left
|quote=quote value second
|source=source value third and last
|nondefinedparameter=nondefined parameter's value
}}

gives:

quote value second

source value third and last

8. No parameters but trailing pipe: {{Quote box|}} gives:

9. all parameters, with trailing pipe, but source first:

{{Quote box
 | source = source value 0123456789 simple
 | quote = quote value 0123456789 simple
 | width = 50%
 | align = left
 |}}

gives:

quote value 0123456789 simple

source value 0123456789 simple

10. all parameters, with text after trailing pipe:

{{Quote box
 | source = source value 0123456789 simple
 | quote = quote value 0123456789 simple
 | width = 50%
 | align = left
 |text after trailing pipe}}

gives:

quote value 0123456789 simple

source value 0123456789 simple

It seems the trailing pipe overwrites the quote parameter value. So that when there is nothing after the last pipe, the template loses the earlier quote. Can this be improved? 84user (talk) 18:17, 25 January 2009 (UTC)

Reason for overwrite?

The template code that should insert the quote parameter value is (laid out for clarity):

{{{1|{{{quote}}} }}}

{{#if: {{{2|{{{source|}}} }}}
      |<br /><span style="align:right;">—{{{2|{{{source}}} }}}</span>}}

To this non-expert that reads:

if there is an unnamed parameter
then insert its value
else insert the quote parameter value
end if

if the source parameter is non-empty and there is a second unnamed parameter
then
   insert an mdash
   if the unnamed parameter is non-null
   then insert it
   else insert the source value
   end if
end if

Is my interpretation correct, and if so, can it be improved to handle unnamed values? Here are test cases with two unnamed values:

11. all parameters, with two unamed parameter values:

{{Quote box
 | source = source value 0123456789 simple
 | quote = quote value 0123456789 simple
 | width = 50%
 | align = left
 |first unnamed parameter value
 |second unnamed parameter value}}

gives:

quote value 0123456789 simple

second unnamed parameter value, source value 0123456789 simple

12. all parameters, with two unamed parameter values, first one null:

{{Quote box
 | source = source value 0123456789 simple
 | quote = quote value 0123456789 simple
 | width = 50%
 | align = left
 ||second unnamed parameter value}}

gives:

quote value 0123456789 simple

second unnamed parameter value, source value 0123456789 simple

84user (talk) 18:49, 25 January 2009 (UTC)

Possible solution?

Could some template experts check my proposed fix to the above problem in the Template:Quote box/sandbox?

This is my diff. I only attempted to fix the cases where an existing quote value is overwritten by a null pipe or an unnamed value. I did not attempt the same with the source parameter. I found I needed to use "?action=purge" to get the test cases to update.

Please see test cases 5, 10. 11, 12, 13 and 14 in Template:Quote box/sandbox#Tests. If you think it's an improvement, and safe, please update the real Template:Quote box code with the Template:Quote box/sandbox code. 84user (talk) 19:56, 25 January 2009 (UTC)

  1. ^ finest-kind.net | Making M*A*S*H. finest-kind.net. (Accessed September 25, 2006)