plugin:instructions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:instructions [2019-10-29 13:13] – juergen_aus_zuendorf | plugin:instructions [2022-04-20 17:29] (current) – [Wiki-Syntax] juergen-aus-zuendorf | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : H-J-Schuemmer@Web.de | email : H-J-Schuemmer@Web.de | ||
type : syntax | type : syntax | ||
- | lastupdate : 2019-10-19 | + | lastupdate : 2022-04-20 |
- | compatible : Frusterick Manners, Greebo | + | compatible : Hogfather, Greebo, Frusterick Manners |
depends | depends | ||
conflicts | conflicts | ||
- | similar | + | similar |
tags : formatting, macro, replace | tags : formatting, macro, replace | ||
downloadurl: | downloadurl: | ||
bugtracker : https:// | bugtracker : https:// | ||
- | sourcerepo : # eg. http:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
Line 29: | Line 29: | ||
===== Examples/ | ===== Examples/ | ||
- | With this code: | + | In combination with a special template, this code generates a print preview button: |
+ | ~~INSTR~~cms_preview~~|-mynamespace: | ||
+ | |||
+ | {{https:// | ||
+ | |||
+ | |||
+ | Or with this code: | ||
< | < | ||
- | {{INSTR< | + | ~~INSTR~~warning~~ |
|- Warning | |- Warning | ||
|- Title of the warning | |- Title of the warning | ||
Line 40: | Line 46: | ||
|+ • and perhaps this | |+ • and perhaps this | ||
|+ • and some more things | |+ • and some more things | ||
- | }} | + | ~~END~~ |
</ | </ | ||
- | ... the result with a certain template | + | ... the result with a certain template |
{{https:// | {{https:// | ||
Line 51: | Line 57: | ||
==== Wiki-Syntax ==== | ==== Wiki-Syntax ==== | ||
- | First the syntax within the wiki page: | + | First the syntax within the wiki page: ((There is an alternative, |
+ | '' | ||
+ | But this might be deleted in future releases because there are problems using this syntax in combination with the ckgedit plugin.))\\ | ||
< | < | ||
- | {{INSTR<[template]> | + | ~~INSTR~~[template]~~ |
|- [parameter 1] | |- [parameter 1] | ||
|- [parameter 2a] | |- [parameter 2a] | ||
|+ [parameter 2b] | |+ [parameter 2b] | ||
|- [parameter n] | |- [parameter n] | ||
- | }} | + | ~~END~~ |
</ | </ | ||
//or the same in one line:// | //or the same in one line:// | ||
- | < | + | ~~INSTR~~[template]~~|-[parameter 1]|- ... |-[parameter n]~~END~~ |
- | {{INSTR<[template]>|-[parameter 1]|-[parameter 2a]|+[parameter 2b]|-[parameter n]}} | + | |
- | </ | + | |
a) The leading syntax tag is '' | a) The leading syntax tag is '' | ||
Line 74: | Line 81: | ||
c) The listed parameters can be normal text. Each parameter is defined in one line that is prefixed by '' | c) The listed parameters can be normal text. Each parameter is defined in one line that is prefixed by '' | ||
- | In addition there are some special markups: | + | In addition there are some special markups |
- | * Marking text with wiki syntax as **bold**, // | + | * Marking text with wiki syntax as **bold**, // |
* Two spaces are interpreted as indentation or gap. | * Two spaces are interpreted as indentation or gap. | ||
* Wiki-Links are understood with this syntax: '' | * Wiki-Links are understood with this syntax: '' | ||
- | * If you want to have a line break within one parameter you can achieve this by inserting a new line prefixed by '' | + | * If you want to have a line break within one parameter, you can achieve this by inserting a new line prefixed by '' |
+ | If the template (see below) supports more parameter as from the requesting page shall be passed, the supernumerary parameters will remain empty in the output. | ||
==== Template ==== | ==== Template ==== | ||
- | To work correctly you have to define a template. This is built as html-text and defines the look of the instruction. | + | To work correctly, you have to define a template. This is built as HTML-text and defines the look of the instruction. If necessary, the HTML-text may contain JavaScript code. |
a) The first line in the template file has to be the code " | a) The first line in the template file has to be the code " | ||
- | b) After this the file contains all parameters that should be processed within the wiki page. When a parameter shall be inserted in the html content just insert a new line and write " | + | b) After this, the file contains all parameters that should be processed within the wiki page. When a parameter shall be inserted in the HTML content, just insert a new line and write " |
- | c) At the end of the html file you have to append a line with the code "</ | + | c) At the end of the HTML file, you have to append a line with the code "</ |
- | The template has to be placed in a subfolder to " | + | The template has to be placed in a subfolder to " |
- | Here is an example | + | // |
+ | If a parameter | ||
+ | ==== Placeholders ==== | ||
+ | In addition you can use some placeholders in the wiki page: | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | // | ||
< | < | ||
+ | ~~INSTR~~my_template~~ | ||
+ | |- @ID@ | ||
+ | |- @PAGE@ | ||
+ | |- @NS@ | ||
+ | |- @CURNS@ | ||
+ | |- @URL_DOKU@ | ||
+ | |- @URL_PAGE@ | ||
+ | ~~END~~ | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Examples ==== | ||
+ | |||
+ | === Example " | ||
+ | |||
+ | Here is an example with 5 parameters (screenshot see above): | ||
+ | |||
+ | //Code:// | ||
+ | < | ||
+ | ~~INSTR~~warning~~ | ||
+ | |- Warning | ||
+ | |- Title of the warning | ||
+ | |- Description of the warning | ||
+ | |- Therefore: | ||
+ | |- • make this | ||
+ | |+ • and perhaps this | ||
+ | |+ • and some more things | ||
+ | ~~END~~ | ||
+ | </ | ||
+ | |||
+ | // | ||
+ | <code html> | ||
< | < | ||
- | <table style=" | + | <table style=" |
< | < | ||
param-1 | param-1 | ||
Line 117: | Line 168: | ||
</ | </ | ||
- | This code is placed here: " | + | This code is placed here: " |
+ | |||
+ | |||
+ | === Example " | ||
+ | |||
+ | The next example shows a code without parameters to print out a page in the moment it is opened: | ||
+ | |||
+ | // | ||
+ | < | ||
+ | {{INSTR< | ||
+ | </ | ||
+ | |||
+ | // | ||
+ | <code html> | ||
+ | < | ||
+ | <script type=" | ||
+ | <!-- | ||
+ | window.onload = function() { | ||
+ | window.print() | ||
+ | } | ||
+ | --> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
Line 125: | Line 199: | ||
=== Change Log === | === Change Log === | ||
- | * **2019-10-19** | + | |
- | * Initial release | + | * **2022-03-25**: |
+ | * **2020-01-16**: | ||
+ | | ||
+ | * **2019-10-19**: Initial release | ||
plugin/instructions.1572351220.txt.gz · Last modified: 2019-10-29 13:13 by juergen_aus_zuendorf