Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2005-12-06 13:33:13

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: Plugin Request: improving zem_contact for money

<blockquote>
@ aslsw66 – would it be possible to turn your code into a plugin?
</blockquote>

Wasnt there an online plugin generator somewhere?


“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

#38 2005-12-06 13:59:36

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

Re: Plugin Request: improving zem_contact for money

Neko wrote:
Can you make it work with an image submit button rather than the default submit button?
I can contribuite too with a few dollars.

This is a CSS job, and nothing else.

Offline

#39 2005-12-06 19:14:52

Neko
Member
Registered: 2004-03-18
Posts: 458

Re: Plugin Request: improving zem_contact for money

> Jeremie wrote:

This is a CSS job, and nothing else.

You could even look smarter if you actually posted the code or a link. I know you can!

Offline

#40 2005-12-07 17:46:55

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

Re: Plugin Request: improving zem_contact for money

if you can assign a class to the button of, say, “button”, it could go something like

<code>.button{
background-image:url(path/to/image.jpg);
width:80px;/* change these 2 values to the width and height of your image */
height:30px;
border:none;
text-indent: -9000px; /* remove the text on the button by indenting it out of the visible area */
}</code>

untested code, but should work at least with some modifications

Last edited by kemie (2005-12-07 17:49:55)


~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~

Offline

#41 2005-12-07 20:01:30

Neko
Member
Registered: 2004-03-18
Posts: 458

Re: Plugin Request: improving zem_contact for money

Thanks Kemie, I really appreciate it.

Offline

#42 2005-12-07 20:46:01

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Plugin Request: improving zem_contact for money

If you can’t assign a class directly this javascript will assign a class of the input type to the input. That way you can specifically affect them using input.text, input.checkbox, input.radio. This makes it so you can affect only text inputs without worrying about giving your checkboxes borders (which happens in IE)

<pre><code>
function setInputClasses(form) { var aInputs = form.getElementsByTagName(“input”); for(var i = 0; i < aInputs.length; i++) { var inputClass = aInputs[i].className + “ “ + aInputs[i].type; aInputs[i].className = inputClass; } return true;
}
</code></pre>

It expects the form it is supposed to operate on to be passed in as an object (say for example as the result of a getElementById)


Shoving is the answer – pusher robot

Offline

#43 2005-12-07 22:21:13

Neko
Member
Registered: 2004-03-18
Posts: 458

Re: Plugin Request: improving zem_contact for money

Sweet! Thanks a lot. :)

-N.

Offline

#44 2005-12-09 10:52:22

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: Plugin Request: improving zem_contact for money

OK, the next version of my modified zem_contact is here. As usual, this is replacement code for the original.

In this version, I have:

  • checked the XHTML sent to the browser. It seemed to be OK anyway,
  • spaced the XHTML out a bit to make it a bit more readable. I’m an (x)HTML field and I like my code to be readable,
  • added in the zem_contact_secret field. It takes two attributes: ‘name’ is the name and id of the field, ‘default’ is the value passed back. I removed all the other attributes like size, required etc because they don’t make much sense in the context of a hidden field.

Unless someone can offer some more guidance, I’m going to drop internationalisation and also the issue of headers sent by the email.

Comments, problems, suggestions all welcome.

Offline

#45 2005-12-09 16:06:57

fpradignac
Plugin Author
From: France near Cognac
Registered: 2005-01-29
Posts: 359
Website

Re: Plugin Request: improving zem_contact for money

> aslsw66 wrote:

> Unless someone can offer some more guidance, I’m going to drop internationalisation and also the issue of headers sent by the email.

Well it seems to become a vey cool plugin.

Thanks aslsw66,
françois.


françois

Offline

#46 2005-12-09 17:51:11

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

Re: Plugin Request: improving zem_contact for money

I am getting this error when trying to send the form: <code>tag_error <txp:zem_contact form=“contact_form” /> -> Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Requested action not taken: message refused</code>

Any ideas how to fix this?

Offline

#47 2005-12-10 12:15:06

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: Plugin Request: improving zem_contact for money

Can you give me the coding you have used for this, and I’ll test it? Not being a crash hot PHP coder I dojn’t give any guarantees, but I will take some time to go through it …

Of course, I have seen lots of error messages along the way but not this one!

Offline

#48 2005-12-10 12:29:14

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

Re: Plugin Request: improving zem_contact for money

Two question for users of this plugin:

1. Foreign language characters seem to put off the form. Using HTML entities like &aring; makes the form work, but in the resulting email, its hard to read

2. Is there a way to have the form submitted, then have a thank you message display without the form being shown again? I can display a thank you message, but I don’t know how to remove the form itself after submission

Thanks!

(Edit: fixed it so your entity is displayed as you entered it, rather than rendered. :) -Mary)

Last edited by Mary (2005-12-10 19:17:26)

Offline

Board footer

Powered by FluxBB