ka2
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom DataBase Tables] Error With Latest VersionYou can get past all the version from the following link.
https://wordpress.org/plugins/custom-database-tables/developers/
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Support for JoinsThank you for your inquiry.
Sorry, in the currently plugin you will not be able to enter the data to the multiple tables at the same time.
Forum: Plugins
In reply to: [Custom DataBase Tables] Error With Latest VersionAlso, the latest version plugin do work at PHP 5.4 or more.
If you are using a version earlier than PHP 5.3 and you can not upgrade, please use a version 1.x of plugin.
Forum: Plugins
In reply to: [Custom DataBase Tables] Error With Latest VersionThank you very much for reporting.
Oh surely, there was a syntax mistake in such very first place. I’m so sorry.
“b” within the specified namespace had become to lowercase.Current wrong code:
CustomDatabaseTables\Lib\factory( 'set_global' );Correct code:
CustomDataBaseTables\Lib\factory( 'set_global' );Until the next bug fix version releasing, I think to work with that.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Did not update the data id:Oh, sorry, version 2 will work with PHP5.4 or more.
Because it uses the “trait” and “closure bind” features that have been implemented in php5.4, it is not work in 5.3.
Actually there is no excuse, please correspond with the version up of PHP.
Forum: Plugins
In reply to: [Custom DataBase Tables] show data table by user idOh, It differences is insertion place of the filter.
Did you use plugin versions 1.1.15?The filter needs to be added to the get_data within the method of cdbt.class.php.
The right place is as follows:function get_data($table_name, $columns='*', $conditions=null, $order=array('created'=>'desc'), $limit=null, $offset=null) { global $wpdb; list(, , $table_schema) = $this->get_table_schema($table_name); $select_clause = is_array($columns) ? implode(',', $columns) : (!empty($columns) ? $columns : '*'); $where_clause = $order_clause = $limit_clause = null; if (!empty($conditions)) { $i = 0; foreach ($conditions as $key => $val) { if (array_key_exists($key, $table_schema)) { if ($i == 0) { $where_clause = "WHERE <code>$key</code> = '$val' "; } else { $where_clause .= "AND <code>$key</code> = '$val' "; } $i++; } else { continue; } } } $where_clause = apply_filters( 'cdbt_get_data_conditions', $where_clause, $table_name, $conditions ); if (!empty($order)) { $i = 0; foreach ($order as $key => $val) { if (array_key_exists($key, $table_schema)) { $val = strtoupper($val) == 'DESC' ? 'DESC' : 'ASC'; if ($i == 0) { $order_clause = "ORDER BY <code>$key</code> $val "; } else { $order_clause .= ", <code>$key</code> $val "; } $i++; } else { continue; } } } if (!empty($limit)) { $limit_clause = "LIMIT "; $limit_clause .= (!empty($offset)) ? intval($offset) .', '. intval($limit) : intval($limit); } $sql = sprintf( "SELECT %s FROM <code>%s</code> %s %s %s", $select_clause, $table_name, $where_clause, $order_clause, $limit_clause ); return $wpdb->get_results($sql); }After correct the position of the filter, please try again.
Forum: Plugins
In reply to: [Custom DataBase Tables] Did not update the data id:Thank you very much for reporting.
Sorry, this plugin has bug if the column definition has included of “default null” in the varsion 1.x.
Because that bug is fixed by the upcoming version 2, please wait more little until releasing version 2.
Or, you can download the preceding trial version before releasing public version from follow url.
Forum: Plugins
In reply to: [Custom DataBase Tables] show data table by user idHmm…that’s troubling, isn’t it.
Please confirm one point.
Do you specify a table name that you want to filter the table name in the condition of “if” statement on the source that you have added to “functions.php” in your theme?If there is no problem in the above table name specification, please let me know the results of the debug code below.
function custom_get_data_conditions( $where_clause, $table_name, $conditions ){ $current_user = wp_get_current_user(); if ('your_created_table' === $table_name) { if (empty($conditions)) { $where_clause = sprintf( "WHERE userID = %d ", $current_user->ID); } else { $where_clause .= sprintf( "AND userID = %d ", $current_user->ID); } } var_dump($where_clause); return $where_clause; } add_filter( 'cdbt_get_data_conditions', 'custom_get_data_conditions', 10, 3);By this code, I have put a debugging code at “var_dump” to display the variable of
$where_clausebefore that is returned.Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Failed to add the data.Thank you for your inquiry.
If you can not import csv, please check whether the format of the csv file is the text format and character code is utf8.
If you can’t register data from the administration screen, please check whether a table that you want to input has been selected as a management target.
Sorry to trouble you, I may be able to help you if you tell me a more detailed situation.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Failed to create tableThank you for your inquiry.
Please tell me sql statements of create table when you have failed. I might be able to help you if I will get it.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] show data table by user idThank you for your inquiry.
It will be possible to do by following.
1. Firstly, it’ll add a filter into 909th line of plugin core class (lib/cdbt.class.php).
$where_clause = apply_filters( 'cdbt_get_data_conditions', $where_clause, $table_name, $conditions );2. Next, please enabled a filter by “functions.php” of your theme into the user access page (post to use the shortcode cdbt-view).
function custom_get_data_conditions( $where_clause, $table_name, $conditions ){ $current_user = wp_get_current_user(); if ('your_created_table' === $table_name) { if (empty($conditions)) { $where_clause = sprintf( "WHERE userID = %d ", $current_user->ID); } else { $where_clause .= sprintf( "AND userID = %d ", $current_user->ID); } } return $where_clause; } add_filter( 'cdbt_get_data_conditions', 'custom_get_data_conditions', 10, 3);Please try by all means.
Thank you,Forum: Plugins
In reply to: [Custom DataBase Tables] cdbt_api_key not workingI’m so sorry for not replying sooner.
By the report from you, I’ve found that there is a bug in the processing of WEB API when not logged in.
I will try to fix that bug which releasing the version 2.
Sorry, please wait for a while.Forum: Plugins
In reply to: [Custom DataBase Tables] Settings buttons disabledHi there,
If the “Enable Tables List” page was blank, you have not created a table yet. In this plugin, you firstly have to create a new table.
Thank you.
Forum: Plugins
In reply to: [Custom DataBase Tables] Settings buttons disabledThank you for your inquiry.
The menu buttons of “Input data”, “View data” and “Edit data” will be enabled after selecting manageable table. From the tab of “Enable tables list” in “Setting”, please click the specific button of “Set Current Table”. By that table is enabled, each buttons as the “Input data” button will become the enable.
Please try it.
Forum: Plugins
In reply to: [Custom DataBase Tables] Search with Extract?Thank you for your inquiry.
I saw the URL you have provided.
I seem the structure of hyperlink addition to the “Product Name” items in the list of on your site, it is to replace of the value of the “full-content” when clicking on an element of the “text-collapse” class. For example is as follow:<td> <p class="text-collapse" full-content="<a href="{permalink_url}" target="_blank"> {value}</a>"> {value} </p> </td>However, the currently hyperlink additions has been fired after clicking the value of the cell in the “Product Name” column. If this event type will be changing to on-load type, then the hyperlink additions immediately after rendering the list has been activated.
For example, I recommend that added of JavaScript (jQuery) as described below.<script> jQuery(document).ready(function($){ $('td p.text-collapse').each(function(){ if ('' !== $(this).attr('full-content')) { $(this).replaceWith($(this).attr('full-content')); } }); })(); </script>