Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Plug-in: zem_contact_reborn
I haven’t released this yet. I’m still testing. Turns out the error messages were the easiest. They are output as a “ul” so I’ve given the ul tag a class=“zemError”.
For the “required=yes” labels I have a second “class=zemRequired” alongside the “class=$name” so you can set an overall “required” style as well as do some individual adjustments if necessary.
I’ve sorted the “checkbox” and the “select” functions in the same way too. So everything should now be at the same point.
Would there be any benefit to adding a class to the “input” of a “required=yes” field?
I don’t know enough to sort out things like highlighting the required field when an error is output. Maybe one of the other lads can fix that. Or maybe I will learn all about it tomorrow (that’s today really).
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#77 2006-01-17 07:12:09
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: Plug-in: zem_contact_reborn
> Would there be any benefit to adding a class to the “input” of a “required=yes” field?
I suppose there could be – a lite yellow background or other style to make it stand out – thicker border maybe
> I don’t know enough to sort out things like highlighting the required field when an error is output.
done good so far : )
Offline
Re: Plug-in: zem_contact_reborn
OK. I’ve added them to the “inputs” as well when required=“yes”.
Plug-in updated.
Let me know.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Plug-in: zem_contact_reborn
I am trying to test the zem_contact_send_article for foreign character issues (BTW Stuart, its not really clear which bugs have been fixed with your latest versions).
Unfortunately, I am not getting the send_article to work. I have this:
Default form:
<code><txp:zem_contact_send_article linktext=“Email this article to a friend” /><txp:zem_contact send_article=“yes” form=“send_article” /></code>
send_article form:
<code><txp:zem_contact to=“me@myemail.com”>
<txp:zem_contact_email name=“receiver” />
</txp:zem_contact ></code>
I get a message ““To” address is missing.”
Is it really necessary to have the zem_contact_email name=“receiver” in a second form?
Offline
Re: Plug-in: zem_contact_reborn
You’ve made the same mistake that I did jstubbs. You now have 2 zem_contact tags where you only need 1. You are used to the standard contact form usage where the form contains the zem_contact tag and you call it with a <code><txp:output_form form=“email” /></code> tag but this time you are calling the form with the zem_contact tag so you don’t require it in the form as well. Your “send_article” form should look something like:-
<code><p><txp:zem_contact_text label=“Your Name” required=“yes” size=“40” /></p>
<p><txp:zem_contact_email name=“receiver” label=“Friend’s Email Address” size=“40” /></p>
<p><txp:zem_contact_textarea label=“Extra Message” required=“no” /></p>
<p><txp:zem_contact_submit /></p></code>
<br />
though you don’t need the “textarea” if you don’t want it.
In your article form you need this where you want the link to appear:-
<code><txp:if_individual_article><txp:zem_contact_send_article linktext=“Email to a Friend” /></txp:if_individual_article></code>
<br />
then where you want the form to appear when the link is clicked you use this:-
<code><txp:if_individual_article><txp:zem_contact send_article=“yes” form=“email_friend” /></txp:if_individual_article></code>
<br />
Those last 2 examples need to be in your article’s form template.
I believe you had a problem with entered values not being retained when an error is output. That should be fixed and I think you also had a problem with one of the yes/no attributes not working properly which should be OK now as well.
Tranquillo is currently looking at the foreign characters problem and separating out the language file.
Last edited by thebombsite (2006-01-17 17:43:08)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#81 2006-01-17 19:29:02
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Plug-in: zem_contact_reborn
thebombsite wrote:
@Els – thought you might jump in while I was asking eh? :grin:
It was worth a try… ;) Anyway, forget it, I figured it out. In case anyone else can use it, this is an example how to use multiple languages for error messages (works only if each contact form is in a different section):
This line:
'field_missing' => "Required field, “<strong>$var1</strong>”, is missing.",
becomes:
'field_missing' => '<txp:if_section name="nl-reserveren">Verplicht veld, "<strong>'.$var1.'</strong>", ontbreekt.</txp:if_section><txp:if_section name="en-reservations">Required field, "<strong>'.$var1.'</strong>", is missing.</txp:if_section><txp:if_section name="pt-reservacoes">Preencha o campo obrigatório, "<strong>'.$var1.'</strong>".</txp:if_section>',
Of course you can do the same for the other messages.
Last edited by doggiez (2006-01-17 19:33:39)
Offline
Re: Plug-in: zem_contact_reborn
*thebombsite: *One thing that I think would make this plugin even more useful would be an “email a copy to me” checkbox for site users. Even an option just to do this by default. Is this a ticky bit to add? I there’s several people, NeilA and myself included, who’ve been hoping for this capability.
Cheers, Thanks for the update of this plugin.
Offline
Re: Plug-in: zem_contact_reborn
I did have a method in mind for this actually mrdale, though I need to do a bit of checking up first, not being a coder. It would be a default method though. Basically you would set an attribute “copysender=yes” in the tag, and if it is set, the “from” address is added to the “to” address and the email sent to both addresses. I haven’t even thought about using a checkbox. That would be way over my head methinks though we do have others working on the code.
@Els – I didn’t realise you could use TXP tags inside a plug-in like that!!
Last edited by thebombsite (2006-01-17 22:47:46)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Plug-in: zem_contact_reborn
I noticed that following the instructions for removing the automatic break (<code><br /></code>) did not work with the <code>zem_contact_email</code>. To fix that I added <pre><code>‘break’ => br,</code></pre> at about line 351 and <pre><code>‘break’ => $break,</code></pre> at about line 406. This seemed to remedy the situation. I’m using version 4.0.3.07 of the plugin.
Last edited by jdykast (2006-01-17 23:45:07)
Offline
Re: Plug-in: zem_contact_reborn
> thebombsite wrote:
> I did have a method in mind for this actually mrdale, though I need to do a bit of checking up first, not being a coder. It would be a default method though. Basically you would set an attribute “copysender=yes” in the tag, and if it is set, the “from” address is added to the “to” address and the email sent to both addresses. I haven’t even thought about using a checkbox. That would be way over my head methinks though we do have others working on the code.
Stu,
What you describe above using an attribute would be excellent for my needs!
Cheers
Offline
Re: Plug-in: zem_contact_reborn
@jdykast – Well spotted. Thanks for that. Added in.
@Neil – Well all I need to do now then is work out how to code it. :grin:
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Plug-in: zem_contact_reborn
Well, you also need a new hosting server, one which doesn’t dislike french :p
Offline
Re: Plug-in: zem_contact_reborn
Ha haaaa. I don’t think it’s the host Jeremie. You can get to my Guestblock and Bomb Blasts so it must be TXP. Has Dean said anything? He lives in France you know. ;)
Actually I had another chap from France emailing me for the plug-in because he kept getting a 403. Which reminds me. Would you like me to send you the latest revision? In fact did you get the previous one I sent twice?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: Plug-in: zem_contact_reborn
Stuart: Thanks for the form help I knew I had to be missing something obvious ;-) It works fine now.
I will look over this thread again to see what other issues I had with zem_contact and reborn, but I think so far you have seen all the issues.
Tranquillo:
You asked me to check Norwegian characters using the send_article part of reborn. I did so and get something like this:
<code><p>Kommende lørdag er det Oscar-kveld på oss. </p> <p>Elevene har de siste ukene jobbet med filmer. Vi har fire kategorier – drama, triller, dokumentar og musikkvideo. Det vil bli delt ut Oscar-statuetter i forskjellige kategorier og til beste skuespillere.</p> <p>Det blir helaften med dress og kjole – og noen av filmene kommer på nettet kommende uke.</p></code>
Couple of things – first, the Norwegian characters appear fine. My issue with characters though was with the contact form itself. For example, using a drop-down list. If the select item contains a character the form does not work.
Second, with the above example, you can see that a hyphen ( – ) is appearing as an HTML entity.
Third, is it necessary for the article to be sent with p tags? Shouldn’t the tags be stripped?
Thanks,
Jonathan
Offline
Re: Plug-in: zem_contact_reborn
I did received the previous one, you didn’t received my thanks ? There’s a little Murphy with a MX somewhere too, I guess :) And yes I would like the new one too :)
Offline