Extension:TableEdit
From MediaWiki.org
|
Release status: beta |
|
|---|---|
| Implementation | Database, Tag, Special page |
| Description | Add table creation and editing for simple tables |
| Author(s) | JimHu |
| Last Version | 0.8 (2007-08-5) |
| MediaWiki | 1.12 |
| License | MIT |
| Download | http://trimer.tamu.edu/jh/TableEdit-v0.99.tar.gz |
| Example | EcoliWiki |
|
check usage (experimental) |
|
Contents |
[edit] Rationale and Features
Wiki markup can be challenging. Tables are one of the harder things for new users. TableEdit provides a simple table creation and editing system.
TableEdit replaces <newTableEdit/> tags in wikitext with a "Create Table Here" link. Following this link goes to a Special page that creates HTML comment-delimited tables The content is controlled by an external mysql database, but the tables are saved back to the wiki in normal wikitext surrounded by HTML comments with the id number of the table in the database. Users can
- Insert rows
- Append columns
- Change styles for tables, heading rows, and rows
- Use template-defined lists of column headings
See EcoliWiki for more about the TableEdit features and how to use them.
[edit] Status
So far, TableEdit 0.8 has been tested with MediaWiki 1.12 on MacOSX and CentOS 4. Help testing this extension on other versions will be appreciated! Note: If you are using different versions MediaWiki or of operating systems, expect quite a number of issues. Also, expect a number of bugs in the enclosed README and INSTALL files!
[edit] Changes in Version 0.8
Version 0.8 is a major refactoring. It has been running on EcoliWiki since mid-June 2008 and bug fixes are being applied periodically.
- Version 0.8 moves the extra MySQL tables inside the MW schema. Use update_schema.php to install these or to migrate older installations
- The codebase is moving toward something closer to a MVC structure.
- TableEdit now checks the content of the table in the wiki vs the content in the TableEdit database tables. Many bugs are associated with this conflict detection.
- You can now shift columns left or right
- Some extra options are available for admins
- Tables controlled from templates can now have checkboxes in the input form
See the README file for more.
[edit] Installation
See the INSTALL file in the package for detailed info on how to upgrade to TableEdit 0.8 from an earlier version of TableEdit. The INSTALL file also contains a slightly more detailed version of the fresh install instructions. Also check the discussion page of this article for quite a number of bugs!
To do a fresh install (rather than an upgrade):
- Download the latest version of Extension:TableEdit.
- Place the TableEdit directory into your extensions directory. Set appropriate permissions for these files.
- Backup your database.
- The next step adds tables to your MediaWiki database. It is very unlikely to go wrong, but ...
- If you don't already have an AdminSettings.php file in your MediaWiki installation directory, create one. This contains the database admin username and password for your MediaWiki database.
- Add TableEdit's database tables to your MediaWiki database. From the extensions/TableEdit directory, run
-
php update_schema.php -w ../..
- The -w parameter specifies the path to your MediaWiki directory.
-
- Add to LocalSettings.php:
-
require_once("$IP/extensions/TableEdit/TableEdit.php");
-
[edit] Also Install ProtectSection Extension
You are strongly encouraged to also install the ProtectSection extension.
Directly editing TableEdit definitions in the page source will usually break the table's definition. TableEdit generates inline comments telling editors not to edit the table, but TableEdit by itself does not prevent it.
To prevent this from happening you need to also install the ProtectSection extension. ProtectSection prevents anything enclosed in <protect></protect> tags from being edited by regular users.
If both TableEdit and ProtectSection are installed, TableEdit will detect this and automatically wrap TableEdit table definitions in protect tags, thus preventing your users from directly editing the table definitions.
[edit] Other helpful pages
- contains some information about how to create a template, specify column-rules, etc.
- defines a tab-delimited format for loading data into tables. (Yes, we thought about using XML.)
- describes the PHP script used to load information (in IFALT) into tables.
[edit] Alternatives
[edit] Known Issues
- TableEdit has problems if you try to create a table on a new page that has not been saved yet.
- Can't get the content back if the table is edited directly in the wiki. This can be prevented by combining TableEdit with the ProtectSection extension.
- Can't sort
- Can't insert columns in the middle
- Preview doesn't display initial empty table properly
- Can't delete a table
- Can't have empty heading - although having a "space" as a heading overcomes this. Empty headings are truncated when editing after first saved.
[edit] Dumps
While tables will be preserved when importing a dump from a wiki that uses TableEdit, when a user tries to click on the Edit link, bad things are likely to happen. In the best case, the recipient wiki will not have TableEdit installed and there will just be a 404 error. If TableEdit is installed, the most likely outcome is that the box_id and pagename will not match what is stored in the database and TableEdit will refuse to do the edit on the imported page. Suggestions for how to solve this are welcomed!
[edit] Bug Reporting
Please report bugs on the discussion page. Please sign your entries with your Name/IP and date using ~~~~.
For example: JimHu 22:14, 27 August 2008 (UTC)
[edit] Revision History
| Version of this page with patches for revisions prior to 0.8. |