Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: zem_contact_reborn 4.0.3.20
Just wanted to say thanks for all the hard work on this plugin. Keeps getting better and better and is a default install on all my sites…
KUDOS.
Offline
#26 2007-10-04 08:39:46
- ricoschette
- Member
- From: Estonia
- Registered: 2005-09-17
- Posts: 176
Re: zem_contact_reborn 4.0.3.20
Nice work!
Is it possible to display different ‘thank you’ note in different sections?
For example, in “Contact” page it would display ‘Thank you, your message has been sent!’ after submitting.
And on products page it would give – ‘Thank you, your order has been sent!’
Offline
Re: zem_contact_reborn 4.0.3.20
Sure. In the thanks_form you can use other TXP tags like <txp:if_section>
Offline
#28 2007-10-16 06:23:49
- uncalau
- New Member
- Registered: 2006-05-30
- Posts: 3
Re: zem_contact_reborn 4.0.3.20
Hi,
I am using the latest version of this plugin on a web project.
What I encounter is that in IE6 Window XP (SP2), after the message is send, the page remain at the ‘thank you’ page. Even if I click on the link back to the contact form, it stays the same until I cleared the cache manually.
This does not happen to other browsers and even IE7 on Vista works.
Could anyone share some thoughts on this and how can I make the cache work on IE6 because a large number of my potential visitors will still be relying on IE6 and most of them have not upgrade to Window Vista. I may not be possible to convince everyone to use FireFox either.
The scenario:
I use the template “Block Rocker” by Matthew Smith.
When a user click “SEND” in the contact form, the message is send and
A “Thank you” page is shown
When the user click “contact” again, the contact form shows.
However in IE6, no matter how many times you click the “contact” button,
the “Thank you” page remain….until you clear the cache….
Thank you.
Offline
Re: zem_contact_reborn 4.0.3.20
Sounds like a too aggressive caching algorithm in IE6. If you go to tools -> internet options -> cache settings, how often is the cache set to refresh? (automatic should be fine, I think, but ‘never’ could cause problems).
Perhaps you can avoid the problem by using the “redirect” attribute in the zem_contact tag.
Offline
#30 2007-10-16 13:38:19
- uncalau
- New Member
- Registered: 2006-05-30
- Posts: 3
Re: zem_contact_reborn 4.0.3.20
ruud,
Thanks for your suggestion. I have no idea about the IE algorithm since all my settings are by default. cache is set to automatic…. Could not really understand why IE6 is acting funny with this plugin.
I tried the “redirect”, it works. Thanks for pointing that out to me…. really appreciate your time and sharing. However, just to make sure, here is what I have done:
Step 1:
I change
<txp:zem_contact to=“user@domain.com” thanks_form=“contact_thanks” />
to
<txp:zem_contact to=“user@domain.com” redirect=“thanks” />
Step 2:
I create a new section called “thanks” and create a page for it. Then I place a ‘link’ in the thank you message to link back to the ‘contact’ page.
It works! If you have a better way of doing this, please let me know…thanks again.
Offline
#31 2007-10-16 18:01:29
- Logoleptic
- Plugin Author
- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: zem_contact_reborn 4.0.3.20
@uncalau: Though you’ve solved the problem using the “redirect” attribute, there’s a quick way to figure out if any future problems are caused by over-aggressive caching. You can re-load a page entirely from the server (bypassing your browser cache) by pressing Ctrl + F5
. This works in all major browsers.
Edit: The keyboard shortcut may be different on a Mac.
Last edited by Logoleptic (2007-10-16 18:02:25)
Offline
#32 2007-10-19 21:10:29
- novatron6
- Member
- Registered: 2006-10-15
- Posts: 11
Re: zem_contact_reborn 4.0.3.20
Hello,
I was wondering if there was a way to use the “User selectable recipient, without showing email address” feature from a link, meaning on a page a user clicks on “EMAIL DOUG” or “EMAIL SARAH” and it takes them to the contact form with the specified recipient already selected. Does that make sense?
Any help would be appreciated, thanks!
Offline
#33 2007-10-19 22:31:12
- Logoleptic
- Plugin Author
- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: zem_contact_reborn 4.0.3.20
novatron6 wrote:
I was wondering if there was a way to use the “User selectable recipient, without showing email address” feature from a link, meaning on a page a user clicks on “EMAIL DOUG” or “EMAIL SARAH” and it takes them to the contact form with the specified recipient already selected. Does that make sense?
You could do this by using GET variables (also known as URL variables). This is a way of passing data other than a page reference in a URL, so that the page at that URL can act on the data somehow.
You can see GET variables in action when you use Google. If you search for information about Textpattern and set your preferences to return 100 results per page, the URL of the results page might look something like this (look after the “?”): http://www.google.com/search?num=100&q=textpattern
In your case, the links to your contact page could contain a “to” variable. For instance: http://www.example.com/contact?to=doug
Making sure that the right person gets the message involves some PHP mixed in with your contact form code. I think this will work, depending on how Textpattern parses the <txp:php>
tags (can anyone confirm?):
<txp:php>
if ( isset( $_GET['to'] ) ) {
switch( $_GET['to'] ) {
case 'doug':
</txp:php>
<txp:zem_contact_select label="Department" list=",Doug,Sarah" selected="Doug" />
<txp:php>
break;
case 'sarah':
</txp:php>
<txp:zem_contact_select label="Department" list=",Doug,Sarah" selected="Sarah" />
<txp:php>
break;
default:
</txp:php>
<txp:zem_contact_select label="Department" list=",Doug,Sarah" />
<txp:php>
}
} else {
</txp:php>
<txp:zem_contact_select label="Department" list=",Doug,Sarah" />
<txp:php>
}
</txp:php>
If you’re not comfortable with PHP, there’s another way to do it by combining a few plugins. Let me know.
Last edited by Logoleptic (2007-10-21 18:58:37)
Offline
Re: zem_contact_reborn 4.0.3.20
I think this plug-in will be helpful: chs_if_urlvar
Offline
#35 2007-10-20 05:04:47
- novatron6
- Member
- Registered: 2006-10-15
- Posts: 11
Re: zem_contact_reborn 4.0.3.20
Thanks Logoleptic and maniqui,
I think this will help, not too familiar with PHP but have worked with it a little, I will let you know if I get it to work, thanks!
doug
Offline
#36 2007-10-21 10:26:04
- Logoleptic
- Plugin Author
- From: Kansas, USA
- Registered: 2004-02-29
- Posts: 482
Re: zem_contact_reborn 4.0.3.20
I think this plug-in will be helpful: chs_if_urlvar
Yeah, that’s one of the plugins I had in mind. You could combine it with asy_wondertag to use the value of the to
GET variable as the value of the selected
attribute for <txp:zem_contact_select />
:
<txp:chs_urlvar_exists var="to">
<txp:asy_wtag><txp:zem_contact_select label="Department" list=",Doug,Sarah" selected="<txp:chs_urlvar_echo var="to" />" /></txp:asy_wtag>
</txp:chs_urlvar_exists>
I’m not sure what ZCR would do if to
had a value that didn’t match any of the options in the tag’s list
attribute (e.g. ?to=bob
). If this produces an error message even when the site’s production status is set to “Live,” you might be able to compensate using chh_if_data (chs_if_urlvar doesn’t support <txp:else />
to handle these exceptions itself). Using chh_if_data this way would be more complicated and less flexible than the example I’ve given above, so it probably isn’t worth it unless other people will have the ability to create and edit these “Email [Somebody]” links.
One caveat about chs_if_urlvar: I’ve had problems with it producing a ton of error messages when a site’s production status is set to “Testing” or “Debugging.” it works just fine, but the top of the page ends up full of debugging code. I’ve e-mailed the author about this, but gotten no response. If you’re doing any experimental work that might require changing the production status, I’d recommend doing it on localhost or some other testing-only environment.
Offline