Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-18 17:26:26

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Plug-in: zem_contact_reborn

I’ve taken Mary’s code including the revision and included Zem’s original instructions to create this plug-in. As I only use the basic form tag I am only aware of the change from “mailto” to “to” and have altered all instances of that (I hope). If people can let me know of any other changes I will amend the plug-in accordingly. Now I’m no PHP coder so if there are problems or requests I’m not the person to ask. By all means use this thread to post to but pray that someone else can come up with an appropriate fix. Again I’ll quite happily update the plug-in with any new or amended code.

Versioning: there’s been discussion elsewhere about letting people know which plug-ins work with which version of Textpattern so I’ve taken that on-board with the versioning method I’m using. If there are any better suggestions I’ll be pleased to hear about them. Anyway here it is:-

zem_contact_reborn 4.0.3.17.txt

zem_contact_lang 4.0.3.03.txt

pap_contact_cleaner v0.1.txt

EDIT

Version .17 (12/03/06)
<zem_contact_radio /> function added to enable the use of radio buttons. Thank you Robert (wet).
A new attribute – button=“yes” – has been added to the <zem_contact_submit /> function to enable the user to choose a “button element” output instead of the normal “input element”.
Fixed “isError” for the <zem_contact_select /> function.
Reduced “return” to a single instance for those functions that use “zemRequired” and thereby reduced the code a bit.

Please note: the zem_contact_lang plug-in has also been updated to version .03 with the addition of “radio”.

Version .16 (11/02/06)
Zem Contact Reborn now has it’s own built-in API. This means that it can be linked to by other plug-ins. Information about how plug-in developers can do that is included in the Help text.
Fixed a validation problem in “Strict” relating to the “for” attribute used in the “label” of the “select” function.
Zem Contact Lang has also been updated to .02 with the addition of a new line “spam”. I wonder if you can guess…

And announcing the release of pap_contact_cleaner from tranquillo, the first plug-in designed to link to Zem Contact Reborn’s API. In case you were wondering, it’s a spam blocker!

Please Note – anyone using the temporary fix released last night should re-install the latest version of Zem Contact Reborn above even though it carries the same revision number. The new version does not contain neptho’s code though we shall look at it further. The link from last night will be removed.

Version .15 (06/02/06)
Now removing tags from the article when using the “Send Article” functions. We are still looking at quotes and apostrophes which remain coded as HTML. May have something to do with “pretty quotes”, but I’ve released this “as is” because the articles definitely look a lot neater now.

Version .14 (03/02/06)
Yes. I know. I’ve missed one out. ;)
This latest version now splits the language file out into a separate plug-in. You will need both for it to work properly. This will allow people to “localise” the language file and not need to worry about it when the main plug-in needs updating unless new “text output” has been added. I will let you know if that happens. The information about “localisation” included in the previous release has now been moved to the new plug-in.

Version .12 (29/01/06)
Help text has been looked through and any errors or ambiguities removed and formatting improved.
Added information relating to localisation.

Version .11 (27/01/06)
“errorElement” class now appended to labels, inputs and the textarea when errors relating to information entered into the form, or not entered, are output.
Added some styling information to the Help text to explain the relevant classes.

Version .10 (24/01/06) Special “Bad Brain Day” release.
“copysender” now uses Bcc instead of Cc. Tut tut.

Version .09 (24/01/06)
Modified the way that “copysender” works in order not to display your address on the email.

Version .08 (23/01/06)
A new attribute “copysender” added. When set to “yes” a copy of the email will be sent to the sender’s email address as well as your own. (Thanks to Anura for explaining “concatenation”.)
Fixed bug which stopped the “break” attribute working for the “email” input. (Thanks to jdykast for spotting that one.)

Version .07 (17/01/06) This stuff is all for styling.
Error messages are output as a “ul” so I have given the “ul” tag a class=“zemError”. Now you can style the messages.
When required=“yes”, labels will have a second class added to them in the form class=“zemRequired $name” so that you can set an overall style for “required” labels as well as make individual adjustments where necessary. Where required=“no”, labels will continue to use class=”$name”.
When required=“yes”, a class=“zemRequired” is also added to the “input” so that you can style those in a different manner as well if you wish.

Version .06 (16/01/06) Faster than a speeding bullet here’s version 6.
“id” added to “form”. Now uses “zemContactForm”.
“id” added to submit button. Now uses “zemSubmit”.
“id” added to “checkbox”. Now uses the value for “label”
Classes added to all “labels”. Will now use the same value as the “label”.

Version .05 (16/01/06) Email input box is now sizeable within the tag using the “size” attribute.
If an error is returned, entered values should be retained so they do not need to be re-entered.
Bold text for “required” fields has been removed.
“Send Article” now includes a link to the article in the email.

Version .04 (15/01/06) Missing “/” added for validation. (Thanks Els.)

Version .03 (10/01/06) includes tranquillo’s code for “Send Article” functionallity. You can now add a link to your individual article form which will, when clicked, open a form allowing your visitor to enter his/her name and an email address for a friend. They can also add an extra message if they wish. The article’s title and body will be included in the email automatically.

Help text updated.

A couple of minor bugs squished. (Should sort some of the “yes/no” problems out.)

Version .02 (19/12/05) has minor code changes as mentioned here but the major changes are to the help files. Please double-check your attribute names as several have changed. Also “on/off” attributes now use “yes” and “no” instead of 1 and 0.

Last edited by thebombsite (2006-10-22 22:46:59)


Stuart – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#2 2005-12-19 07:28:55

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: Plug-in: zem_contact_reborn

OK, thank you, so I’m begining (as a user tester).
I’ve met several points, here’s the most problematic one first :

Checkboxes doesn’t work:
it’s displayed in the form but it always returns “no” in the mail, checked or not
and the setting “checked=1” doesn’t work either.

I’ve tested with the documentation exemple :
<txp:zem_contact_checkbox label="I accept the terms and conditions" />

I’m I alone to have these problems or is it general ?

Last edited by Niconemo (2005-12-19 07:30:42)


Nico

Offline

#3 2005-12-19 07:44:11

1beb
Plugin Author
From: Canada, Ontario, Toronto
Registered: 2004-11-22
Posts: 169
Website

Re: Plug-in: zem_contact_reborn

Nah, I’ve tried the updated version and I’m still having the same problem as described here

Offline

#4 2005-12-19 08:26:59

jstubbs
Moderator
From: Hong Kong
Registered: 2004-12-13
Posts: 2,367
Website

Re: Plug-in: zem_contact_reborn

1beb – do you have still mailto or to? It should be something like to=“me@mydomain.com”. What error message do you get? Works fine for me so far with a simple form.

Q: Anything change with the international characters issue? Norwegian characters in my case.

Offline

#5 2005-12-19 08:39:47

Mary
Sock Enthusiast
From: Canada
Registered: 2004-06-27
Posts: 6,235

Re: Plug-in: zem_contact_reborn

Re Niconemo:

That’s my fault. In the function zem_contact_checkbox (line 487), all references to $v should be $value.

I also missed translation for 1 string on line 445.

1beb: I added a new check to zem_contact. If you get that message just by having the zem_contact tag in the page, as opposed to when you try to send the form through, that means your host has disabled mail.

Code-wise, it may be simpler to fork the plugin. BUT, I really don’t have time for documentation, which is expected of you when you write a plugin. Plus, I hate what feels like stepping on Alex’s toes. I’d much rather contribute to this one rather than manage it.

I’ve been thinking about this for my own other plugins too. Documentation sucks away the time it takes. I’m thinking it’d be better to wikify my plugin docs, but I also don’t want to detract from the much needed help with the Txp manual.


My email address has changed recently. If you need to contact me, use the forum contact form.

Offline

#6 2005-12-19 15:56:03

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Plug-in: zem_contact_reborn

thebombsite wrote:
zem_contact_reborn_4.0.2.01.txt

HTTP 403.

:-(

Offline

#7 2005-12-19 16:33:18

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

Grrrr! I bet this is something to do with you not being able to access my site at all? I’ve had someone else email me today about that. Also French. I shall be moving the site in April. In the meantime I’ll zip the plug-in up and email it to you. Hang on a bit though cuz I’m just doing v. 02.


Stuart – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#8 2005-12-19 18:19:26

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

Updated to version .02 for the above mentioned problems plus major changes to the help files.


Stuart – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#9 2005-12-19 23:25:53

1beb
Plugin Author
From: Canada, Ontario, Toronto
Registered: 2004-11-22
Posts: 169
Website

Re: Plug-in: zem_contact_reborn

  • jstubbs – when I updated to “reborn” I changed it to ‘ to=“blah@yomomma.cx” ‘ , hence, no problem there. It just says “Sorry, unable to send email.”
  • Mary – No it only says it after I have clicked “send”.

Offline

#10 2005-12-19 23:45:06

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Plug-in: zem_contact_reborn

I’m not having a “send” problem on either of my installs 1beb. Could this be something “server-specific”?

Do you have the latest revision .02 which contains the mods Mary made a few posts up? Also double-check your attribute names. I have updated the help file in the latest revision. Hopefully that side of it is now complete.


Stuart – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB