Extension:TableMod

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear app error.svg
TableMod
Release status: unstable
Implementation Parser extension, Tag
Description in-page table modifications
Author(s) (Freakolowskytalk)
Latest version 0.1.0 (2009-12-08)
MediaWiki 1.15+
License GPL
Download No link
Tags
<table-mod>
Hooks used
ParserFirstCallInit
OutputPageParserOutput
Translate the TableMod extension if it is available at translatewiki.net
Check usage and version matrix.

What can this extension do?[edit]

Surrounding allows a user with edit permissions on the page to perform some simple in-page modifications to a wiki-table.


WARNING[edit]

This extension MODIFIES the content of the wiki-table. The changed state is saved and not only displayed.

Usage[edit]

User can surround a wiki-table with <table-mod> tag. While page is parsed this extension adds links to the table which users with edit permissions to the table can use to modify the table.

For now this tag supports sorting of the table (table must contain column headers) and removing of rows (identified by an index column specified in tag attributes).

Tag attributes[edit]

  • ident - unique table id on this page
  • index - index column used for remove action (values 1..n), specifying 0 as index column displays an additional column for single row removal
  • actions - comma separated values with allowed actions and without spaces. Currently supported actions are:
    • remove - remove all rows that have value in index column equal to the value of selected row
    • sort - sort rows by selected column in selected direction. If all rows contain numerical data, the data is sorted as numbers otherwise it is sorted as strings.