Michael Simpson
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form DB] Adding Values, Return 0I can’t think of a quick way. I think you have to add a custom transform function like this:
require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBPermittedFunctions.php'); function zero_if_null($x) { return is_null($x) ? 0 : $x; } cfdb_register_function('zero_if_null');so you can add in the “trans”:
Value=zero_if_null(Value)Forum: Plugins
In reply to: [Contact Form DB] problem when exporting xlsx and csv fileA couple thoughts:
Try renaming the file without the & and accent characters.
If your WP install is in DEBUG mode, it may output unwanted debug text at the beginning of the file making it look corrupt. If you open the file in a text editor, you can see if there is any suspicious test at the top of the file.
Forum: Plugins
In reply to: [Contact Form DB] Security & this pluginFair enough. Prepared statements are used to protect against SQL injection.
Forum: Plugins
In reply to: [Contact Form DB] problem when exporting xlsx and csv fileCSV: you may need to set the delimiter character when exporting. It is either comma or semicolon depending on your region. It is possible that WP thinks you are in on region, and Excel in another, so Excel does not read the delimiter right. Alternately, when opening a CSV file in Excel, open a blank document in Excel, then import the file. A dialog should appear that allows you to indicate the delimiter in the file.
The error with .xlsx is news to me. What error are you getting? Do you mind sharing the spreadsheet? Email: info@cfdbplugin.com
Forum: Plugins
In reply to: [Contact Form DB] problem when exporting xlsx and csv fileUpgrade from what to what?
What delimiter are you expecting?
Forum: Plugins
In reply to: [Contact Form DB] Security & this pluginThe plugin does not interact with any other tables. (Technically it does save settings to wp_options like all plugins but it does this thru a WP API, not the DB directly).
A security compromise could conceivably allow an attacker to read or maybe delete from this plugin’s own table of submissions but not any other table. There just isn’t any code in the pluggin dealing with any other table.
Forum: Plugins
In reply to: [Contact Form DB] Radio input, how to modify the filter shortcode?Here is an example form that can be used to search the data. You would have to adapt it to use a radio button.
Forum: Plugins
In reply to: [Contact Form DB] How to import data into another websiteCFDB saves its data in the table wp_cf7dbplugin_submits. You would have to import that table data into your new site.
Forum: Plugins
In reply to: [Contact Form DB] Filter is not workIf the user keyed in Blue Condo, the New Blue Condo data also show
The regular expression syntax
/.*$_POST(StudentLevel).*/specifically the “.*” matches any number of characters before or after the string. Its up to you to write a regular expression to suit your needs.
Forum: Plugins
In reply to: [Contact Form DB] New DatabaseRight, my point there is that the hook used in the example for changing data can be used to do something else with the data such as save it elsewhere (you write the code for the hook to do that). I just wanted you to be aware of that option in case it is helpful.
Forum: Plugins
In reply to: [Contact Form DB] maximum number of records limit in CFDB?CFDB does not enforce a limit. However if you have upwards of 100K records, it is possible that your PHP server will run out of memory during an .xlsx export. You would have to increase the memory. But the data is still in the database. You can archive the table from PHPMySQL: wp_cf7dbplugin_submits
Forum: Plugins
In reply to: [Contact Form DB] Activation generates "unexpected output" in WP 4.6It may mean that the plugin was unable to create tables in your DB that it needs. The database login does not have that role. It will try to make a table wp_cf7dbplugin_submits
Forum: Plugins
In reply to: [Contact Form DB] Log Referring URL?You can add a filter to do it:
http://cfdbplugin.com/?page_id=1337For CF7, there is CFDB setting to capture it.
Forum: Plugins
In reply to: [Contact Form DB] Filter is not workPlease start formatting your code with the code button in the post so I can more easily read it.
You still have an extra space after input AreaCovered.
If you input name is “StudentLevelToTeach” then in the shortcode you need to match $_POST(StudentLevelToTeach)
if the name of the field in the database is “Student Level To Teach” then you need to use that exactly.
Student Level To Teach~~/.*$_POST(StudentLevelToTeach)*./Do you see how to you have to make these things match?
Forum: Plugins
In reply to: [Contact Form DB] Filter is not work“Area Covered ” has a space in it