[WordPress] 外掛分享: DbTable to DataTable

首頁外掛目錄 › DbTable to DataTable
30+
安裝啟用
★★★★★
5/5 分(4 則評價)
3688 天前
最後更新
問題解決
WordPress 4.4+ v0.1 上架:2016-02-11

內容簡介

這個外掛使用 DataTable jQuery 插件,可以讓你將 MySql 表格的內容顯示在可排序的 HTML 表格中。

安裝後,不需要進行任何設定,即可直接使用。

只要在文章或頁面中加入 shortcode [dbtable],就能顯示漂亮乾淨的表格。

範例:

所有包含多個值的參數都需要用逗號而不是空格分隔。

最少需求 : [dbtable from=MysqlTableName]

select=field1,field2,field3 會顯示表格的所有行,但只顯示指定的欄位
except=field1,field2,field3 會顯示表格的所有行,除了指定的欄位
cssClass=class1,class2 會將 class1 和 class2 新增到表格的 class 屬性中
comments=true|(false) 如果設為 true,則會使用 MySql 表格中每個欄位指定的註解作為 DataTable 的列名稱。如果設為 true 但缺少註解,則該插件僅回退到該欄位的名稱,而不是整個表格的名稱。
pagination=true|(false) 會顯示/隱藏底部分頁連結。如果設為 false,請確保 limit 參數足夠大,才能顯示所有資料。
limit=25 預設顯示 25 列。

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「DbTable to DataTable」→ 直接安裝(推薦)

原文外掛簡介

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.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon