plugin:explain
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:explain [2015-07-15 14:37] – [When do changes take effect?] Juergen_aus_Zuendorf | plugin:explain [2024-01-08 16:01] (current) – Aleksandr | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Explain a Term ====== | + | ====== Explain a Term Plugin |
---- plugin ---- | ---- plugin ---- | ||
Line 6: | Line 6: | ||
email : dokuwiki@cosmocode.de | email : dokuwiki@cosmocode.de | ||
type : syntax | type : syntax | ||
- | lastupdate : 2015-02-26 | + | lastupdate : 2019-01-23 |
compatible : | compatible : | ||
depends | depends | ||
Line 13: | Line 13: | ||
tags : terms, definitions | tags : terms, definitions | ||
- | downloadurl: | + | downloadurl: |
- | bugtracker : http:// | + | bugtracker : https:// |
- | sourcerepo : http:// | + | sourcerepo : https:// |
---- | ---- | ||
Just like for the acronyms you can define a file containing a table which declares terms, a short explanation and two links to a longer definition. This automatically works for all those terms in the whole wiki. | Just like for the acronyms you can define a file containing a table which declares terms, a short explanation and two links to a longer definition. This automatically works for all those terms in the whole wiki. | ||
+ | |||
+ | [[https:// | ||
===== Download and Installation ===== | ===== Download and Installation ===== | ||
- | [[http:// | ||
- | Download | + | Search |
===== Syntax ===== | ===== Syntax ===== | ||
Line 37: | Line 38: | ||
* "// | * "// | ||
- | // | + | // |
===== Example ===== | ===== Example ===== | ||
Line 85: | Line 86: | ||
Edward Barker | Edward Barker | ||
- | ---- | + | ==== Edit the conf/explain.conf File as a Dokuwiki Page via Symlink ==== |
- | Base on the style of plugins, I have changed the CSS to plugins/explain/style.css as below: | + | |
- | <code css> | + | |
- | div.dokuwiki | + | |
- | color: __black__; | + | |
- | border-bottom: | + | |
- | padding-top: | + | |
- | } | + | |
- | + | ||
- | div.dokuwiki a.explain: | + | |
- | background-color: | + | |
- | } | + | |
- | </ | + | |
- | I have also changed the code a little bit to use comma separated instead of TAB separated s.t. the file can be soft linked to the pages and edit via dokuwiki, just like the hint for the standard acronyms.conf editing. | + | |
+ | The file can be [[https:// | ||
+ | |||
+ | The TAB character can't be used for editing within the browser, as it just skips to the next field. | ||
+ | Thanks to https:// | ||
+ | Instead of the CSV code below, I chose to use 4 whitespace characters as the delimiter, by changing line 53 from:\\ | ||
+ | $parts = explode(" | ||
+ | to: | ||
+ | $parts = explode(" | ||
+ | |||
+ | Which is a lot easier than the CSV code below. | ||
<code php> | <code php> | ||
<?php | <?php | ||
Line 220: | Line 218: | ||
</ | </ | ||
+ | Base on the style of plugins, I have changed the CSS to plugins/ | ||
+ | <code css> | ||
+ | div.dokuwiki a.explain { | ||
+ | color: __black__; | ||
+ | border-bottom: | ||
+ | padding-top: | ||
+ | } | ||
+ | | ||
+ | div.dokuwiki a.explain: | ||
+ | background-color: | ||
+ | } | ||
+ | </ | ||
- | Ken Cheung 2007-04-30 | + | Ken Cheung 2007-04-30\\ |
+ | Marcos Reyes 2019-08-01 | ||
==== regular expressions ==== | ==== regular expressions ==== | ||
Line 303: | Line 314: | ||
When I add an entry to explain.conf, | When I add an entry to explain.conf, | ||
- | A solution I can live with is [[https:// | + | A solution I can live with is [[: |
My experience is that you have to change and re-change the template to force it. Only saving the configuration isn't enough in all cases. Also see my git issue at [[https:// | My experience is that you have to change and re-change the template to force it. Only saving the configuration isn't enough in all cases. Also see my git issue at [[https:// | ||
Line 329: | Line 340: | ||
--Art Carlson, Max Planck Institute of Biochemistry, | --Art Carlson, Max Planck Institute of Biochemistry, | ||
+ | |||
+ | ==== Very simple ODT-Plugin support ==== | ||
+ | At the moment, the terms are not exported via the plugin [[plugin: | ||
+ | |||
+ | <code php> | ||
+ | public function render($format, | ||
+ | if(is_null($data[' | ||
+ | $renderer-> | ||
+ | return true; | ||
+ | } | ||
+ | if ($format == ' | ||
+ | $renderer-> | ||
+ | if(($data[' | ||
+ | $renderer-> | ||
+ | } | ||
+ | $renderer-> | ||
+ | if ($data[' | ||
+ | $renderer-> | ||
+ | } | ||
+ | $renderer-> | ||
+ | return true; | ||
+ | } | ||
+ | // generate output for ODT export | ||
+ | if ($format == ' | ||
+ | $renderer-> | ||
+ | return true; | ||
+ | } | ||
+ | return false; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | -- Alois Hockenschlohe, | ||
+ | |||
+ | ==== Ignore this Word ==== | ||
+ | |||
+ | I love the plugin, thank you! One question, or maybe it's a request... Some terms may be used in the ' | ||
+ | |||
+ | [[user> | ||
+ | |||
plugin/explain.1436963856.txt.gz · Last modified: 2015-07-15 14:37 by Juergen_aus_Zuendorf