<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ABlock_diagram%2Fdoc</id>
	<title>Module:Block diagram/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ABlock_diagram%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Block_diagram/doc&amp;action=history"/>
	<updated>2026-05-24T22:39:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Block_diagram/doc&amp;diff=135386&amp;oldid=prev</id>
		<title>imported&gt;Wnt: Adding the 1= part.  In theory there&#039;s a way around this (reconstruct from the unknown long tag) but not going to pioneer that now.</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Block_diagram/doc&amp;diff=135386&amp;oldid=prev"/>
		<updated>2013-05-09T06:56:59Z</updated>

		<summary type="html">&lt;p&gt;Adding the 1= part.  In theory there&amp;#039;s a way around this (reconstruct from the unknown long tag) but not going to pioneer that now.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This function takes a long string of text and tags in angle brackets to output a set of HTML &amp;lt;nowiki&amp;gt;&amp;lt;div&amp;gt;&amp;lt;/nowiki&amp;gt; elements.  This allows you to block out a diagram with arbitrarily placed rectangular elements.  The main point of the module is that it allows some attributes to be applied in a &amp;quot;sticky&amp;quot; manner, so that once you set the color or position of a div, the divs coming after it will have the same values unless you change them.  Though the text may still be pretty lengthy, it is much shorter than a full specification of all the divs.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
* &amp;#039;&amp;#039;width&amp;#039;&amp;#039; and &amp;#039;&amp;#039;height&amp;#039;&amp;#039; are the width and height of the total block diagram output.&lt;br /&gt;
* &amp;#039;&amp;#039;nowiki&amp;#039;&amp;#039; returns the output as nowiki source text for debugging or copying.&lt;br /&gt;
* &amp;#039;&amp;#039;debug&amp;#039;&amp;#039; may return some debuglog data (very little use except when making changes to the module)&lt;br /&gt;
* The first unlabelled parameter contains a large amount of text and tags to be interpreted as described below.&lt;br /&gt;
:* &amp;#039;&amp;#039;&amp;#039;Warning: if your text contains or may in the future contain an &amp;#039;&amp;#039;=&amp;#039;&amp;#039; character, you must begin this text with &amp;#039;&amp;#039;1=&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Tags ==&lt;br /&gt;
* The module takes several html attribute names and sets them to the value given.  The colon and semicolon you&amp;#039;d use in the style must &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; be given.&lt;br /&gt;
&lt;br /&gt;
* The tags currently supported are &amp;#039;&amp;#039;left&amp;#039;&amp;#039;, &amp;#039;&amp;#039;right&amp;#039;&amp;#039;, &amp;#039;&amp;#039;top&amp;#039;&amp;#039;, &amp;#039;&amp;#039;bottom&amp;#039;&amp;#039;, &amp;#039;&amp;#039;border-style&amp;#039;&amp;#039;, &amp;#039;&amp;#039;border-width&amp;#039;&amp;#039;, &amp;#039;&amp;#039;border-color&amp;#039;&amp;#039;, &amp;#039;&amp;#039;color&amp;#039;&amp;#039;, &amp;#039;&amp;#039;background-color&amp;#039;&amp;#039;, &amp;#039;&amp;#039;text-align&amp;#039;&amp;#039;, &amp;#039;&amp;#039;vertical-align&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;vcentertext&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* Some values are altered by the module:&lt;br /&gt;
** A &amp;quot;%&amp;quot; is automatically added to the position attributes.  Px values are not supported.  This is intentional --- the intent is that the initial &amp;#039;&amp;#039;width&amp;#039;&amp;#039; and &amp;#039;&amp;#039;height&amp;#039;&amp;#039; parameters can be changed without having to rewrite the contents.&lt;br /&gt;
** The &amp;#039;&amp;#039;right&amp;#039;&amp;#039; and &amp;#039;&amp;#039;bottom&amp;#039;&amp;#039; values are given as percents from the left or top, &amp;#039;&amp;#039;not&amp;#039;&amp;#039; from the right or bottom as in the HTML.  This means that boxes from top 60 to bottom 80 and top 80 to bottom 100 will adjoin each other.&lt;br /&gt;
&lt;br /&gt;
* Vertical centering is special, and relies on [[:Template:vertical center]] to position the text within the boxes with two additional divs &amp;#039;&amp;#039;inside&amp;#039;&amp;#039; the boxes.  That template accepts a third parameter that applies to the outer div of that template, which can be fine-tunes with &amp;#039;&amp;#039;vcentertext&amp;#039;&amp;#039;.  To be clear, this is a dirty way of solving the last few pixels of misalignment encountered with small text in small boxes.&lt;br /&gt;
&lt;br /&gt;
* Don&amp;#039;t forget that you can include &amp;lt;nowiki&amp;gt;&amp;lt;span&amp;gt; and &amp;lt;div&amp;gt; elements&amp;lt;/nowiki&amp;gt;, or even images, in your text.  This allows you to cover any eventualities not yet implemented as tags here.  Only the special tags listed above are interpreted by the module; normal Wiki tags will be ignored by it, so they should be interpreted properly.  [frame:preprocess() is used on the module output]&lt;br /&gt;
&lt;br /&gt;
* Currently no effort is made to try to figure out how to size the text to fit in the boxes - you have to make sure the diagram is big enough or the text small enough on your own.&lt;br /&gt;
&lt;br /&gt;
* You may find it convenient to wrap up the output from this module in [[:Template:Pseudo image]], which can make it look like a thumbnail preview, complete with link to a file or page with more detail about its contents.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
{{#invoke:Block diagram|main|width=600|height=245|1=&amp;lt;border-color grey&amp;gt;&amp;lt;border-width 0px 0px 0px 1px&amp;gt;&amp;lt;left 30&amp;gt;&amp;lt;right 30&amp;gt;&amp;amp;nbsp;&amp;lt;left 70&amp;gt;&amp;lt;right 70&amp;gt;&amp;amp;nbsp;&amp;lt;border-width 0px&amp;gt;&amp;lt;top 0&amp;gt;&amp;lt;bottom 12&amp;gt;&amp;lt;left 0&amp;gt;&amp;lt;right 100&amp;gt;&amp;lt;background-color #ffbcd8&amp;gt;Practice of Induced Abortion Methods&amp;lt;background-color #bdc9df&amp;gt;&amp;lt;top 19&amp;gt;&amp;lt;bottom 29&amp;gt;&amp;lt;left 7.5&amp;gt;&amp;lt;right 20&amp;gt;[[Manual vacuum aspiration|MVA]]&amp;lt;left 40&amp;gt;&amp;lt;right 65&amp;gt;[[Dilation and evacuation|Dilation and Evacuation]]&amp;lt;top 38&amp;gt;&amp;lt;bottom 47&amp;gt;&amp;lt;left 15&amp;gt;&amp;lt;right 30&amp;gt;[[Electric vacuum aspiration|EVA]]&amp;lt;left 50&amp;gt;&amp;lt;right 75&amp;gt;[[Hysterotomy]]&amp;lt;left 15&amp;gt;&amp;lt;right 37.5&amp;gt;&amp;lt;top 56&amp;gt;&amp;lt;bottom 66&amp;gt;[[Dilation and curettage|Dilation and Curettage]]&amp;lt;left 50&amp;gt;&amp;lt;right 75&amp;gt;[[Intact dilation and extraction|Intact D&amp;amp;X]]&amp;lt;left 7.5&amp;gt;&amp;lt;right 22.5&amp;gt;&amp;lt;top 74&amp;gt;&amp;lt;bottom 84&amp;gt;[[Mifepristone]]&amp;lt;left 40&amp;gt;&amp;lt;right 75&amp;gt;[[Induced miscarriage|Induced Miscarriage]]&amp;lt;left 0&amp;gt;&amp;lt;right 30&amp;gt;&amp;lt;background-color #b7e690&amp;gt;&amp;lt;top 90&amp;gt;&amp;lt;bottom 100&amp;gt;[[first trimester|1st Trimester]]: 0-12 weeks&amp;lt;left 30&amp;gt;&amp;lt;right 70&amp;gt;&amp;lt;background-color #dfe988&amp;gt;[[second trimester|2nd Trimester]]: 12-28 weeks&amp;lt;left 70&amp;gt;&amp;lt;right 100&amp;gt;&amp;lt;background-color #e9c788&amp;gt;[[third trimester|3rd Trimester]]: 28-40 weeks}}&lt;br /&gt;
&lt;br /&gt;
is produced by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{#invoke:Block diagram|main|width=600|height=245|1=&amp;lt;border-color grey&amp;gt;&amp;lt;border-width 0px 0px 0px 1px&amp;gt;&amp;lt;left 30&amp;gt;&amp;lt;right 30&amp;gt;&amp;amp;nbsp;&amp;lt;left 70&amp;gt;&amp;lt;right 70&amp;gt;&amp;amp;nbsp;&amp;lt;border-width 0px&amp;gt;&amp;lt;top 0&amp;gt;&amp;lt;bottom 12&amp;gt;&amp;lt;left 0&amp;gt;&amp;lt;right 100&amp;gt;&amp;lt;background-color #ffbcd8&amp;gt;Practice of Induced Abortion Methods&amp;lt;background-color #bdc9df&amp;gt;&amp;lt;top 19&amp;gt;&amp;lt;bottom 29&amp;gt;&amp;lt;left 7.5&amp;gt;&amp;lt;right 20&amp;gt;[[Manual vacuum aspiration|MVA]]&amp;lt;left 40&amp;gt;&amp;lt;right 65&amp;gt;[[Dilation and evacuation|Dilation and Evacuation]]&amp;lt;top 38&amp;gt;&amp;lt;bottom 47&amp;gt;&amp;lt;left 15&amp;gt;&amp;lt;right 30&amp;gt;[[Electric vacuum aspiration|EVA]]&amp;lt;left 50&amp;gt;&amp;lt;right 75&amp;gt;[[Hysterotomy]]&amp;lt;left 15&amp;gt;&amp;lt;right 37.5&amp;gt;&amp;lt;top 56&amp;gt;&amp;lt;bottom 66&amp;gt;[[Dilation and curettage|Dilation and Curettage]]&amp;lt;left 50&amp;gt;&amp;lt;right 75&amp;gt;[[Intact dilation and extraction|Intact D&amp;amp;X]]&amp;lt;left 7.5&amp;gt;&amp;lt;right 22.5&amp;gt;&amp;lt;top 74&amp;gt;&amp;lt;bottom 84&amp;gt;[[Mifepristone]]&amp;lt;left 40&amp;gt;&amp;lt;right 75&amp;gt;[[Induced miscarriage|Induced Miscarriage]]&amp;lt;left 0&amp;gt;&amp;lt;right 30&amp;gt;&amp;lt;background-color #b7e690&amp;gt;&amp;lt;top 90&amp;gt;&amp;lt;bottom 100&amp;gt;[[first trimester|1st Trimester]]: 0-12 weeks&amp;lt;left 30&amp;gt;&amp;lt;right 70&amp;gt;&amp;lt;background-color #dfe988&amp;gt;[[second trimester|2nd Trimester]]: 12-28 weeks&amp;lt;left 70&amp;gt;&amp;lt;right 100&amp;gt;&amp;lt;background-color #e9c788&amp;gt;[[third trimester|3rd Trimester]]: 28-40 weeks}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example:&lt;br /&gt;
&lt;br /&gt;
* Border-width 0 0 0 1px is applied to two divs at 30 and 70 which inherit the default 0 and 100 top and bottom values.  These include a &amp;amp;nbsp; each because if there is no text at all nothing is drawn (so you can specify multiple tags without drawing a div every time).&lt;br /&gt;
&lt;br /&gt;
* The next two divs are completely specified on top, bottom, left, right.  The background-color sets the shade of each box.  Wikilinks are brought in with the text itself.&lt;br /&gt;
&lt;br /&gt;
* Each row uses a &amp;lt;nowiki&amp;gt;&amp;lt;top&amp;gt; and &amp;lt;bottom&amp;gt;&amp;lt;/nowiki&amp;gt; that carries on to several divs in the row until they are reset.&lt;/div&gt;</summary>
		<author><name>imported&gt;Wnt</name></author>
	</entry>
</feed>