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-11-18 09:30] – [Placeholders] 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-11-15 | + | 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/ | ||
- | In combination with a special template, this code generates a simple hint: | + | In combination with a special template, this code generates a print preview button: |
- | | + | |
- | {{https:// | + | {{https:// |
Line 38: | Line 38: | ||
< | < | ||
- | {{INSTR< | + | ~~INSTR~~warning~~ |
|- Warning | |- Warning | ||
|- Title of the warning | |- Title of the warning | ||
Line 46: | Line 46: | ||
|+ • and perhaps this | |+ • and perhaps this | ||
|+ • and some more things | |+ • and some more things | ||
- | }} | + | ~~END~~ |
</ | </ | ||
- | ... the result with a certain template could be like this: | + | ... the result with a certain template could be like this simple hint: |
{{https:// | {{https:// | ||
Line 57: | 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 80: | 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**, //italic//, __underline__ | + | * Marking text with wiki syntax as **bold**, //italic// or '' |
* 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> | <code html> | ||
< | < | ||
- | <table style=" | + | <table style=" |
< | < | ||
param-1 | param-1 | ||
Line 123: | Line 168: | ||
</ | </ | ||
- | This code is placed here: " | + | This code is placed here: " |
- | ==== Placeholders ==== | + | === Example " |
- | In addition you can use some placeholders | + | The next example shows a code without parameters to print out a page in the moment it is opened: |
- | | '' | + | |
- | | '' | + | //Syntax:// |
- | | '' | + | < |
- | | '' | + | {{INSTR< |
- | | '' | + | </ |
- | | '' | + | |
+ | // | ||
+ | <code html> | ||
+ | < | ||
+ | <script type=" | ||
+ | <!-- | ||
+ | window.onload = function() { | ||
+ | | ||
+ | } | ||
+ | --> | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
Line 142: | Line 199: | ||
=== Change Log === | === Change Log === | ||
- | * **2019-10-19**: Initial release | + | * **2022-04-20**: Better support for empty parameters |
+ | * **2022-03-25**: | ||
+ | * **2020-01-16**: | ||
* **2019-11-15**: | * **2019-11-15**: | ||
+ | * **2019-10-19**: | ||
plugin/instructions.1574065845.txt.gz · Last modified: 2019-11-18 09:30 by juergen_aus_zuendorf