Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2005-01-21 23:02:07

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [outdated] zem_contact, flexible mailto form

Lee,

I’m busy working on other things at the moment. You’re welcome to try yourself – the software is GPL.

I’ve had quite a few requests for new features recently. The plugin has already taken substantially longer to maintain and support than was covered by the ransom. What do people think of the idea of a second ransom, to cover the time involved in adding a bunch of new features? (extra field types, user-entered subject line, file attachments, POST-REDIRECT-GET to eliminate back button warnings, etc)

The alternative is waiting until I have the spare time to work on it, which will take a while.


Alex

Offline

#50 2005-01-22 10:30:36

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [outdated] zem_contact, flexible mailto form

Hi Zem,

I had a go myself and came up with a way to have developer-entered subject lines. So for example one form can be used for “Request a call back” and the code would be:

(notice, subject=)

<code><txp:zem_contact mailto=“lee@mail.com” form=“call_back” subject=“Call Back” thanksform=“call_back_thanks” /></code>

Then a form on a different page might be to request a brochure, then the code would be:
<code><txp:zem_contact mailto=“lee@mail.com” form=“brochure” subject=“Send out brochure” thanksform=“brochure_thanks” /></code>

The e-mail then sent to lee@mail.com has a custom subject line.

The idea of another ransom is OK with me if you bring in some big features. But I think the back button and refresh warnings should be fixed because this isn’t something you would really expect from a $200 bit of software. EDIT – I take it back, sorry.

Edit: An handy new feature could be the ability to compare one field to another, so if I ask for an email address and get the visitor to re-type it I can make sure there the same.

Here is the code for the developer-entered subject line:

Note: the line #‘s might not be exact but you’ll get the idea.

Add this at line 11
<code>$subject = (empty($atts[‘subject’]) ? ‘’ : $atts[‘subject’]);</code>

Change line 59 to
<code>$r = mail($mailto, $subject, $msg, $headers);</code>

You can now use Subject=”“ as show above.

Note: You will need to use subject= or the sent e-mail will have no subject line. There is no default.

Last edited by lee (2005-02-08 17:37:41)

Offline

#51 2005-01-22 16:41:57

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [outdated] zem_contact, flexible mailto form

I’m using the latest version (0.6) and trying to use a select list. If I make the field required I always get a warning saying I must select the required field even if I have selected it. If I make it unrequired, I get a message that the required field is missing.

Anyone have a working select list in 0.6?

Last edited by wilshire (2005-01-22 16:55:20)

Offline

#52 2005-01-22 16:59:38

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [outdated] zem_contact, flexible mailto form

As I’ve been trying this extension out recently I just setup a select list, and I get the same results a you. I’m using 0.6 as well.

Offline

#53 2005-01-22 17:05:19

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [outdated] zem_contact, flexible mailto form

Found the problem with the select list:

Find: (line 189 or there abouts)

<code>$v = (ps($name) ? ps(name) : $selected);</code>

Replace it with:
<code>$v = (ps($name) ? ps($name) : $selected);</code>

Just a $ missing.

Offline

#54 2005-01-22 17:06:26

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [outdated] zem_contact, flexible mailto form

Excellent! Thanks lee.

Last edited by wilshire (2005-01-22 17:07:34)

Offline

#55 2005-02-07 23:48:35

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: [outdated] zem_contact, flexible mailto form

One writer notes:

“The idea of another ransom is OK with me if you bring in some big features. But I think the back button and refresh warnings should be fixed because this isn’t something you would really expect from a $200 bit of software.”

I disagree for the following reasons:

  • For one thing, Zem wasn’t requesting $200 per plugin, just $200.00 total from donations before he released it for free.
  • The software was useful as released.
  • You are getting free support via this thread.
  • Spend some time in an American corporation and see >$50,000 (not including support calls and on-site engineer visits) be burned up purchasing a proprietary commercial CMS that is discarded within two years because it is found to be unusable.

If Zem has found a way to help support his plugin-writing habit I am happy to oblige.

Last edited by aesop1 (2005-02-08 00:00:58)

Offline

#56 2005-02-08 01:03:59

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [outdated] zem_contact, flexible mailto form

Thanks guys, I’ll include the name/$name fix in the next release. Not sure how that one slipped by.

Aesop, thanks for the support. zem_contact is not a $200 piece of software in any sense. Even just counting the time spent on design, coding and documentation, and ignoring support and troubleshooting, I usually earn less per hour writing ransomed plugins than a cut-rate Indian outsourcing house. And I get a lot more done in an hour than discount programmers.


Alex

Offline

#57 2005-02-08 06:24:25

aesop1
Archived Plugin Author
Registered: 2004-09-19
Posts: 142

Re: [outdated] zem_contact, flexible mailto form

Agreed. I’m using at least two of your plugins right now, so your programming efforts have my gratitude.

Now that my brownnosing is out of the way, what follows is a wishlist request for zem_contact:

Provide a parameterized option so that you can have several “mailto” addresses via a select menu. Useful if you just want to have one contact form but multiple persons in your organization.

Something like

<code>
<txp:zem_contact mailto=“user@whatever.org,Select Value 1|user2@whatever.org,Select Value 2” />
</code>

You could explode this into two sets of arrays that could be used for a select menu with multiple email address values.

This would be helpful for organizations that have multiple contacts but only want to display one form.

If I get around to modding this soon, I will send you what I have.

Thanks again . . .

Last edited by aesop1 (2005-02-08 06:27:31)

Offline

#58 2005-02-08 18:16:56

starzabove
Member
Registered: 2004-04-13
Posts: 76

Re: [outdated] zem_contact, flexible mailto form

I found a couple of little validation errors.

In or about line 198 it reads:

<code>$out .= ‘<option selected=1>’.$list[$i].”</option>\n”;</code>

and I had to add the quotes and put in the word “selected” in place of the number 1, like this:

<code>$out .= ‘<option selected=“selected”>’.$list[$i].”</option>\n”;</code>

And then in or about line 206 it reads:

<code> ‘<select name=”’.$name.’”>’.$out.’</select>’;</code>

and I changed it by adding in the element for the id as such:

<code> ‘<select name=”’.$name.’” id=”’.$name.’”>’.$out.’</select>’;</code>

Once again, zem, amazing work. I no longer dread forms the way I used to, once upon a time.
Many thanks!

Last edited by starzabove (2005-02-08 18:18:03)


90+ Textpattern installs and still going…

Offline

#59 2005-02-09 00:03:34

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: [outdated] zem_contact, flexible mailto form

For more international uses (i.e. what I just did to my copy of this great plugin), I suggest

  1. switching over to quoted-printable encoding of the outgoing emails, as unencoded subjects raise the spam score with SA (and generally I still think encoding is safer),
  2. replacing htmlentities with htmlspecialchars (or forgetting both), as htmlentities just breaks most non-Western characters (maybe adding the optional charset parameter might help, but hey, this function is the nightmare of non-Western language writers).

Who’s gonna textdrive you home tonight?

Offline

#60 2005-02-09 01:03:51

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: [outdated] zem_contact, flexible mailto form

  1. switching over to quoted-printable encoding of the outgoing emails, as unencoded subjects raise the spam score with SA (and generally I still think encoding is safer),

What function did you use to encode the subject? PHP doesn’t seem to have a standard one, other than in the (usually unavailable) imap extension.


Alex

Offline

Board footer

Powered by FluxBB