Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Plugin Request: improving zem_contact for money
aslsw66: Great job! Sorry, I couldnt help much with the e-mail select option! But if you would like me to help with anything else (beta testing or other stuff), I’m ready!
Vasanth
“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”
— Albert Einstein
Offline
Re: Plugin Request: improving zem_contact for money
> Jeremie wrote:
He seems still interested on supporting his plugin, so I guess we are going to see a new corrected version. I don’t know any specifics behind those.
Actually Jeremie, I was thinking more along the lines of whether there were any thoughts of dragging this into the base code. I’ve not heard or seen anything but…
Last edited by thebombsite (2005-12-01 02:12:50)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Plugin Request: improving zem_contact for money
I can’t quote Zem’s email without his approval, but as I understood it it will still be a plugin.
But now you mention it, yep it would be nice to have a real clean (aka spam secure, that mean no email adress in the HTML whatsoever) way of sending email in core code. Maybe keeping the special additionnal field and other goodies for a plugin.
Not major in any cases.
Offline
Re: Plugin Request: improving zem_contact for money
Before people get too excited, I am going away for 2 days – no laptop = no work = no Internet!!
I suddenly remembered some more error-checking is needed – what happens if you list 3 names but only 2 email addresses? So, I’ll be working on this on Sunday night and then hopefully posting something for people to have a look at and break.
Offline
Re: Plugin Request: improving zem_contact for money
In a topic here (… in french) I mentionned that with my provider (OVH france) the header that ZEM_CONTACT plugin sent wasn’t “accepted” by this provider : so no message could arrived.
I’ve hacked the plugin and deleted the 4 <code>\r</code> in the code and that’s OK for me and OVH ;-)
What do you think of that ? Is it something that you can add to the “new” ZEM_CONTACT plugin ?
An other thing : boblet work on an “Internationalizing” of ZEM_CONTACT here and for french people (and other) it’s very interesting to allow a <code>$name</code> with accentueted caracters or like “n° de téléphone” for “phone number”.
françois.
Last edited by fpradignac (2005-12-01 13:17:06)
françois
Offline
Re: Plugin Request: improving zem_contact for money
fpradignac wrote:
What do you think of that ? Is it something that you can add to the “new” ZEM_CONTACT plugin ?
Already discussed a few months ago with Zem. I wasn’t able to get him on that. Other software, such as PunBB, use an OS selector to choose what linefeed to apply to email headers.
Last edited by Jeremie (2005-12-02 04:40:50)
Offline
Re: Plugin Request: improving zem_contact for money
OK, here is my attempt to modify zem_contact for you to download [updated].
Edit: This file is not a self-contained plugin. It’s just new code to replace the existing plugin coding.
This version only contains a new tag to create a drop-down select box for visitors to choose the recipient of the email; if this works as intended, I will look at incorporating creativesplash’s modifications in as well. Because I had to modify the mailto validation a bit, I’ve run out of time tonight.
Here’s how it works:
- there is now a new tag called “zem_contact_select_mailto”. It accepts similar attributes as “zem_contact_select” but with a new attribute called ‘addresses’.
- for example, if you use <code><zem_contact_select_mailto list=“John, Jane” addresses=“john@doe.com,jane@doe.com” /></code>, then the contact form will include a drop-down box allowing the visitor to choose John or Jane. The mailto address for the form is the respective selection from ‘addresses’ ie. if they choose the first name, the first email address is chosen.
- if you don’t use either the mailto attribute on <code><zem_contact></code> or <code><zem_contact_select_mailto /></code>, then the form is replaced by an error message.
- you must have exactly the same number of items in the list of names and the list of addresses. My attempt to do some error checking if the names and addresses don’t match has failed!
I have tested it with two email addresses and it works; I’ll add my work address so I can test it some more. I would be grateful if you could test it with multiple email addresses. Also, if anyone is an expert I would appreciate a review of my coding to make sure I haven’t made any horrendous PHP mistakes.
Thanks to zem for a great plugin, thanks to everyone else for the ideas.
Last edited by aslsw66 (2005-12-09 10:44:31)
Offline
Re: Plugin Request: improving zem_contact for money
Wow Anura, that’s fantastic news! I’ll surely test this out as soon as possible!
<blockquote>
aslsw66 saiys > I will look at incorporating creativesplash’s modifications..
</blockquote>
Its not fair on my part to call the modifications mine, as I picked it up from different threads in this forum. :)
“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”
— Albert Einstein
Offline
#33 2005-12-06 12:35:13
- alexandra
- Member
- From: Cologne, Germany
- Registered: 2004-04-02
- Posts: 1,370
Re: Plugin Request: improving zem_contact for money
I would really like helping testing it but i can not even install zems original plugin.
(Notice: unserialize(): Argument is not a string in /www/…/textpattern/include/txp_plugin.php on line 152)
@ aslsw66 – would it be possible to turn your code into a plugin?
Offline
#34 2005-12-06 12:45:53
- Neko
- Member
- Registered: 2004-03-18
- Posts: 458
Re: Plugin Request: improving zem_contact for money
Can you make it work with an image submit button rather than the default submit button?
I can contribuite too with a few dollars.
Offline
Re: Plugin Request: improving zem_contact for money
alexandra,
Sorry, but I’m really feeling my way with this at the moment. Beause I’m modding zem’s plugin for my own benefit (and anyone else’s who cares to take an interest), I’m not really sure what the correct thing to do here is. Do I release this as my own plugin (crediting zem of course)? Or ask zem to re-release his own?
everyone else,
I’ve modified my version [updated] of the plugin in again (again, this is the code to replace an existing install of the plugin). In addition to the new tags above, I have now:
- added a new attribute called “mailsubject”. This defines the subject line for the email sent,
- added a new attribute called “thankslocation”. You can use this attribute to redirect to a thank you page; the location is added to the end of the site url, and
- fixed the checkbox issue mentioned in this thread.
I’ve also included many of the other fixes mentioned in that thread, but these are issues that are outstanding:
- checking XHTML compliance of each element when used. This is something I’m more comfortable with so I’ll move on to this tomorrow,
- internationalisation. I note that boblet has created a hack for this but frankly
- I’m not really sure of what the issues with internationalisation are. In Australia we are just so far away!
- I’m not sure that boblets approach of additional tags is the best way to go. Wouldn’t it be better to set something in the admin sitde?
- fpradignac posted an issue in this thread about his provider not accepting the email header. Again, I’m a bit in the dark about how much of an issue this is, or whether the suggest solution works for everyone else.
Thoughts, problems, answers are all welcome.
My journey to an improved zem_contact continues! Once again, I’m merely peeking over the shoulder of a giant (ie. zem and others) to glimpse what is possible.
Last edited by aslsw66 (2005-12-09 10:44:50)
Offline
Re: Plugin Request: improving zem_contact for money
neko,
Anything is possible of course! But in this case, I remember from sometime ago a web accessibility consultant advised against images for submit buttons. Let me do some research on the benefits/pitfalls and think about is some more.
Offline