Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#697 2009-11-23 13:25:36

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

Re: zem_contact_reborn 4.0.3.20

If you’re on a windows server, try adding ini_set(‘sendmail_from’, ‘sender@example.com’); at the beginning of the plugin code or just above the mail() line. If that doesn’t work either, contact your webhost for advice.

Offline

#698 2009-11-23 13:45:01

MrLongbaugh
Member
From: Hamburg - Germany
Registered: 2004-10-11
Posts: 116

Re: zem_contact_reborn 4.0.3.20

The hoster changed the permissions. So its possible to use the 5th parameter now.
Thanks for your suggestions ruud.

Offline

#699 2009-12-05 21:14:41

Ldx
Member
Registered: 2009-10-24
Posts: 15

Re: zem_contact_reborn 4.0.3.20

Hi all.
First: Thanks to Ruud for this great plugin.

Then the question: I’d like that when user succesfully clicks “Submit”, he/she can get a copy of the email content on the screen, so he/she can print or save it as a “receipt”. I imagine that the “thank you” landing page should have a way to access the individual values of fields submitted by the user, or to the whole email body.

I don’t want to send a copy of the email to the address submitted by user because this could be used for free spamming (or even the email address can be mistyped so the user never gets the “receipt”).

I searched the forum but I was unsuccesful. Could you please give me some suggestion?

Kind regards
Aldo

Offline

#700 2009-12-05 23:01:55

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

Re: zem_contact_reborn 4.0.3.20

Ldx, if you’re a bit familiar with PHP, this should get you started (put it in the thanks_form):

<txp:php>
  global $zem_contact_labels, $zem_contact_values;
  foreach ($zem_contact_labels as $name => $label)
  {
    if (!trim($zem_contact_values[$name])) continue;
    echo htmlspecialchars($label).': '.htmlspecialchars($zem_contact_values[$name]).'<br />';
  }
</txp:php>

Offline

#701 2009-12-07 08:13:36

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: zem_contact_reborn 4.0.3.20

Any way to specify an alternative article form to be used with the <txp:zem_contact_send_article /> tag?

What I’m trying to do is include a few custom fields (containing sensitive information) with the emailed article, which are not shown on the public website. Maybe this is possible using CSS (display: hidden), to hide the fields on the website but show them in the emailed article (the emailed article won’t contain styles right?), but I also worry about including the fields in the public HTML, even if they are hidden, as this can easily be circumvented by turning off styles. Any ideas or solutions are much appreciated!

Last edited by aswihart (2009-12-07 08:14:19)

Offline

#702 2009-12-07 17:50:16

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

Re: zem_contact_reborn 4.0.3.20

aswihart, have a look at the <txp:zem_contact_secret /> tag.

Offline

#703 2009-12-08 02:43:39

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: zem_contact_reborn 4.0.3.20

Cool ruud, I am new to the plugin, it seems that was an obvious solution. But still, I’m wondering if there is a way to customize the article form that is sent by email. For instance can you send the whole article and not just the excerpt (if excerpt is present)?

And, the ideal functionality for me would be using rvm_privileged to hide the “Send Article” link from non-logged-in visitors, but if you are logged in, you can simply click the link one time and have the article sent. Currently I have it working, but I don’t like the fact that you can enter any e-mail address for the article to be sent to. My website contains protected information that should not be sent to any email address other than those associated with Textpattern users.

Is there a way to bypass the two-step “Send Article” -> “Submit” process, and automatically use the logged in users email address (a la <txp:rvm_privileged_user type="email">) as the recipient? I tried doing it this way using the copysender attribute, but got the error Required field, “Recipient”, is missing.:

<txp:rvm_if_privileged>
<txp:zem_contact to='<txp:rvm_privileged_user type="email">' copysender="1" send_article="1">
  <txp:zem_contact_submit label="Send Article" />
</txp:zem_contact>
<txp:zem_contact_send_article />
</txp:rvm_if_privileged>

Any ideas?

Offline

#704 2009-12-08 05:15:31

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: zem_contact_reborn 4.0.3.20

Thinking of a way to make it a little more user-friendly for the people using my site, is there way to auto-populate the recipient email text field with <txp:rvm_privileged_user type="email">?

Offline

#705 2009-12-08 10:37:05

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

Re: zem_contact_reborn 4.0.3.20

aswihart wrote:

I’m wondering if there is a way to customize the article form that is sent by email. For instance can you send the whole article and not just the excerpt (if excerpt is present)?

Edit the plugin, replace this part:

(trim(strip_tags($thisarticle['excerpt'])) ? $thisarticle['excerpt'] : $thisarticle['body']))));

with:

($thisarticle['body']))));

Currently I have it working, but I don’t like the fact that you can enter any e-mail address for the article to be sent to. My website contains protected information that should not be sent to any email address other than those associated with Textpattern users.

You can’t prevent people from forwarding the articles once the article is received on a registered email address.

Is there a way to bypass the two-step “Send Article” -> “Submit” process, and automatically use the logged in users email address (a la <txp:rvm_privileged_user type="email">) as the recipient? I tried doing it this way using the copysender attribute, but got the error Required field, “Recipient”, is missing.:

Try this (not tested):

<txp:rvm_if_privileged>
<txp:zem_contact from="webmaster@example.com" send_article="1">
  <txp:zem_contact_email label="Recipient Email" default='<txp:rvm_privileged_user type="email">' send_article="1" />
  <txp:zem_contact_submit label="Send Article" />
</txp:zem_contact>
<txp:zem_contact_send_article />
</txp:rvm_if_privileged>

Offline

#706 2009-12-09 05:33:20

Aeron
Member
Registered: 2009-06-02
Posts: 11

Re: zem_contact_reborn 4.0.3.20

Hi there, apologies if this question has been asked before, but is there a way to preview the form content before sending?

Offline

#707 2009-12-09 10:07:53

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

Re: zem_contact_reborn 4.0.3.20

Sorry, no preview option available.

Offline

#708 2009-12-12 14:13:04

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: zem_contact_reborn 4.0.3.20

Your suggestion worked perfectly, and once again I apologize for missing something that was staring me in the face – the default attribute. I’ve basically got the functionality I want now by using .zemText {display:none;} to hide the email input field and label. I suppose someone could override the CSS and type in another email address, but they would still have to be logged in to get past rvm_if_privileged, and know to unhide those elements, which is unlikely. Thanks for getting me to this solution.

Thank you also for explaining how to edit the send article contents by altering the plugin directly, this is very useful. It seems to me it would make sense to replace the “Secret” function with the abililty to use a form to define all the elements in the sent article. Any way to get rid of the “Email: email@address” and “Secret:” elements of the email? I just want to include the stuff I’ve enclosed in the secret container tags.

ruud said:

You can’t prevent people from forwarding the articles once the article is received on a registered email address.

People is the key word here, as in, not ME. Just covering my ass. The people I’m sending info to are entitled to the information. What they do with it is not my problem.

Last edited by aswihart (2009-12-12 14:15:47)

Offline

Board footer

Powered by FluxBB