Is there a chance that the SPAMblock plugin will have better intergation with the Contcat form plugin? Including the specific error messages ("Field %s is missing"-style)
This would help a lot.
This problem occurs when using the "dynamicform.tpl" wirth a fully customized form, for the field names do not match names spamblock requires ([name], [email] ...)
Integrating SPAMblock with dynamic contact form/email check
Integrating SPAMblock with dynamic contact form/email check
Last edited by Huhu on Sun Jan 12, 2014 1:06 pm, edited 2 times in total.
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Integrating SPAMblock with contact form
Actually the spamblock plugin doesn't have support to output such specific messages, also because the plugin doesn't want to tipp of visitors what exactly triggered a spam responsone, to not let them easily work around that...
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Integrating SPAMblock with dynamic contact form
Ah, thanks! I meant the "Field XY left empty" error messages, those are specific in SPAMblock, or not?
Another issue: Inserting wrong CAPTCHA seems to call the "required field"-error message as well. I will have a look why that is the case ...
PS SPAMblock is affected by the Dynamic Form it seems, see updated first post. Any workaround?
Another issue: Inserting wrong CAPTCHA seems to call the "required field"-error message as well. I will have a look why that is the case ...
PS SPAMblock is affected by the Dynamic Form it seems, see updated first post. Any workaround?
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport
Re: Integrating SPAMblock with dynamic contact form
PPS.
input type="email"/"text"
the mail input field of the custom.tpl is set to
type="text"
instead of type="email".
Any specific reason for this? type="email" does a basic @-test, after all.
Dynamicform/SPAMblock
As for dynamicform.tpl: The Spamblock problem could be solved the field name could be specified in addition to the label text. Then one could set the label to "Your mail" but the field name to "email", thus enabling SPAMblock.
So the only workarount seems to be editing the custom.tpl instead of using dynamicform.tpl
Mail matching check
I have included a php code into seredipity_event_contactform.php to check email adresses. It seems to do the job, but again, dynamicform.tpl wouldn't work due to the lack of custom names for fields.
Thanks for help!
input type="email"/"text"
the mail input field of the custom.tpl is set to
type="text"
instead of type="email".
Any specific reason for this? type="email" does a basic @-test, after all.
Dynamicform/SPAMblock
As for dynamicform.tpl: The Spamblock problem could be solved the field name could be specified in addition to the label text. Then one could set the label to "Your mail" but the field name to "email", thus enabling SPAMblock.
So the only workarount seems to be editing the custom.tpl instead of using dynamicform.tpl
Mail matching check
I have included a php code into seredipity_event_contactform.php to check email adresses. It seems to do the job, but again, dynamicform.tpl wouldn't work due to the lack of custom names for fields.
Code: Select all
//Position:
function checkSubmit() {
global $serendipity;
if (empty($serendipity['POST']['commentform'])) {
return false;
}
// Here the new code for an email match test
if (($serendipity['POST']['email'] == $serendipity['POST']['email_again'])){
$from = $serendipity['POST']['email'] ;
$email = $serendipity['POST']['email_again'] ;
} else {
$serendipity['smarty']->assign(
array(
'is_contactform_error' => true,
'plugin_contactform_error' => PLUGIN_CONTACTFORM_ERROR_DATA
)
);
return false;
}
Post-apocalyptic Jugger sports: What is Jugger? Video I Free ebook on the sport