plugin:oddeven
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:oddeven [2014-01-29 17:40] – 93.196.155.87 | plugin:oddeven [2024-04-22 10:21] (current) – 212.201.117.6 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== OddEven Plugin ====== | ====== OddEven Plugin ====== | ||
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : az@vovanium.ru | email : az@vovanium.ru | ||
type : action | type : action | ||
lastupdate : 2009-03-24 | lastupdate : 2009-03-24 | ||
- | compatible : | + | compatible : !Kaos, Elenor of Tsort, !Igor |
depends | depends | ||
conflicts | conflicts | ||
similar | similar | ||
- | tags : tables, highlight, !maybe.broken | + | tags : tables, highlight |
downloadurl: | downloadurl: | ||
---- | ---- | ||
- | ===== Download | + | ===== Download, Installation, License |
- | Download | + | Search |
* http:// | * http:// | ||
- | You may vizit original plugin page (on russian) and see how it works: http:// | + | You may visit original plugin page (in Russian) and see a demonstration: http:// |
+ | |||
+ | ===== Syntax ===== | ||
+ | |||
+ | No syntax required. Once the plugin is installed, the background of ALL tables in your DokuWiki will have alternating (odd) rows colored light grey. | ||
+ | |||
+ | However, you can modify the color of the rows OR change the alternation from odd to even by modifying the '' | ||
===== Plugin internals ===== | ===== Plugin internals ===== | ||
+ | |||
You may use it as tutorial on how to create output modification plugins. | You may use it as tutorial on how to create output modification plugins. | ||
Line 30: | Line 37: | ||
- // | - // | ||
- | As plugin run, is registers RENDERER_CONTENT_POSTPROCESS action hook called ' | + | As plugin run, is registers |
+ | |||
+ | ===== Discussion ===== | ||
+ | |||
+ | This plugin was not functioning anymore. I fixed the code, so it works again (in " | ||
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | /** | ||
+ | * OddEven Plugin | ||
+ | * @license Public Domain | ||
+ | * @author | ||
+ | */ | ||
+ | // must be run within Dokuwiki | ||
+ | if(!defined(' | ||
+ | |||
+ | if(!defined(' | ||
+ | require_once(DOKU_PLUGIN.' | ||
+ | |||
+ | class action_plugin_oddeven extends DokuWiki_Action_Plugin { | ||
+ | |||
+ | function getInfo() { | ||
+ | return array( | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | } | ||
+ | |||
+ | function register($controller) { | ||
+ | $controller-> | ||
+ | ' | ||
+ | ' | ||
+ | $this, | ||
+ | ' | ||
+ | array()); | ||
+ | } | ||
+ | function oddeven($event, | ||
+ | $event-> | ||
+ | '/< | ||
+ | '< | ||
+ | $event-> | ||
+ | ); | ||
+ | $event-> | ||
+ | '/< | ||
+ | '< | ||
+ | $event-> | ||
+ | ); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | ?> | ||
+ | </ | ||
+ | |||
+ | And replace all code in style.css by the following two lines: | ||
+ | |||
+ | <code css> | ||
+ | table tr: | ||
+ | div.wrap_skip_css tr { background-color: | ||
+ | </ | ||
+ | |||
+ | ... to make it compatible with modern javascript filtering and sorting ([[sortablejs]], | ||
+ | |||
+ | Now, you can even exclude individual tables from the zebra coloring using the [[wrap|wrap plugin]] with following syntax on your wiki page: | ||
+ | |||
+ | < | ||
+ | <WRAP skip_css> | ||
+ | ... your table here | ||
+ | </ | ||
+ | <WRAP clear/> | ||
+ | </ | ||
+ | |||
+ | **Note:** If using ''< | ||
+ | |||
+ | --- [[user> | ||
- | ===== ToDo ===== | ||
- | FIXME Website is down, no other url for download available. Somebody got a copy of it? |
plugin/oddeven.1391013634.txt.gz · Last modified: 2014-01-29 17:40 by 93.196.155.87