Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#289 2007-08-13 23:34:44

facho
Member
Registered: 2007-04-15
Posts: 64

Re: zem_contact_reborn 4.0.3.19 (old version)

Anyone know how to edit the formatting of this great plug-in? I’m trying to roll out a very simple implementation of the plug-in so that I can collect email addresses for monthly newsletter mailings. What I have not been able to figure out is how to change the “Contact” text that shows up and that ovalish frame. You can see how I have it implemented here Example

I’m a total newbie so any help is appreciated.

Offline

#290 2007-08-13 23:46:13

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,311

Re: zem_contact_reborn 4.0.3.19 (old version)

Simply add an attribute of “label” with a value of whatever you like: label="your preferred name" (Further values are documented in the plugin help)
Fot the ovalish frame: I never saw any. CSS?


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#291 2007-08-14 00:05:05

facho
Member
Registered: 2007-04-15
Posts: 64

Re: zem_contact_reborn 4.0.3.19 (old version)

ok, i’ll give that a try. thanks! Regardingthe ovalish frame, my mistake. It’s actually more square than oval. It’s aligned with the text “contact” and wraps around the form itself.

Offline

#292 2007-08-14 00:25:16

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,311

Re: zem_contact_reborn 4.0.3.19 (old version)

One of the first lines on my stylesheet is always * {border: 0;} But if you need borders for some elements, try border=0 for “form” or “fieldset”.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#293 2007-08-15 03:05:02

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

Great plugin – Just a few things I have found which ‘may’ improve it (or not):

1 – Would it be possible to add some thing in zem_contact_lang where we could add a custom message to the outgoing email.
2 – My Send Article link is at the bottom of the article, when clicked it make the page go to the top – can I add a ‘javascript();” to the link
3 – Can you set it so that only the link to the article is sent to the recipient, so they have to visit the site?

One more thing, I also get 2 fieldsets with the send_article

<txp:zem_contact label="Send Article" to="" send_article="1">
<txp:zem_contact_email label="Recipient Email" send_article="1" /><br />
<txp:zem_contact_email label="Your Email" /><br />
<txp:zem_contact_submit label="Send Article" />
</txp:zem_contact>

Gives me


<form method="post" id="" class="" action="">
<fieldset>
<legend>Contact</legend>
<form_details />
<form method="post" id="" class="" action="">
<fieldset>
<legend>Send Article</legend>
<form_details />
</fieldset>
</form>
</fieldset>
</form>

Is that correct – I wouldn’t mind getting rid of the Contact Fieldset

Last edited by tye (2007-08-15 03:18:45)

Offline

#294 2007-08-15 07:03:21

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

tye,

  1. use <txp:zem_contact_secret /> to add a message to your mail
  2. not unless you manually create the send_article link, but then it would not disappear once clicked… although if you’re using Javascript, you can probably hide the link as well.
  3. you can remove the fieldset by setting label="" in the zem_contact tag… but I wonder where the second fieldset tag comes from, because ZCR only adds one of them. I suspect you added one fieldset yourself. In that case you can set label="Send Article" in the zem_contact tag instead of manually adding a fieldset+legend.

Offline

#295 2007-08-15 09:35:50

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

Thanks ruud – I’ll have a look at those tomorrow :)

Offline

#296 2007-08-16 02:09:10

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: zem_contact_reborn 4.0.3.19 (old version)

I have a quick question about form expiration using nonces. But first, a little context.

I’m using ZCR on a client’s site, and have taken it beyond the “contact us” role. It still sends form information by e-mail, but on this particular site it’s a key step in the conversion process. Because of this, it’s imperative that the form be as reliable and user-friendly as possible.

My client is concerned about the form expiration feature accidentally leading to form abandonment. He envisions a scenario in which a user arrives at the site, browses around a bit, then gets up for a cup of coffee (or visits the restroom or something) before filling out the form. Not that far-fetched, really. Since the page has been loaded in the browser for more than 10 minutes when the form is filled out, the user gets an error message instead of having their form submission “just work.”

Is form expiration aimed at preventing spam, or is it more of a straight-up security measure (for replay attacks or cross-site request forgery, for example)? If it’s an anti-spam tactic, my client would be willing to live without it or extend the expiration time, but he doesn’t want to mess with it if this guards against security exploits.

Thanks in advance for your help. :-)

——————————————————————————

Edit / Update: I don’t have time to go through all of the plugin’s code, but it looks like $zem_contact_error should be available for an API plugin to examine. If this is correct, I could log selected error types and determine whether this problem is significant enough to actually bother with at all. Does this seem like something that would work?

Last edited by Logoleptic (2007-08-16 02:20:01)

Offline

#297 2007-08-16 06:46:21

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

adam, the nonce is an anti-spam technique.
$zem_contact_error is used to display errors before you can hook in a plugin. Disabling the nonce part should be relatively easy. Just comment out the parts that check the nonce (they are grouped together in an if-construct).

But… be warned that you’ll probably get a lot of spam by doing so.

Last edited by ruud (2007-08-16 06:47:15)

Offline

#298 2007-08-16 20:40:45

Logoleptic
Plugin Author
From: Kansas, USA
Registered: 2004-02-29
Posts: 482

Re: zem_contact_reborn 4.0.3.19 (old version)

$zem_contact_error is used to display errors before you can hook in a plugin.

Thanks for the quick response. If it’s doable, having access to this error information via the API would be a great feature for the future. ZCR is capable of creating mission-critical online forms, which makes early detection of any problems very important.

Edit: Just to be clear, I’m interested in logging errors rather than capturing and preventing them. Can’t I read the contents of the $zem_contact_error array by declaring it as global in scope? A similar example is given in the plugin’s documentation, but the variable used there is $zem_contact_form.

But… be warned that you’ll probably get a lot of spam by doing so.

I’ve passed this along to my client, and recommended that we delay nonce expiration a bit rather than disabling the feature altogether.

Last edited by Logoleptic (2007-08-16 20:47:35)

Offline

#299 2007-08-16 20:56:59

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

$zem_contact_error contains all errors, including some you really do not want to ignore such as the those resulting from checking invalid utf-8 input, length limits and email address validation. You could add a callback event in the plugin code just before the errors are displayed to the user, hook a plugin into that and let it access the $zem_contact_error array there so it can be modified to fit your needs. That would be a minor edit for you to make.

Last edited by ruud (2007-08-16 20:58:34)

Offline

#300 2007-08-17 11:04:15

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

Thanks ruud – all your suggestions worked perfectly… the more I look at this plugin, the more powerful I realise it is – Good work TXP team and thanks

Offline

Board footer

Powered by FluxBB