Template talk:FixBunching
From Wikipedia, the free encyclopedia
Contents |
[edit] tests
[edit] Test begin
|
After begin re-subst:
|
[edit] Test Middle
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
before dynamic middle
|
||||||
after dynamic middle
|
[edit] Test End
Before dynamic end |
Precise code leading to the above subst'd results is below. (CTRL-A]+[CTRL-C] and [CTRL-V] here: {{#switch:{{{1|}}} |beg|Beg|BEG|begin|Begin|BEGIN=<!-- --><includeonly>{{{!}}style="float:right; margin 0 0 .25 .25; " {{!}}<!--This line confines right floating elements in a table, the newline here is necessary after this comment --> </includeonly><noinclude><br>table initialization</noinclude> |mid|Mid|MID|Middle|MIDDLE=<!-- --><includeonly>{{!}}- {{!}}<!-- this trailing newline needed. --- This line separates elements into the next table cell down --> </includeonly><noinclude><br>table row break</noinclude> |end|End|END=<!-- --><includeonly>{{!}}} <!-- above newline needed This line separates terminates the table cell --></includeonly><noinclude><br>table end element</noinclude> |#default=<font color="red"><big>Parameter not given Error...</big></font><br />''Template {{tl2|fixHTML}} (generator) needs <code> '''{{{1}}} ''defined''''' </code> as one of: {The sets: '''|beg|Beg|BEG''' or '''|mid|Mid|MID''' or '''|end|End|END''' }. }}<noinclude><br><hr><small><center><div style="width:50%; border:1px solid; float:center; clear:both; ">The above error message is generated because this template page has no <code> '''{{{1}}} ''defined''''' </code>, and it uses a parser function switch to combine all formatting needs into this one template.</div></center></small> ;per [[Wikipedia:How to fix bunched-up edit links]] a related problem... :This template is used to make right floating elements behave with others on the right margin. * As it has an auto width, the largest width enclosed element will set a boundary for the others. *Procedure is easy as 1, 2, 3... *# Place {{Tlx|FixHTML|begin}} above the top image, infobox or other right floating HTML element. *# Place {{Tlx|FixHTML|middle}} above the next image, infobox or other right floating HTML element. And the next ... And the next ... And the next ... And the next, as needed. Place {{Tlx|FixHTML|end}} '''BELOW''' the last (Bottom) image, infobox or other right floating HTML element. ;Example using Miltary Info boxes <p re> {{FixHTML|begin}} {{Military conflict infobox | ... (contents) }} {{FixHTML|mid}} {{Military campaign infobox | ... (contents) }} {{FixHTML|mid}} [[Image:Boy give finger to Kaiser.png|...]] {{FixHTML|mid}} [[Image:Kaiser Moons boy.png|...] {{FixHTML|end}} </p re> '''Social communications in War'' spans a vast array of methods ... <g> [[Category:Formatting templates|{{PAGENAME}}]] [[Category:MSIE font fix templates|{{PAGENAME}}]] [[Category:typing-aid templates|{{PAGENAME}}]] </noinclude>
[edit] Next
- Test on a few articles.
- Pack whitespace and comment strip, build /doc page so can subst if desired. // FrankB 19:20, 10 May 2007 (UTC)
[edit] Extra whitespace?
Why does the beg/mid/end trio make more whitespace in the main text flow than what they contain? Example:
line 1 {{FixBunching|beg}} [[Image:Red.jpg|right|2px]] {{FixBunching|mid}} [[Image:Red.jpg|right|2px]] {{FixBunching|end}} line 2 [[Image:Red.jpg|right|2px]] [[Image:Red.jpg|right|2px]] line 3
produces:
line 1
line 2
line 3
Please note the extra space between lines 1 and 2. Why? If you can figure it out, please fix it. MilesAgain (talk) 03:37, 29 December 2007 (UTC)
- Oddly, it doesn't happen when all three templates are subst'ed, as they are here:
line 1
line 2
- Wierd. MilesAgain (talk) 08:44, 29 December 2007 (UTC)
[edit] This template in Classic skin
I've removed this template from several articles in the past (see Kingdom of Mann and the Isles for example) as it seems to cause a problem in Classic skin. It causes the text to spill over onto the links on the left hand side of the page, making it very difficult to read. There seems to be no adverse effect when I removed it. Has anyone else had this problem? Tivedshambo (talk) 23:48, 29 January 2008 (UTC)
[edit] Transparent background?
Is there a way to make the FixBunching background "transparent"?
Right now the template creates an opaque white box, when not all pages have white backgrounds (e.g. Category:Mesopotamian_mythology, portals, etc.).
Sumerophile (talk) 18:32, 28 March 2008 (UTC)
- I just looked at it on Firefox 2.0 and IE 6, and see no problems with your example page. What browser are you using? Looking at the code, I don't immediately see anything that would cause this behaviour, but then again, the code is somewhat unfriendly. — Huntster (t • @ • c) 18:57, 28 March 2008 (UTC)
-
- Perhaps the page colors are too light - here it is on a red background:
- (removed)
- If there is a way to set style="background:transparent" on the template, that would fix the opaque white box. Sumerophile (talk) 19:20, 28 March 2008 (UTC)
[edit] Opera display issue
The one occurance of this template that I've noticed is in Hundred_Days, where it destroys the layout of the introductory text (makes it heavily bunched on the left side) in Opera. It's so severe that it would make sense to turn this feature off althogether for Opera if that's possible. If not, and even better anyway, would be to simply fix this for Opera... it claims to be very standards-compliant (but then doesn't everyone except MS) so maybe it's actually doing the right thing. Something to make this and presumably other articles easier to read would be appreciated, this template has done more harm than good! Thanks Quietbritishjim (talk) 23:33, 3 April 2008 (UTC)
- Fixed. Nothing wrong with this template, just its implementation in the article. Editor forgot to place the {{FixBunching|mid}} between two boxes, and placed the {{alternateuses}} below rather than above the infobox set. See diff.— Huntster (t • @ • c) 00:05, 4 April 2008 (UTC)
-
- Thanks so much, and apologies for my ignorance! Quietbritishjim (talk) 09:04, 4 April 2008 (UTC)
Yeah, this exact same problem was also crippling display of the introductory text in the article Barack Obama when displayed in the Opera browser. Thanks to your explanation of the fix, Huntster, I was able to correct the layout in that page. —Lowellian (reply) 00:03, 19 April 2008 (UTC)
- I think what may be confusing some editors is that the |mid call isn't required for most instances involving images, so perhaps they assume the same goes for use with other templates. Due to this, I would suggest the line:
-
If placed between right floating image elements, the mid call may be omitted safely.
- ...be removed from the /doc page. While less code is good, less ambiguity (especially ambiguity that can break a page) is better. — Huntster (t • @ • c) 00:18, 19 April 2008 (UTC)