ka2
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom DataBase Tables] Custom DataBase Tables cdbt-entryThank you very much for reporting.
This problem has supported by the latest version 2.0.4. Please check it.
Forum: Plugins
In reply to: [Custom DataBase Tables] Shortcode displays before the text that precedes it.Thank you very much for reporting.
This problem has supported by the latest version 2.0.4. Please check it.
Forum: Plugins
In reply to: [Custom DataBase Tables] Can't validate Edit popupI apologise for the delay in replying to you.
This problem has supported by the latest version 2.0.4. Please check it.
Forum: Plugins
In reply to: [Custom DataBase Tables] English versionI apologise for the delay in replying to you.
This problem has supported by the latest version 2.0.4. Please check it.
Forum: Plugins
In reply to: [Custom DataBase Tables] Dynamically opening CDBT in modal pageHi there,
Please try the way that it’ll expand the shortcode in the return value of the function “custom_shortcode_insertion()”. For example, as described below:
return do_shortcode($post_content);Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Dynamically opening CDBT in modal pageSorry for my late reply.
Your requests can be achieved by the following as.
First, you will create a new post to become as container into inserting shortcode. For example, on this post name will name the “shortcode-insertion”. Also, The content body of this post is nothing.
Then, you markup the JavaScript to invoke the modal as follows.
$('.myNewModal').on('click', function(event){ event.preventDefault(); $('#myNewModal').find('.modal-body').html('<iframe src="/shortcode-insertion/?table=' + $(this).attr('value') + '" width="100%"></iframe>').end().modal('show'); });Finally, you add a filter to dynamically generate a shortcode from the table name that received in the GET query. You should add to the place where is “functions.php” in your theme.
function custom_shortcode_insertion( $post_content ){ if ('shortcode-insertion' === $GLOBALS['post']->post_name) { if (array_key_exists('table', $_GET) && !empty($_GET['table'])) { $post_content = sprintf('[cdbt-entry table="%s"]', $_GET['table']); } } return $post_content; } add_filter( 'the_content', 'custom_shortcode_insertion' );Please try as above.
Forum: Plugins
In reply to: [Custom DataBase Tables] Open links in modal pop-up pageI will explain in more detail the below full code.
function custom_column_definitions( $columns, $shortcode_name, $table ) { if ('{your_table_name}' === $table || 'cdbt-view' === $shortcode_name) { foreach ($columns as $_i => $_column) { if ('{column_name}' === $_column['property']) { $_custom_column_renderer = '\'<a href="\' + rowData.'. $_column['property'] .' + \'" class="myCustomModal">\' + rowData.'. $_column['property'] .' + \'</a>\''; $columns[$_i]['customColumnRenderer'] = $_custom_column_renderer; break; } } } return $columns; } add_filter( 'cdbt_shortcode_custom_columns', 'custom_column_definitions', 10, 3 ); function custom_footer(){ echo <<<EOH <div class="modal fade" id="myModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"></div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> <script> jQuery(document).ready(function($) { $('.myCustomModal').on('click', function(event){ event.preventDefault(); $('#myModal').find('.modal-body').html('<embed src="' + $(this).attr('href') + '"></embed>').end().modal('show'); }); }); </script> EOH; } add_action('wp_footer', 'custom_footer', 99);- {your_table_name}: Table name that you want to operate.
- {column_name}: Column name that you want to add a link. (In that column must be stored URL)
Note: the shortcode does not have to change anything.
Forum: Plugins
In reply to: [Custom DataBase Tables] Multiple copies of JQuery loadingThat’s certinly true.
In the next version, I’m going to add an option that you can choose whether to use the jQuery of this plugin, or the jQuery that is bundled within the WordPress core. As a result, I believe that multiple jQuery will be able to avoid conflicts due to be loaded.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Open links in modal pop-up pageSorry to keep you waiting.
I’ll immediately explain as follow;Firstly, it is a way to add a link to a specific column of the displayed table by the shortcode. You can be achieved by adding a filter hook as described below. The place where you add is in the “functions.php” of your theme.
function custom_column_definitions( $columns, $shortcode_name, $table ) { if ('wp_post' === $table || 'cdbt-view' === $shortcode_name) { foreach ($columns as $_i => $_column) { if ('post_title' === $_column['property']) { $_custom_column_renderer = '\'<a href="\' + rowData.'. $_column['property'] .' + \'" class="myCustomModal">\' + rowData.'. $_column['property'] .' + \'</a>\''; $columns[$_i]['customColumnRenderer'] = $_custom_column_renderer; break; } } } return $columns; } add_filter( 'cdbt_shortcode_custom_columns', 'custom_column_definitions', 10, 3 );Then, add the process to open the modal dialog into JavaScript side.
For example, how about you like follow.function custom_footer(){ echo <<<EOH <div class="modal fade" id="myModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"></div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> <script> jQuery(document).ready(function($) { $('.myCustomModal').on('click', function(event){ event.preventDefault(); $('#myModal').find('.modal-body').html('<embed src="' + $(this).attr('href') + '"></embed>').end().modal('show'); }); }); </script> EOH; } add_action('wp_footer', 'custom_footer', 99);Please try it.
Forum: Plugins
In reply to: [Custom DataBase Tables] Multiple copies of JQuery loadingBy using the “cdbt_assets” filter, you can change the loading of JavaScript and CSS in a particular page. Filter hook is available by adding to the “functions.php” in your theme as follows.
function custom_load_assets( $assets ) { if (is_singluar()) { unset($assets['scripts']['cdbt-jquery']); } return $assets; } add_filter( 'cdbt_assets', 'custom_load_assets' );At the above example, in the singluar page does not load the jQuery that is bundled with the cdbt plugin. However, in order to carry out the processing of CDBT plugin you need to load a separate jQuery.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Multiple copies of JQuery loadingThank you for your inquiry.
I was also concerned that JavaScript conflicts occurs depending on the themes and other plugins.
Therefore I am going to add the options that is able to corresponding to the script
conflicts to the management screen since the next version.Please wait for a while.
Forum: Plugins
In reply to: [Custom DataBase Tables] How to use Web API RequestVery sorry,
There was a problem with the method of “find_data()”.
It also did not correspond to WebAPI call by the multi-byte characters. These will fixed in the next version.
Please wait for a while.
Forum: Plugins
In reply to: [Custom DataBase Tables] How to use Web API RequestHi,
I released the version 2.0.3 that is fixed some bugs around the WebAPI processes.
Please try brand new version.
Forum: Plugins
In reply to: [Custom DataBase Tables] virus in plugin ???The modified version 2.0.3 has been released.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Open links in modal pop-up pageSorry for my late reply.
You can change the markup tags style at each rendered columns by adding a filter hook since version 2.
Since I describes way for this approach ASAP, please wait.thank you,