ka2
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom DataBase Tables] Update data redirectionI see. Thank you for reporting.
Please change code since the last time to following.
function my_cdbt_shortcode_custom_component_options( $component_options, $shortcode_name, $table ){ if ( is_admin() && $shortcode_name === "cdbt-edit" ) { $component_options['actionUrl'] = admin_url( str_replace( '/wp-admin', '', $component_options['actionUrl'] ) ); } return $component_options; } add_filter( 'cdbt_shortcode_custom_component_options', 'my_cdbt_shortcode_custom_component_options', 10, 3 );I think probably your problem will resolve by this code.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Can't operate with a DatabaseUmm, does the “Import Existing Table” appear in bottom option on “create table” tab?
That table maybe does not exist in database if not appear table that want to import in selectable list in that option.
Please chack it once more.
Forum: Plugins
In reply to: [Custom DataBase Tables] Show/Insert data for a specific IDSorry for my late reply.
For example, there is below permalink to link when clicked supplier of “Sony”.
http://{your_registration_page_url}?id=2Then, it has placed a shortcode “cdbt-entry” in your registration page.
Also, it’s as follows for filtered to render shortcode after retrieve param on url.
function my_shortcode_custom_forms( $elements_options, $shortcode_name, $table ){ $filtered_tables = [ 'your_table_name' ]; $target_shortcodes = [ 'cdbt-entry' ]; if ( in_array( $shortcode_name, $target_shortcodes ) && in_array( $table, $filtered_tables ) ) { $_supplier_id = isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0; foreach ( $elements_options as $_i => $_option ) { if ( 'supplier_id' === $_option['elementName'] ) { $elements_options[$_i]['elementType'] = 'hidden'; $elements_options[$_i]['defaultValue'] = $_supplier_id; } } } return $elements_options; } add_filter( 'cdbt_shortcode_custom_forms', 'my_shortcode_custom_forms', 10, 3 );Please try it.
Thank you,Forum: Plugins
In reply to: [Custom DataBase Tables] Update data redirectionHi there,
I probably understood the cause of your problem by provided screenshot.
That’s contained the “inner” as middle path in your permalink structure.Please try to add code in your functions.php as follews:
function my_cdbt_shortcode_custom_component_options( $component_options, $shortcode_name, $table ){ if ( is_admin() && $shortcode_name === "cdbt-edit" ) { $component_options['actionUrl'] = admin_url( $component_options['actionUrl'] ); } return $component_options; } add_filter( 'cdbt_shortcode_custom_component_options', 'my_cdbt_shortcode_custom_component_options', 10, 3 );Also, because your problem have not related in “.htaccess”, please remove the modified code in past.
Thank you,
- This reply was modified 9 years, 8 months ago by ka2.
Forum: Plugins
In reply to: [Custom DataBase Tables] How to Properly View/ Edit The Table?Umm, does the “save Contact Form 7” plugin broke by importing table to the “Custom DataBase Tables”?
When I tried that, there was working correctly.
If data of the table created by the “save Contact Form 7” plugin had broken, “Custom DataBase Tables” probably cannot manage that data. It’s really too bad, but I must confess my inability to help you.
Forum: Plugins
In reply to: [Custom DataBase Tables] Fatal error in cdbt-edit on line 364Thank you for your inquiry.
You should enable ajax loading option in the shortcode (of view/edit), if you want to handle the table that has large data via shortcode.
Please modify your shortcode to as follows:[cdbt-edit table="cantacts" limit_items="1" ajax_load="true"]Thank you,
- This reply was modified 9 years, 8 months ago by ka2.
Forum: Plugins
In reply to: [Custom DataBase Tables] Disabling popup window after data updatingThank you for your inquiry.
Unfortunately, in the current plugin version, that cannot disable the popup modal dialog on the front-end.
However, as you said, I have been recognizing some problems to originate from redirection related in the popup modal. Therefore, I’m going to refactor the system of notification via modal in the near future.
Yet, because I have other some task with high urgency, I need a little more time for improving the notification. I’m sorry.Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] How to Properly View/ Edit The Table?Sorry I kept you waiting.
I had tried the “Save Contact Form 7” plugin. Then, I understood that is able to support your request.
That procedure is the following steps:
1. Navigate to the “Create Table” tab of the “CDBT Tables Management”.
2. Click of “Import Table” button after choose a table named “savecontactform7_1” at the “Import Existing Table” section.
3. Navigate to the “CDBT Shortcodes Management”, then you will be able to register shortcode of that imported table.That’s it. Please try it.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] How to Properly View/ Edit The Table?Thank you for your inquiry.
You want to use shortcode of this plugin on submitted data by the “Save Contact Form 7” plugin. Is my understanding correct?
Because I don’t know that “Save Contact Form 7” plugin is saved data to which table of database, maybe I cannot correctly support you at this time. However, I’m going to try to use the “Save Contact Form 7” as test. Then I will answer.
Sorry, please wait for until that.Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Show/Insert data for a specific IDHi there,
Yes, you understand. You should insert to the functions.php in your theme.
Please try it,
Forum: Plugins
In reply to: [Custom DataBase Tables] Show/Insert data for a specific IDThank you for your inquiry.
Yes, you can that both.
1) How to customize view data by getting GET param.
function my_filter_cdbt_shortcode_query_conditions( $conditions, $narrow_operator, $shortcode_name, $table ){ $filtered_tables = [ 'my_table_name' ]; $target_shortcodes = [ 'cdbt-view', 'cdbt-edit' ]; $userid_column_name = 'my_user_id_column'; if ( in_array( $shortcode_name, $target_shortcodes ) && in_array( $table, $filtered_tables ) && 'and' === $narrow_operator ) { $_current_user_id = isset( $_GET['ID'] ) ? intval( $_GET['ID'] ) : 0; if ( empty( $conditions ) ) { $conditions[$userid_column_name] = $_current_user_id; } else { $conditions = array_merge( $conditions, [ $userid_column_name => $_current_user_id ] ); } } return $conditions; } add_filter( 'cdbt_shortcode_query_conditions', 'my_filter_cdbt_shortcode_query_conditions', 10, 4 );Please refer too this:
https://wordpress.org/support/topic/how-to-show-only-current-user-records-from-db/
2) How to customize entry form by getting GET param.
– For example, fills with “supplier_id” as hidden field.
function my_shortcode_custom_forms( $elements_options, $shortcode_name, $table ){ $filtered_tables = [ 'articles' ]; $target_shortcodes = [ 'cdbt-entry' ]; if ( in_array( $shortcode_name, $target_shortcodes ) && in_array( $table, $filtered_tables ) ) { $_supplier_id = isset( $_GET['supplier_id'] ) ? intval( $_GET['supplier_id'] ) : 0; foreach ( $elements_options as $_i => $_option ) { if ( 'supplier_id' === $_option['elementName'] ) { $elements_options[$_i]['elementType'] = 'hidden'; $elements_options[$_i]['defaultValue'] = $_supplier_id; } } } return $elements_options; } add_filter( 'cdbt_shortcode_custom_forms', 'my_shortcode_custom_forms', 10, 3 );Thank you,
- This reply was modified 9 years, 8 months ago by ka2.
Forum: Plugins
In reply to: [Custom DataBase Tables] Update data redirectionHi there,
If you are blocked to access specific files by using as like “.htaccess”. Please check whether the “wp-admin.php” is allowed by using in ajax process.
Please try to refer below:
https://wordpress.org/support/topic/using-htaccess/
Thank you
Forum: Plugins
In reply to: [Custom DataBase Tables] Administrator with no permision to editThank you very much for reporting.
Certainly, as you said that is like doubtful behavior.
Then, please tell me such your table’s accessable permission. You can check that at the “Table Settings Modification” section in the “Modify Table” tab.Thank you for taking care of it.
Forum: Plugins
In reply to: [Custom DataBase Tables] Custom table pluginThank you for your inquiry.
If you use the “Custom DataBase Tables” plugin, you should use the built-in method that plugin.
For example, it’s as follows:<?php global $cdbt; $sql = "SELECT SQL_CALC_FOUND_ROWS ID,user_nicename,user_email,display_name FROM wp_pprgu2_users WHERE user_nicename LIKE 'cs%'"; // Matchies rows as integer $rows = $cdbt->run_query( $sql ); // Matchies row data as array $data = $cdbt->run_query( $sql, 'PDO' );Notice: if you use the “run_query” method, you cannot get number of rows with issuing the “SELECT FOUND_ROWS()” query after using “SQL_CALC_FOUND_ROWS” query.
Thank you,
- This reply was modified 9 years, 8 months ago by ka2.
Thank you very much for reporting.
Please try to change to uncheck “jQuery” of the “Loading Resources” option.
In the publishing current version, we have not tested in 4.6 yet.
Also, we’ll publish newly version sometime soon.