Plugin info

Total downloads: 3,830
Active installs: 30
Total reviews: 4
Average rating: 5
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 1
Last updated: 2/12/2016 (3609 days ago)
Added to WordPress: 2/12/2016 (9 years old)
Minimum WordPress version: 4.4
Tested up to WordPress version: 4.4.34
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 3609 days ago • 4 reviews

22/100

Is DbTable to DataTable abandoned?

Possibly abandoned (last update 3609 days ago).

Compatibility

Requires WordPress: 4.4
Tested up to: 4.4.34
Requires PHP: f

Languages

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

Table Sorter
Rating 4.8/5 (29 reviews)Active installs 9,000
WP Tabbed Widget
Rating 5.0/5 (7 reviews)Active installs 300
HH sortable ID columns
Rating 5.0/5 (4 reviews)Active installs 300
LH Sortable Tables
Rating 5.0/5 (2 reviews)Active installs 80
SortTable Post
Rating 2.7/5 (3 reviews)Active installs 70

Description

This plugin allows you to display the content of MySql tables into sortable html tables thanks to the DataTable jQuery Plugin.

You don’t need any configuration and once installed, it is ready to use.

Simply add the shortcode [dbtable] into an article or a page and you will have a nice and clean table.

Examples:

All parameters that contain more than one value have to be separated by commas without spaces.

Minimum needed : [dbtable from=MysqlTableName]

  • select=field1,field2,field3 will display all rows of the table and only specified fields
  • except=field1,field2,field3 will display all rows of the table except specified fields
  • cssClass=class1,class2 will add class1 and class2 to the class attribut of the table
  • comments=true|(false) true will use comments specified in each field of the MySql table as datatable column names. If true and if a comment is missing, the plugin fallback on field name only for the one missing, not for the entire table.
  • pagination=true|(false) will show/hide the bottom pagination links. If false, make sure you have the limit parameter large enough to display all your datas
  • limit=25 Display 25 rows by default.

Installation

From your WordPress dashboard

  • Visit ‘Plugins > Add New’
  • Search for ‘DbTable to DataTable’
  • Activate DbTable to DataTable from your Plugins page.
  • That’s it!

From WordPress.org

  • Download DbTable to DataTable.
  • Upload the ‘DbTable2DataTable’ directory to your ‘/wp-content/plugins/’ directory, using your favorite method (ftp, sftp, scp, etc…)
  • Activate ‘DbTable to DataTable’ from your Plugins page.
  • That’s it !

Frequently Asked Questions

How do I change default values?

You can edit the main dbTable2dataTable.php file and change these values :

    $this->defaults = array(
          'from'        => null,     // Mysql source table
          'select'      => null,     // Select specific columns
          'except'      => null,     // Ignore specific columns
          'cssclass'    => null,     // Specify custom CSS class for the <table>
          'comments'    => false,    // Use field comments instead of column name
          'pagination'  => false,    // Enable / Disable pagination
          'limit'       => 25,       // Limit of results per page
          'width'       => '100',    // Set width in % of the table
          'language'    => 'English' // Default language : French
        );

What the `comments` attribut does?

By default, column names will be the field name (e.g: product_id, custom_field). But if you want to have custom/pretty names you should modify your table and add comments to the fields (e.g : ALTER TABLE product CHANGE product_id product_id INT( 11 ) COMMENT 'Product ID'

Why can’t I display datas from a WordPress Table ?

This plugin is not intended to display WordPress datas. I blocked this for security reasons. It aims to give you the ability to show custom datas from custom tables. I had to extract informations from an ERP and display them.

How can I force the plugin to shows WP tables ?

You can remove the security check line 58 by deleting or substr($atts['from'], 0,strlen($wpdb->prefix)) === $wpdb->prefix

Why the language doesn’t change?

You probably misstyped the language name. Make sure you write it exactly with the correct name.
Refer to : https://www.datatables.net/plug-ins/i18n/

E.g for french : //cdn.datatables.net/plug-ins/1.10.10/i18n/French.json , the parameter will be French with the first letter in uppercase.

Review feed

No reviews available

Screenshots

No screenshots available

Changelog

0.1

  • First version