28 Desember 2011

BUAT PLUGIN wp-table DI WORDPRESS


My first plugin : wp-Table
For a project I need to show sport results in a table. But my WordPress users create horrible table layouts or damage a existing table with the WordPress WYSIWYG editor. So I search in the web for a simple table editor.
After I didn’t really found a table editor for my purpose , I take the chance to create this plugin by myself, as first study of “creating plugin’s in wordpress”. So if you need a table in your blog and if you not so familiar with HTML table design, you can use the wp-Table Plugin. The latest feature update is a csv import , so that you can edit tables in a much faster way.
This is a simple preview, created with wp-Table :
You only need to enter in your blog the tag : [TABLE=ID]. You easily manage the tables in the admin section under : Manage -> Tables. This is a preview of the above table in the wordpress admin section.
wp-table Admin panel wp-table admin area
You can set up the style for border, cell spacing, background color etc. via global settings or direct in the wp-Table.css style sheet. This file must be in the same folder like the plugin itself.
Installation :
wp-TableCopy all files in the plugin folder “wp-table” . Activate the plugin and start under Manage -> Tables to edit your first table. The plugin creates automatic one sample table in you wordpress database. If you would like to edit online the CSS file, set the write permission for wp-table.css .
Requirement :
Tested it with WordPress Version 2.0.4 (German version) and 2.0.5
Tested with PHP 4.3.7 and higher, MySQL 4.0.15 and 5.0.18
Language :
This plugin support the GNU Gettext localization. It’s prepared for the translation in other languages, to support the plugin in your language , seehere.
Flag: UK English [en_EN]
Default language
Flag: DE German / Deutsch [de_DE]
Always included
Flag: FR French / Français [fr_FR]
Author: Christian
For version: 1.35
Last updated: 2007-02-09
Download wpTable-fr_FR.zip
Flag: PL Polish / Polski [pl_PL]
Author: Maciek Palmowski
For version: 1.41
Last updated: 2007-03-16
Download wpTable-pl_PL.zip
Flag: TR Turkish / Türkçe [tr_TR]
Author: Ehcrea
For version: 1.52
Last updated: 2007-12-18
Download wpTable-tr_TR.zip
Flag: IT Italian / Italiano [it_IT]
Author: RiccardoPro
For version: 1.52
Last updated: 2007-10-09
Download wpTable-it_IT.zip
Flag: BR Portuguese / Brazilian Português [pt_BR]
Author: Fabricio Vieira
For version: 1.52
Last updated: 2007-11-07
Download wpTable-pt_BR.zip
Flag: DK Danish / Dansk [dk_DK]
Author: Strang Skov
For version: 1.52
Last updated: 2007-11-28
Download wpTable-dk_DK.zip
Flag: NL Dutch / Nederlands [nl_NL]
Author: Noe Snaterse
For version: 1.52
Last updated: 2007-12-30
Download wpTable-nl_NL.zip
Flag: BG Bulgarian  [bg_BG]
Author: Alexander DichevFor version: 1.52
Last updated: 2008-01-18
Download wpTable-bg_BG.zip
Just upload the .mo file in the wpTable folder. WordPress will automatically load the language file from this directory, where ‘locale’ is the value you defined in your wp-config.php file in the root of your WordPress installation.
Table Sorting Option : 
A very cool and new feature is the sorting of the columns. Click on the header for a demonstration. I integrated this script as new option, it’s a heavy complex JavaScript from Frequency Decoder and in some cases other scripts (i.e. Prototype.js) causes problems. Please ensure that you are using the latest Prototype version V1.5.0, when you use this together. 
Note :
Thanks to the plugin’s from Thomas Boley (myGallery) and GaMerZ (WP-Polls),
which gives me a lot of education.
History list :
V1.52 / 15.10.2007 - Bugfix for Gengo
V1.51 / 03.10.2007 - Bugfix in CSS (Forgot change from id to class)
V1.50 / 24.09.2007 - Changes for WordPress 2.3
- Changes CSS from id to class
- Minor bugfixes (remove get_settings)
V1.45 / 20.05.2007- Fix path problem in button (forgot one ../)
- Rename to wptable-tinymce.php
V1.44 / 29.04.2007- Fix path problem in button
V1.43 / 25.04.2007- Bugfix for TinyMCE Button
V1.42 / 11.04.2007- Bugfix for copy table
V1.41 / 26.02.2007- New function : Insert row in between
- Bugfix for sql_mode
V1.40 / 17.02.2007- Add TinyMCE button
- Change SQL string type for longer text
- TABLE tag can now lowercase 
- Add Tag [TABLENAME= XXX] (Thanks to William)
- Integrate french translation (Thanks to Christian)
V1.35 / 14.01.2007- Integrate table sorting script from Frequency Decoder
- Change CSS-class structure
- Change table style of CSS file
V1.34 / 12.12.2006- Drop check for content of csv-file
V1.33 / 09.12.2006- Bugfix for Cell padding/spacing
- Bugfix for shown ‘$’ in table
V1.32 / 07.12.2006- Bugfix for Copy table
- Show Mime Type when import a file
V1.31 / 05.12.2006- Table can be copied
- WP-Table.css is editable
- Minor bugfix in delete last column
V1.30 / 03.12.2006- CSV Import
- Bugfix for identical table names
- New table is setable with number of rows
V1.20 / 26.11.2006- wp-Table is now XHTML 1.0 Transitional valid
- Remove table alignment (not XHTML valid)
- Integrated CSS file for more style control
V1.11 / 22.11.2006- Fixed “Show description” problem
- Init serveral variables to avoid a warning from PHP
V1.10 / 20.11.2006- Alignment control for each column
- Border size, cell padding, cell spacing now editable
V1.01 / 19.11.2006- Input values can now contain HTML code or a link
V1.00 / 11.11.2006- Create tables
- Options for header, border and alternating color
- Show table name or description
- Setup table width
- First row can be in bold font
- Included german translation

Tidak ada komentar:

Posting Komentar