DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:oddeven

This is an old revision of the document!


OddEven Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" unknown
  • 2022-07-31 "Igor" no
  • 2020-07-29 "Hogfather" unknown

plugin Paints table rows background to alternating colour stripes.

Last updated on
2009-03-24
Provides
Action

Tagged with highlight, tables

Download and Installation

Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

You may visit original plugin page (in Russian) and see a demonstration: http://vovanium.ru/set/oddeven. Plugin is released as Public Domain, because of triviality.

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 style.css file included in the download (see below).

Plugin internals

You may use it as tutorial on how to create output modification plugins.

Plugin consists of two files:

  1. action.php – the main code;
  2. style.css – stylesheet.

As plugin run, is registers RENDERER_CONTENT_POSTPROCESS action hook called 'oddeven'. When hook is called, it adds class 'roweven' to 'td' tags having class 'row0', 'row2' etc. and 'rowodd' for 'row1', 'row3' etc. using regexp replacement. Stylesheet defines class 'roweven' to have lightgray background color.

plugin/oddeven.1680546166.txt.gz · Last modified: 2023-04-03 20:22 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki