ka2
Forum Replies Created
-
Forum: Plugins
In reply to: [Custom DataBase Tables] Form to edit data (not showing)I apologize for the inconvenience.
The way to disable ajax option in the administrator screen is as follows;
Please change to “Repeater Layout” at the “Data List Format” option in the “General Plugin Settings” on the “CDBT Plugin Options”.Thank you,
Thank you very much for reporting.
Sorry, there are occurred several troubles currently when using the ajax option. I’m going to fix some bugs of handling of ajax on the next version. Please leave uncheck the ajax option until then.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] bootstrap css2) について、症状が発生しているページのURLを教えていただけたりしますか?
どのような状況なのか確認してみたいです。もしURLの開示がこのフォーラム上では都合が悪い場合、support@ka2.orgまでメールいただいても構いません。
ご検討いただけると幸いです。
Forum: Plugins
In reply to: [Custom DataBase Tables] bootstrap cssお問合せありがとうございます。
下記、ご質問の順に返答させていただきます。
> 1)上記の対策はあるでしょうか。
次の手順に沿ってフィルターフックを追加してみてください。
1. プラグイン設定 -> 一般設定 -> 読み込みリソース の設定項目にて、フロントエンド画面のリソースにチェックをすべて入れます(デフォルトのまま)。
2. テーマのfunctions.php等に下記のフィルターフックを追加します。function my_custom_assets( $assets ) { $assets['styles']['bootstrap-style'] = array( 'あなたのカスタマイズしたCSSファイルのパス', ['cdbt-main-style'], '', 'all' ); return $assets; } add_filter( 'cdbt_assets', 'my_custom_assets' );もし管理画面にもカスタムCSSを適応したい場合は、
add_filter( 'cdbt_admin_assets', 'my_custom_assets' );も追加してください。
これで、ユーザー定義のスタイルシートが一番最後に読み込まれるようになるので、スタイル定義がオーバーライドされます。なお、フィルターフック「cdbt_assets」を使うことで、読み込みリソースの読み込み順序や依存関係等をフルカスタマイズすることが可能です。
> 2)datepickerも、管理画面は、Fuel UXのものなのに、
> 野暮ったいかんじのものになります。datepickerのスタイルはcdbt-fuelux-style-cssで定義されていて、スタイルシートの依存関係は下記のようになっています。
* cdbt-fuelux-style-css
└ cdbt-main-style-css (内部でbootstrap、fontawesome、プラグイン用のカスタムスタイルがマージされています)そのため、前述の1)の対応を行うと、この依存関係の後にあなたのカスタムスタイルが適応されます。もしあなたのカスタムスタイルのセレクタにdatepickerのスタイル用のセレクタが重複定義されていなければ、管理画面と同様にFuelUXスタイルのdatapickerが表示されると思います。
> 3)おなじく、datepickerの年月日表示に関して、
datepickerの日付表示はJavaScriptライブラリ「moment.js」に依存していて、プラグイン設定の「日時の表示書式」の影響を受けないため、申し訳ありませんが、現状は仕様です。
datepickerの日付表示の書式変更ができるかどうか調査して、もし可能であれば次のバージョン等で機能追加してみます。以上、試してみてください。
Forum: Plugins
In reply to: [Custom DataBase Tables] Failed to create tableThank you for providing.
Well, the CREATE TABLE query has worked correctly.
Therefore, if it does not exist data that matching string as like “profession” in slug column on your “wp_cf_form_entry_values” table, such columns will have null after creating table.
What data have in your “wp_cf_form_entry_values” table?
Also, how do you want to create table and have data?Please tell me if you like.
Forum: Plugins
In reply to: [Custom DataBase Tables] Failed to create tableHi there,
Please show me the “CREATE TABLE” statement of table that created correctly, if I may.
Thank you in advance.
Forum: Plugins
In reply to: [Custom DataBase Tables] Form to edit data (not showing)Thank you very much for reporting.
Sorry, I think that phenomenon that you said is likely bug occured by the ajax load option. Therefore, you should set the “ajax_load=false” in the shortcode.
Also I’m going to fix about that bug at next version.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] allow other roles to access CDBTThank you for your inquiry.
Actually, this CDBT plugin has filter of user capability for the administrator menu.
The way to use is as follows:function custom_cdbt_operating_capability( $capability ){ $capability = 'edit_posts'; // enable access by contributor return $capability; } add_filter( 'cdbt_operating_capability', 'custom_cdbt_operating_capability' );However, it may be not able to manage the table by set permission in each table, even though user that is allowed to access cdbt menu.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Display a single recordThank you for your inquiry.
In the “cdbt-view” shortcode options, you should set 1 to “Max Rows Per Page”. However, if that table has multiple row (record), it’s displayed the pager or the pagination. If you want to show an unique row only, you should narrow down optimal data by using “Narrow-down Keywords” option.
Also, example of shortcode is as follows:
[cdbt-view table="your_table_name" limit_items="1"][cdbt-view table="your_table_name" narrow_keyword="ID:2" limit_items="1"]Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Custom DataBase Tables, Failed to create tablePlease see below because I answered.
https://wordpress.org/support/topic/failed-to-create-table-4?replies=2
Forum: Plugins
In reply to: [Custom DataBase Tables] How do I not require data in add or update screens?I am sorry I haven’t been in touch for a while.
The easiest way to do this, is to modify the table’s column as entry field.
In the modify table tab on the tables management, you should issue a query below.ALTER TABLE your_table_name MODIFY target_column_name varcahr(255) DEFAULT '';Note: the column definition depend on your table schema.
Please try it.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Failed to create tableI’m so sorry for not replying sooner.
Your sql query for creating table is likely mistake as syntax. It has occured the syntax error when I have directly tried your query on mysql client.
I think that you should modify to correctly sql query.
Thank you,
I think that’s a very hard thing to do.
Firstly, please allow me to check that my understanding is correct or not.
In summary, do you want to change any entry fields dynamically depending on a value that is choose at the “CLIENTE” field?
If so, I have a good idea.
Firstly, it post once value of “CLIENTE” field by using on change event of JavaScript to self page. The sample JavaScript code is below:
function my_coustom_footer_scripts(){ ?> <script> $('#entry-data-CLIENTE').on('changed.fu.selectlist', function () { var html; html += '<form method="get" action="'+ window.location.href +'" id="regenerate" style="display: none">'; html += '<input type="hidden" name="choose_cliente" value="'+$(this).selectlist('selectedItem').value+'">'; html += '</form>'; $("body").append(html); $('#regenerate').submit(); $('#regenerate').remove(); }); </script> <?php } add_action('wp_print_footer_scripts', 'my_coustom_footer_scripts');Then, you should insert code to get the “CLIENTE” value to your filter hook of “custom_pruebaese_form”. The sample filter hook code is below:
function custom_pruebaese_form ($elements_options, $shortcode_name, $table ){ if ( 'Prueba ESE Formulario' === get_post()->post_title && 'cdbt-entry' === $shortcode_name && 'pruebaese' === $table ) { $current_cliente_value = isset( $_GET['choose_cliente'] ) && ! empty( $_GET['choose_cliente'] ) ? $_GET['choose_cliente'] : null; ... } add_filter( 'cdbt_shortcode_custom_forms', 'custom_pruebaese_form', 10, 3 );How is my proposal?
I hope I can be of assistance.Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] How to customize the dateThank you for your inquiry.
How to use the new filter of “cdbt_shortcode_datetime_format” is as follows:
1. the case of filtering by the table name and the column name.
function custom_filter_datetime( $datetime_format, $column, $column_type, $shortcode_name, $table ){ if ( 'your_table_name' === $table && 'date_column_name' === $column ) { $datetime_format = 'M j, Y g:i A'; } return $datetime_format; } add_filter( 'cdbt_shortcode_datetime_format', 'custom_filter_datetime', 10, 5 );2. the case of filtering by the type format of column.
function custom_filter_datetime( $datetime_format, $column, $column_type, $shortcode_name, $table ){ if ( 'date' === $column_type ) { $datetime_format = 'M j, Y'; } return $datetime_format; } add_filter( 'cdbt_shortcode_datetime_format', 'custom_filter_datetime', 10, 5 );Please try it.
Thank you,
Forum: Plugins
In reply to: [Custom DataBase Tables] Not able to see table after importing tableHi,
Is that a primary key column in your table does not have the attribute of auto_increment, and do you want to use that column as if auto_increment column?
If another columns in that table have no auto_increment, it’s most easy that you will add an attribute of “auto_increment” to already primary key column.
In that case is:
1. Go to the “Modify Table” tab at the “CDBT Tables Management” screen.
2. Choose the table you want to modify, then Click to “To Modify Table”.
3. Please enter to the “SQL Query” as follows:ALTER TABLE your_table_name MODIFY your_primary_key_column bigint(20) unsigned NOT NULL AUTO_INCREMENT;4. Click to the “Modify Table Schema”.
A column that has attribute of “auto_increment” is not displayed in the entry forms.
Thank you,