plugin:pot
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:pot [2022-01-09 11:17] – agapetus | plugin:pot [2024-02-13 23:29] (current) – compatible with "Igor" Aleksandr | ||
---|---|---|---|
Line 2: | Line 2: | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : | email : | ||
type : syntax | type : syntax | ||
- | lastupdate : 2022-01-09 | + | lastupdate : 2022-08-03 |
- | compatible : Hogfather | + | compatible : Hogfather, Igor |
depends | depends | ||
conflicts | conflicts | ||
- | similar | + | similar |
- | tags : | + | tags : |
downloadurl: | downloadurl: | ||
Line 18: | Line 18: | ||
---- | ---- | ||
- | The pot plugin is based on the [[https:// | + | The pot plugin is based on the [[plugin: |
- | + | ||
===== Syntax ===== | ===== Syntax ===== | ||
- | The easy way for example | + | The easy way for example: |
<pot> 5 + 10 </ | <pot> 5 + 10 </ | ||
- | ==== format | + | ==== Format |
Additional parameters can be used to adjust the displayed result: | Additional parameters can be used to adjust the displayed result: | ||
Line 35: | Line 33: | ||
<pot currency=$ | decimals=2 > 5 + 10 </ | <pot currency=$ | decimals=2 > 5 + 10 </ | ||
- | You will get: 15.00 $ | + | You will get: 15.00 $ |
There are three ways to customize the display of results: | There are three ways to customize the display of results: | ||
Line 41: | Line 39: | ||
* use the config in the admin section for a general design, | * use the config in the admin section for a general design, | ||
* use an page specific code to design an shortcut | * use an page specific code to design an shortcut | ||
- | * use the individual "< pot settings=setting | + | * use the individual "'' |
- | * the general config settings will be merged ( overwritten ) by the page code (if set), and finally merged by the individual settings (if set). | + | * the general config settings will be merged (overwritten) by the page code (if set), and finally merged by the individual settings (if set). |
- | The values are a simple line of entries in the format: " | + | The values are a simple line of entries in the format: "'' |
- | ^ key ^ shortcut | + | ^ key |
- | | set | | + | | '' |
- | | potid | @value or # | + | | '' |
- | | decimals | + | | '' |
- | | currency | + | | '' |
- | | width | | + | | |
- | | formula | + | | '' |
- | | display | + | | '' |
- | | float | ! | (left) right | | + | | '' |
- | | sepmil | + | | '' |
- | | sepdec | + | | '' |
- | | defaultentry | + | | '' |
- | | color+ | + | | '' |
- | | color- | + | | '' |
- | | type | | + | | '' |
+ | | '' | ||
- | === more examples === | + | === More examples === |
<pot set=1 | potid=example | decimals=2 | currency=€ | sepdec=, | sepmil=. | display=none > 1100.01 </ | <pot set=1 | potid=example | decimals=2 | currency=€ | sepdec=, | sepmil=. | display=none > 1100.01 </ | ||
- | Will not be displayed. ( display=none ) | + | Will not be displayed\\ ('' |
<pot ~1> {@example} + 1 </ | <pot ~1> {@example} + 1 </ | ||
- | Will be displayed as: 1.101,01 € ( because | + | Will be displayed as: 1.101,01 €\\ (because |
- | ==== calculating | + | ==== Calculating |
- | Besides the simple calculations ( + - * / ) more complex functions can be used (e.g. sin() cos() ...). | + | Besides the simple calculations ( '' |
- | Already set "< pot>" | + | Already set '' |
- | <pot> {@example} + 1 </ | + | <pot> {@example} + 1 </ |
- | You also can also write " | + | to fetch exactly one other pot result |
- | | + | You also can also write '' |
+ | |||
+ | | ||
+ | |||
+ | to sum up all pots where id " | ||
| | ||
- | <pot potid=example_5 > {&} </ | + | <pot potid=example_5 > {&} </ |
- | The calculation might be done with the result of former pots and not with the formulas ( have a look at "formula=true" | + | to sum up all pots where this pod id (" |
+ | |||
+ | The calculation might be done with the result of former pots and not with the formulas (have a look at '' | ||
==== potid ==== | ==== potid ==== | ||
- | With " | + | With " |
- | ==== shortcuts | + | ==== Shortcuts |
- | Some signs are definde as shortcuts. You might use them in the "format" | + | Some signs are definde as shortcuts. You might use them in the '' |
- | | + | '' |
- | | shortcut | the same as | | | + | ^ Shortcut |
- | | @value | + | | '' |
- | | #value | potid=value_(uniqueNumber) | nice to use in tables and to sum them with {#value} later | | + | | '' |
- | | ! | float= right | probebly best in tables to have your numbers nicely on the right side | | + | | '' |
- | | ~value | defaultentry=value | fetches page settings which were set erlier with "set=value" | + | | '' |
- | ==== text ==== | + | ==== Text ==== |
To use this plugin for text entries simply write: | To use this plugin for text entries simply write: | ||
- | <POT> my text </ | + | <POT> my text </ |
+ | |||
+ | or | ||
+ | |||
+ | | ||
- | You can use this text later on the page with {@value}. A other plugin with similar functions: [[https:// | + | You can use this text later on the page with '' |
- | ==== WYSiWYG | + | ==== WYSIWYG |
- | Unfortunately, | + | Unfortunately, |
- | [[https:// | + | |
Line 127: | Line 135: | ||
This first attempt is only done with php. That is why the calculations and name assignments are made from top to bottom. Possibly, at some point, a variant with javascript will be created in order to be able to retrieve the set values on the whole page unhindered. | This first attempt is only done with php. That is why the calculations and name assignments are made from top to bottom. Possibly, at some point, a variant with javascript will be created in order to be able to retrieve the set values on the whole page unhindered. | ||
- | ==== developer | + | ==== Developer |
Unfortunately, | Unfortunately, | ||
plugin/pot.1641723467.txt.gz · Last modified: 2022-01-09 11:17 by agapetus