plugin:oddeven
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:oddeven [2017-05-13 23:09] – [Syntax] rrandall | plugin:oddeven [2023-04-04 20:42] (current) – Aleksandr | ||
---|---|---|---|
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 : 2016-06-26a "Elenor of Tsort" | + | compatible : Elenor of Tsort, !Igor |
depends | depends | ||
conflicts | conflicts | ||
Line 15: | Line 15: | ||
---- | ---- | ||
- | ===== Download | + | ===== Download, Installation, License |
- | Download | + | Search |
* http:// | * http:// | ||
Line 25: | Line 25: | ||
===== Syntax ===== | ===== Syntax ===== | ||
- | No syntax required. Once the plugin is installed, the background of ALL tables in your Dokuwiki | + | No syntax required. Once the plugin is installed, the background of ALL tables in your DokuWiki |
+ | |||
+ | However, you can modify the color of the rows OR change the alternation from odd to even by modifying the '' | ||
- | However, you can modify the color of the rows OR change the alternation from odd to even by modifying the style.css file included in the download (see below). | ||
===== 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 35: | 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(([[user> | ||
+ | |||
+ | <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> | ||
plugin/oddeven.1494709776.txt.gz · Last modified: 2017-05-13 23:09 by rrandall