dwood
Forum Replies Created
-
Ended up solving this as follows (“BSNKind” is a 9-digit unique field) in a cfdb_form_data filter:
/* Delete possible existing submission for same BSN. */ $bsn = $form_data->posted_data["BSNKind"]; if (!empty($bsn) && preg_match("/^\d{9}$/", $bsn)) { $submit_time = $wpdb->get_var("SELECT DISTINCT(submit_time) FROM wp_cf7dbplugin_submits WHERE field_name = 'BSNKind' AND field_value = '$bsn'"); /* LIMIT 21 is a hacky attempt to prevent a disaster if * there's something wonky with $submit_time... Submission * currently has max 21 fields. */ if (!empty($submit_time) && is_numeric($submit_time)) $wpdb->query("DELETE FROM wp_cf7dbplugin_submits WHERE submit_time = $submit_time LIMIT 21"); }Does that all look safe enough, or is there any way I could end up lying face-down in a pool of blood somewhere with an empty database…? 😉
Thanks,
David
Hi Michael,
Uploaded.
Cheers,
David
Hmmm, possibly partially answering my own question ;-), in the function “is_already_submitted” on http://cfdbplugin.com/?page_id=904 you iterate through a filtered set looking for the unique value in question. If you find it, you set $found = true. Is there any way I could just do a delete there, or is that validation code read-only? Then instead of “if already exists update; else insert” I could just do “if already exists delete; then insert no matter what”…
Thanks,
David
And just a quick follow-up question related to the original post. If date-format dd-MM-yyyy is supportable, which would give something like “28-September-1966”, is it also possible to replace those dashes with spaces, so you end up with “28 September 1966”? If so, how would you do that? Quotes around the date-format string, so:
date-format:”dd MM yyyy”
?
Thanks,
David
Forum: Plugins
In reply to: [EWWW Image Optimizer] Bulk Optimize Not WorkingGood news, I’m unstuck, and it appears indeed to be a memory issue… I added:
define(‘WP_MEMORY_LIMIT’, ‘128M’);
to wp-config.php, doubling my available memory and voilà, image import worked… 🙂
Thanks in any case for the excellent, prompt support… 🙂
Cheers,
David
Forum: Plugins
In reply to: [EWWW Image Optimizer] Bulk Optimize Not WorkingHi Shane,
Hmmm, still no joy with 1.8.4, same symptoms, namely:
– Go to /wp-admin/upload.php?page=ewww-image-optimizer-bulk .
– Click on “Import images”.
– Status msg “Importing” and a spinning circle.
Media library size is 2,300 images, so not huge.
If there’s any way I can help with debugging or whatever, please just let me know…
Thanks,
David
Forum: Plugins
In reply to: [EWWW Image Optimizer] Bulk Optimize Not WorkingHi Shane or colleague,
For what it’s worth, I’m seeing identical symptoms with 1.8.3. Ad-hoc optimization works fine, but bulk optimize just shows a spinning “importing” icon after clicking on the import button.
If I can help with a log or anything, please just let me know…
Cheers,
David