DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:block

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:block [2015-10-06 03:24] – fixed date turnermmplugin:block [2023-01-09 08:33] (current) 5.171.103.140
Line 1: Line 1:
 ====== block Plugin ====== ====== block Plugin ======
- 
  
 ---- plugin ---- ---- plugin ----
-description: Create highly configurable boxes for text and image.+description: Create highly configurable boxes for text and image
 author     : Myron Turner author     : Myron Turner
 email      : turnermm02@shaw.ca email      : turnermm02@shaw.ca
 type       : syntax type       : syntax
-lastupdate : 2015-10-05 +lastupdate : 2021-01-23 
-compatible : Lemming, Anteater,Rincewind rc1,Angua,adora belle,binky,"ponder stibbons",hrun,detritus+compatible : Lemming, Anteater, Rincewind, Angua, Adora belle, BinkyPonder stibbons, HrunDetritus, Elenor of tsort, Frusterick Manners, Greebo, Hogfather, Igor
 depends    :  depends    : 
 conflicts  conflicts 
 similar    : wrap, box similar    : wrap, box
-tags       : +tags       : style
  
 downloadurl: https://github.com/turnermm/Block-Plugin-for-Dokuwiki/tarball/master downloadurl: https://github.com/turnermm/Block-Plugin-for-Dokuwiki/tarball/master
 bugtracker : https://github.com/turnermm/Block-Plugin-for-Dokuwiki/issues bugtracker : https://github.com/turnermm/Block-Plugin-for-Dokuwiki/issues
 sourcerepo : https://github.com/turnermm/Block-Plugin-for-Dokuwiki/ sourcerepo : https://github.com/turnermm/Block-Plugin-for-Dokuwiki/
-donationurl: +donationurl: http://mturner.org/userfiles/donate.php 
 ---- ----
  
 ===== Installation ===== ===== Installation =====
  
 +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually.+===== Examples/Usage =====
  
- 
-===== Examples/Usage ===== 
 {{http://www.mturner.org/userfiles/block.png }} {{http://www.mturner.org/userfiles/block.png }}
 This plugin has a toolbar icon which pops up a window with which you design your box, including border styles and colors, text color and box color, the width of the box in percentages, and the position of the box on the page. This plugin has a toolbar icon which pops up a window with which you design your box, including border styles and colors, text color and box color, the width of the box in percentages, and the position of the box on the page.
Line 33: Line 31:
 You can also include images in these boxes; however, image position depends on the Dokuwiki markup. You can also include images in these boxes; however, image position depends on the Dokuwiki markup.
  
- +The basic features of the box can be configured in the Configuration Manager. See below: [[#configuration_options]].
- +
  
 ===== Main Dialog Window of Design Tool ===== ===== Main Dialog Window of Design Tool =====
  
 +Syntax is taken care of by the pop-up design tool.
  
 +{{ http://mturner.org/userfiles/doku/block_zpscju9mjvp.png }}
  
-Syntax is taken care of by the pop-up design tool.+===== Syntax Specification =====
  
-{{ http://img407.imageshack.us/img407/5482/blockdd.png }} 
-===== Syntax Specification ===== 
 <code> <code>
 /** /**
Line 64: Line 60:
        
   Only width and alignment are required. In this case, if alignment is 'c' or 'r', then you must follow it with a colon:  'c:'   Only width and alignment are required. In this case, if alignment is 'c' or 'r', then you must follow it with a colon:  'c:'
-*/ + */
 </code> </code>
  
Line 71: Line 66:
 /** /**
 * Default: * Default:
-* <block 80:0:white;black;4px solid black;arial,sans-serif/9pt;>text</block>+* <block 80:10:white;black;4px solid black;arial,sans-serif/10pt;>text</block>
 * width: 80% * width: 80%
-* alignment: centered+* alignment: 10 px from left
 * background-color: white * background-color: white
 * text-color: black * text-color: black
 * border: 4px solid black * border: 4px solid black
-* font: 9pt arial,sans-serif+* font: 10pt Arial, Helvetica, sans-serif
 */ */
 </code> </code>
  
 ==== Rounded Corners ==== ==== Rounded Corners ====
 +
 For rounded corners the syntax adds the ''rounded'' parameter to the end of the parameter list: For rounded corners the syntax adds the ''rounded'' parameter to the end of the parameter list:
-    <block 80:0:white;black;4px solid black;arial,sans-serif/9pt;rounded>+ 
 +  <block 80:0:white;black;4px solid black;arial,sans-serif/9pt;rounded> 
 This option can be selected from the dialog. This option can be selected from the dialog.
  
-===== FAQ =====+===== Configuration Options =====
  
 +^ Option        ^ Description          ^ Default                       ^ Notes                                                                                                                                 ^
 +| block_width   | Block width          | 80                            | Number of pixels specified as integer                                                                                                 |
 +| bg            | Background color     | white                         | Any valid css value                                                                                                                   |
 +| fg            | Text Color           | black                         | Any valid css value                                                                                                                   |
 +| border_color  | Border color         | black                         | Any valid css value                                                                                                                   |
 +| border_style  | Border style         | solid                         | Selected from drop-down menu                                                                                                          |
 +| border_width  | Border With          | 4px                           | specified as pixels: ''<n>px''                                                                                                        |
 +| font_family   | Font or Font Family  | Arial, Helvetica, sans-serif  | Selected from drop-down menu                                                                                                          |
 +| font_size     | Text size in points  | 10pt                          | Specified as ''pt'', ''px'', or ''em''                                                                                                |
 +| block_align   | Block Alignment      | 10                            | Either an integer representing number of pixels from left ((''0'' will give you centered)), or  ''c'' for centered, or ''r'' for right aligned  |
 +
 +
 +===== Change Log =====
 +
 +{{rss>https://github.com/turnermm/Block-Plugin-for-Dokuwiki/commits/master.atom date count=10}}
 +
 +===== FAQ =====
  
 +The block plugin does not work with the %%~~GOTO>[page]~~%% syntax of the [[plugin:goto]] plugin in the hogfather distribution and later.  All other functions are OK.
 ===== Discussion ===== ===== Discussion =====
 +
 +I am having problem with heading used inside block as it swallows everything following. Input
 +
 +<code>
 +<block 100:0:#c7e1ff;black;0px solid black;;rounded>
 +=====heading=====
 +</block>
 +</code>
 +
 +produces
 +
 +<code>
 +<div  class='blocks_round'  style='border: 0px solid black; width:100%; padding:8px;  margin: auto ;  background-color:#c7e1ff; color: black; '>
 +<h2 class="sectionedit4" id="heading">heading</h2>
 +<div class="level2">
 +</div>
 +</code>
 +
 +Obviously one of the two <div>s is not terminated. I believe it is the second one <div class="level2">,
 +because when not using heading inside the block, everything is ok. When adding a </div> after the block
 +
 +<code>
 +<html></div></html>
 +</code>
 +
 +it works fine (although cumbersome) except for the inserted (undesirable) vertical space. I guess that inserting one more </div> before the block is ended might help. But only in the case that a heading was used within the block. I am afraid that block is not really aware of what is inside. Would it be a solution to create the block_heading (or somethink like that) plugin which assumes that heading is used inside the block and which generates one more </div> before the end? Or more elegantly to add to the current block plugin one more argument, specifying how many </div>s (I believe one should be enough) are to be generated before the block end.
 +
 +Thanks for consideration :-)
 +
 +--------
 +
 I has an error when I clicked the menu button I has an error when I clicked the menu button
  
Line 116: Line 163:
 Whenever I try to type in the box, Windows puts the text in the text Find (aka Search) box. Result is no text can go into the box. Whenever I try to type in the box, Windows puts the text in the text Find (aka Search) box. Result is no text can go into the box.
 >> Sorry I didn't see this eaarlier.  But I can't reproduce this.  The following page uses box throughout and from Windows: http://www.mturner.org/devel/doku.php  --- [[user>turnermm|Myron Turner]] //2015-10-06 01:53// >> Sorry I didn't see this eaarlier.  But I can't reproduce this.  The following page uses box throughout and from Windows: http://www.mturner.org/devel/doku.php  --- [[user>turnermm|Myron Turner]] //2015-10-06 01:53//
 +
 +----
 +
 +Is there any way to include the caption in a block with an image?
plugin/block.1444094646.txt.gz · Last modified: 2015-10-06 03:24 by turnermm

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki