Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
com_connect - form and contact mailer
(formerly zem_contact / zem_contact_reborn)
This plugin is a general purpose contact form emailer. Use it to add a contact form to your site, capturing information from your visitors via text boxes, checkboxes, radio buttons, select lists, etc, then sending the results as plaintext messages to your inbox. You can also use it to share site articles.
The platform allows you to take things far further. Examples:
- Spam prevention.
- Construct HTML emails.
- Deliver messages via third party sites such as MailChimp.
- Offer list subscribe/unsubscribe.
- File attachments.
Please use this thread or the support issues queue to report issues with the plugin.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: com_connect - form and contact mailer
Hi Stef,
is the spam patterns extension supported in this plugin?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: com_connect - form and contact mailer
Yes, but not that version. It needs updating to make it work in com_connect:
register_callback('ext_com_connect_verify', 'comconnect.submit');
function ext_com_connect_verify()
{
$emailField = trim(ps('Email'));
$banPatterns = explode("\n", fetch_form('comcon_spam_patterns'));
$evaluation = &get_comconnect_evaluator();
// If the email address matches one of the given patterns, fail.
foreach ($banPatterns as $pattern) {
$pat = trim($pattern);
if ($pat && preg_match($pat, $emailField)) {
$evaluation -> add_comconnect_status(1);
}
}
return;
}
Swap the old verifier plugin code with the above (rename the plugin to ext_com_connect_verify
too if you like) and rename your Form that contains your blocklists to comcon_spam_patterns
. Should be good to go.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: com_connect - form and contact mailer
Thanks so much stef, I’ll experiment with it on another site first as zcr is currently used beyond our domain and I wouldn’t want to break anything for the next 19 months.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: com_connect - form and contact mailer
Hi Stef,
I’m having a problem trying to install the plugin. When clicking on the install button the site appears to freeze and then I get a 403 Forbidden message (You don’t have permission to access /textpattern/index.php on this server.) and the server is unresponsive…
(Using Textpattern 4.6.2)
Offline
Re: com_connect - form and contact mailer
Looks like it the hosting – apparently it triggered some security rules… trying to get some more detail now.
Offline
Re: com_connect - form and contact mailer
Not sure if this has been answered before as a search did not bring results – I was wondering if its possible to style the label
tag separately?
Example:
<txp:com_connect_text label="Name" required="1" break="" class="someclass anotherclass yetanotherclass" placeholder="Enter your name" />
Using the above results in the class names being applied to both the label
and input
tags.. I’d like to style them differently..
Offline
Re: com_connect - form and contact mailer
jstubbs wrote #306930:
Not sure if this has been answered before as a search did not bring results – I was wondering if its possible to style the
label
tag separately?Example:
<txp:com_connect_text label="Name" required="1" break="" class="someclass anotherclass yetanotherclass" placeholder="Enter your name" />...
Using the above results in the class names being applied to both the
label
andinput
tags.. I’d like to style them differently..
label.someclass {}
, input.someclass {}
? Or maybe, depending on your markup structure, .someclass:first-child { /* label */}
. Or maybe something else, there are so many possibilities.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: com_connect - form and contact mailer
phiw13 wrote #306931:
label.someclass {}
,input.someclass {}
? Or maybe, depending on your markup structure,.someclass:first-child { /* label */}
. Or maybe something else, there are so many possibilities.
Thanks…but I meant is it possible to make so that we could have a class option applied to the label
and the input
within the call to txp:com_connect_text
…. maybe this is too much but worth asking :)
Offline
Re: com_connect - form and contact mailer
etc_query
to the rescue?
<txp:etc_query
data='<txp:com_connect_text label="Name" class="someclass" />'
replace="//label@@class=labelclass;//input@@class=anotherclass"
/>
Offline
Re: com_connect - form and contact mailer
Thanks all…I’ve just gone with an inline class label.comRequired
for now. Seems a bit strange that the class attribute for the input tag is also applied to the label tag, or maybe its just me :)
Offline
Re: com_connect - form and contact mailer
jstubbs wrote #306942:
Seems a bit strange that the class attribute for the input tag is also applied to the label tag
Well it’d require extra attributes (like labelclass
or something) which adds complexity. And as phiw13 says, you can easily target them individually if required by using a compound selector, so we decided this was an acceptable tradeoff.
If anyone can come up with an alternative method for class naming that is better/simpler/more flexible, by all means suggest it.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline