Archive for the ‘Plugin Extension’ category

Extension 6: Showing only rows that match a filter

March 4th, 2010

Some people have approached me with an idea like this one: They have a rather large table which they maintain as a list for some sort of items (e.g. products). On certain pages however, they do not want to show the entire table, but e.g. only items with a certain keyword in a column.

That’s the use case for which the following filtering extension can be used. It adds another parameter filter to the Shortcode that gets passed one or more search terms (connected with a logical operator):

[table id=1 filter="word1&&word2" /]

Then, only those rows of the table are shown, that have columns that exactly match the search term(s). In the example, only rows where one column has the exact value “word1″ and one column has the exact value “word2″, will be shown.
» Read more: Extension 6: Showing only rows that match a filter

Extension 5: How to use PHP in table cells

February 14th, 2010

This post in my WP-Table Reloaded Extension series should be very useful to a lot of people, taking into consideration the questions I receive on this. Using the code from below, you will extend WP-Table Reloaded so that PHP code in table cells will be parsed and executed. This is useful for dynamic content generation or integration of other plugins’ features.

To get started with WP-Table Reloaded Extensions, you should read the introduction and follow the included instructions. You will also find links to the other presented Extensions there.
» Read more: Extension 5: How to use PHP in table cells

Extension 4: Changing DataTables strings

February 9th, 2010

In this post of the WP-Table Reloaded Extensions series, I’ll show you a way to easily change the strings that the DataTables JavaScript library outputs around a table. This includes things like the “Search:”, “Showing i to j of n entries” and the other text strings.

To get started with WP-Table Reloaded Extensions, you should read the introduction and follow the included instructions. You will also find links to the other presented Extensions there.
» Read more: Extension 4: Changing DataTables strings

Extension 3: Changing the Table Shortcode

January 23rd, 2010

My second Extension to WP-Table Reloaded was actually pretty short and simple, so I decided to present another short one to make up for that :-) So, here you will see how you can change the used Shortcode from [table id=1 /] to e.g. [data id=1 /] or [ranking id=1 /].

To get started with WP-Table Reloaded Extensions, you should read the introduction and follow the included instructions. You will also find links to the other presented Extensions there.
» Read more: Extension 3: Changing the Table Shortcode

Extension 2: Custom Name in the Admin Menu

January 16th, 2010

In my second post of the series on WP-Table Reloaded Extensions, I will show you a way to change the name of the plugin in the WP Admin Menu.

Remember, Extensions are small code snippets that customize or extend the functionality of WP-Table Reloaded, by using the many “Plugin Hooks”. To get started, you should read the introduction on WP-Table Reloaded Extensions and follow the included instructions to set up the foundation. I also recommend reading the first post of this series, where I add an Automatic Converter for URLs to Links. You don’t need the code from there, but it might be helpful to better understand the concept.
» Read more: Extension 2: Custom Name in the Admin Menu