Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#931 2011-01-05 18:19:39
Re: zem_contact_reborn 4.0.3.20
That looks like code generated by pap_contact_cleaner, not zem_contact_reborn. I made my own honeypot plugin because the inline visiblity: hidden style leaves a huge space in the layout that you can’t override in the external stylesheet.
Offline
#932 2011-01-05 18:21:35
Re: zem_contact_reborn 4.0.3.20
Ah, so it is, thanks very much John.
Cheers, -Alan
At LAST I’ve cheerfully donated to the core devs at #TXP. I only wish I were able to give more. Thanks to the devs and ALL fellow TXPers. -A
Offline
#933 2011-01-06 17:09:32
- phuture303
- Member
- Registered: 2008-09-14
- Posts: 127
Re: zem_contact_reborn 4.0.3.20
Hi, a question for you people who have an idea how to work with sql-queries and stuff…
I’m working on a website for a local movie theatre. There are many live articles in the section “movies”, having a radiobutton-controlled custom-field called “reservation” with the two buttons “yes” or “no”.
The people can do a reservation: For this I have an article with a reservation form (made with zem_contact_reborn) where the visitors put their names, contact information, date and count of seats etc., and actually, they have to type in the name of the movie manually for which they ask for reservation. Like this, they can ask for seats for LOTR or the Muppets Christmas Story although these movies are not shown :-)
My idea is now to replace this txp:zem_contact_text-field with an txp:zem_contact_select field where all movie titles are listed which are a) live AND b) have the custom-field “reservation” pointing to “yes”. The list would then contain about the 7-14 movie titles per week (and they change every week, so it has to be automated) for which a reservation is feasible.
Is this possible? I have NO idea about doing queries from the database… Maybe there’s a solution for dummies like me :-)
TXP Version 4.0.7, glz_custom_fields 1.1.3, PHP: 5.2.13, MySQL 4.1.22
(And yes, these are all very outdated, but i experienced many problems while updating (even to 4.0.8), and THIS systems actually works like charme. I hope to have more time soon for solving the problems)
Thanks a lot!
David
Offline
#934 2011-01-06 17:31:50
Re: zem_contact_reborn 4.0.3.20
How about something like this:
<txp:zem_contact_select
label="Select a Reservation"
list=',<txp:article break="," section="movies" reservation="yes" wraptag=""><txp:title/></txp:article>' />
Offline
#935 2011-01-06 17:48:19
- phuture303
- Member
- Registered: 2008-09-14
- Posts: 127
Re: zem_contact_reborn 4.0.3.20
Hi John,
that was fast – and perfect! Didn’t know that i could do this like that… I had to use article_custom instead of article (the reservation form is in another section, with txp:article the list stayed empty. But this works perfectly for me (with my German translation ;-)
<txp:zem_contact_select
label="Film"
list='*,<txp:article_custom break="," section="filme" wraptag="" limit="99" time="any" sort="title asc" kartenreservierung="ja"><txp:title/></txp:article_custom>' />
(Works on a 4.0.8-install (yes, i’ll try to update in small steps :-)
Thanks a lot, that’s simple and great!
David
PS: There’s still one question!
I have a movie title called “Die Jönsson-Bande & der Cornflakes-Raub” – the “&” is shown as raw html (&) in the dropdown – is there a possibility to show the ampersand in “clean”?
Last edited by phuture303 (2011-01-06 17:54:15)
Offline
#936 2011-01-06 18:54:06
Re: zem_contact_reborn 4.0.3.20
David, replace <txp:title /> with
<txp:php>global $thisarticle; echo str_replace('&', '&', $thisarticle['title']);</txp:php>
Last edited by ruud (2011-01-08 19:35:10)
Offline
#937 2011-01-11 16:24:35
- qp2wd
- Member
- Registered: 2011-01-11
- Posts: 24
Re: zem_contact_reborn 4.0.3.20
Has anyone else had problems with this plugin under Godaddy hosting? I haven’t been receiving any of the email it sends, despite verifying the delivery email address and not receiving any errors prior to sending. Godaddy says there’s nothing they can do about it as they see no problems on their end, and they suggest that I use their mail plugin, which I really don’t want to do. So. If anyone has been able to successfully send and receive mail using this plugin and Godaddy, I’d love to know. Did you have to do anything special, or can this be chalked up to Godaddy’s incredibly slow email system?
EDIT: After digging around for a bit, I was able to locate a post in this thread mentioning TXP’s SMTP envelope setting as a possible solution when emails aren’t being received. I set it and I’m now correctly receiving email from zem_contact_reborn. Huzzah!
Last edited by qp2wd (2011-01-11 21:08:36)
Offline
#938 2011-02-16 00:46:30
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: zem_contact_reborn 4.0.3.20
Ruud, for txp:zem_contact_email how about making input type="email" … for mobile phones, etc!
Offline
#939 2011-02-16 03:35:00
Re: zem_contact_reborn 4.0.3.20
nardo wrote:
Ruud, for
txp:zem_contact_emailhow about makinginput type="email"… for mobile phones, etc!
I’d like that too. Browser-wise, it’s backwards-compatible, since the fallback for unknown input types is text. Unfortunately this would break compatibility for anyone trying to validate under XHTML, since the only valid types for XHTML 1.0 Strict are “text”, “password”, “checkbox”, “radio”, “submit”, “reset”, “file”, “hidden”, “image”, and “button”.
Offline
#940 2011-02-16 03:45:16
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: zem_contact_reborn 4.0.3.20
johnstephens wrote:
I’d like that too. Browser-wise, it’s backwards-compatible, since the fallback for unknown input
types istext. Unfortunately this would break compatibility for anyone trying to validate under XHTML, since the only validtypes for XHTML 1.0 Strict are “text”, “password”, “checkbox”, “radio”, “submit”, “reset”, “file”, “hidden”, “image”, and “button”.
I thought that cult had had its day!
Offline
#941 2011-02-16 15:47:04
Re: zem_contact_reborn 4.0.3.20
HTML5 is still a working draft, not final.
Offline
#942 2011-02-17 17:26:35
Re: zem_contact_reborn 4.0.3.20
hi there,
i’ve got a problem with the expiry of contact forms.
first of all, why do they expire? i suppose it is to keep spam down? the expiry appears to be specified here:
header('Expires: '.gmdate('D, d M Y H:i:s',time()+600).' GMT');
meaning it takes 600 sec. to expire?
i’m building a single page website that contains, all in one-style, a contact form hidden in a toggled div, so an expired form is a bad thing here, for once.
cheers! -f
Offline
#943 2011-02-17 19:49:42
Re: zem_contact_reborn 4.0.3.20
The Expires header only affects page caching. This doesn’t affect form submission. What you’re looking for is this lines like this one:
safe_delete('txp_discuss_nonce', 'issue_time < date_sub(now(), interval 10 minute)');
If you’re also using comments on your website, do not change this line, because it would affect the comment nonces as well. You’d have to change this query instead:
safe_insert('txp_discuss_nonce', "issue_time = now(), nonce = '$zem_contact_nonce'");
Offline
#944 2011-02-17 21:59:29
Re: zem_contact_reborn 4.0.3.20
ruud wrote:
Assuming you have code like this in your form:
<txp:zem_contact_secret name="secret" value="topsecret" />You could do this (not tested, and I’m a bit puzzled why your code doesn’t work):
register_callback('pax_myFunction','zemcontact.submit');
function pax_myFunction()
{global $zem_contact_from, $zem_contact_values;
if ($zem_contact_values['secret'] == 'topsecret'){file_put_contents('testFile.txt', $zem_contact_from.n, FILE_APPEND|LOCK_EX)or die ("couldn't write to file");}
}
This works perfectly as long as every contact form on the site includes a field named `secret`. But if I create a form that isn’t meant to interact with the text files and omit a field named `secret`, I get a PHP error. Is there a way to nest if ($zem_contact_values['secret']== within another conditional that checks if the named field exists before executing?
Offline
#945 2011-02-18 12:38:36
Re: zem_contact_reborn 4.0.3.20
ruud schrieb:
The Expires header only affects page caching. This doesn’t affect form submission. What you’re looking for is this lines like this one:
safe_delete('txp_discuss_nonce', 'issue_time < date_sub(now(), interval 10 minute)');
If you’re also using comments on your website, do not change this line, because it would affect the comment nonces as well. You’d have to change this query instead:
safe_insert('txp_discuss_nonce', "issue_time = now(), nonce = '$zem_contact_nonce'");
danke je wel, ruud, i’ll play around with these settings!
Offline