Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Plug-in: zem_contact_reborn

#145 2006-01-27 14:24:49

dominik.osterholt
Member
Registered: 2006-01-13
Posts: 18

Re: Plug-in: zem_contact_reborn

> thebombsite wrote:

> @Dominik – I have been considering this since you first mentioned it but I’m not sure it’s something that would be popular, nor that it should be a part of a contact form plug-in. There is a specific “ratings” plug-in already available. Have you had a look at that?

Now I have. But if I understand it correctly, the tcm_rating plugin is for rating specific articles or sites, but that’s not what I’m looking for. I’m seeking for a way to let users and customers give a rating of certain services through a feedback form. So the rating should not concern the website or its articles, but the “offline” service of the company. Thus, the customers can give their feedback easily by email.

Rather, the form should look like that:

Please rate our services (1 to 6, very good to very bad):

Kindness of our employees… 1 2 3 4 5 6 [radio buttons]

… and so on.

At the moment, I’m using dropdown-lists, which works, but I really think radio buttons would perform the task better.

Offline

#146 2006-01-27 15:43:21

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: Plug-in: zem_contact_reborn

Send to a friend option
Changing the content type to text/html by hacking like 169 or so, presents a nicely formatted article, but it also presents the other fields bumping up against one another. This is to be expected because these fields were output without tags of any kind. Now we’re using HTML, they’ll need <p> tags wrapped around them.

The ideal solution would be:
  1. to add a content=“html” or content=“text” attribute
  2. to look for thePHP that creates the email with fields and wrap a <p> tag around it…

Anyone game? Seems simple enough to me, but I’m not a PHPer yet.

-Dale

Offline

#147 2006-01-27 17:37:10

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: Plug-in: zem_contact_reborn

Stuart-
It seems that there is a space missing from the <code>errorElement</code> class. This causes the class to go from “zemRequired” to “zemRequirederrorElement” rather than “zemRequired errorElement”. It seems that an easy way to solve this and to keep the code clean would be to add a space when <code>$isError</code> is given a value:

<pre>
$isError = “ errorElement”;
</pre>

This way the <code>return</code> lines don’t have to change. Also, I just picked those names without much thought. There may be better names for <code>$isError</code> and <code>errorElement</code> than what I used.

Offline

#148 2006-01-27 19:29:48

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

Re: Plug-in: zem_contact_reborn

Actually it was deliberate. You can’t have 3 classes within the same tag, at least as far as I am aware, so it is appended to “zemRequired” to keep it down to 2. I also kept trying to think of any errors that might be thrown that concern input data, but aren’t related to required=yes and I could only think of 2 that are to do with silly email addresses, but that’s a “required” field anyway. The only other errors are to do with things like “to field is missing” and “form expired”.

It also means that I can keep the possible “returns” to 2 options and not have to add another and increase both the code and the db load. I think I’ve got it right. I spent a few hours trying to break it. You will also notice that I haven’t done it in quite the same way that you described above, but I was quite happy with the names you chose. Saves me trying to think some up. :)


Stuart

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

Offline

#149 2006-01-27 19:53:16

-P-
Member
From: Finland
Registered: 2005-09-10
Posts: 211

Re: Plug-in: zem_contact_reborn

<blockquote> > thebombsite wrote:

> @-p- Actually Els has a good solution there assuming you are working within sections. It would save having 2 copies running. If you keep a copy of the language function somewhere safe as a txt file you can simply copy/paste it back in when there is a new version release, checking for any additions first.</blockquote>

Ok, thank you. I will test that also. Don´t know how I missed that, I though I read the whole thread thru last nite before posting…. :D

Offline

#150 2006-01-27 20:58:47

jdykast
Member
From: Tennessee
Registered: 2004-12-30
Posts: 119
Website

Re: Plug-in: zem_contact_reborn

I was unaware of the class limit. With that in mind, your method seems to work like a champ.

Offline

#151 2006-01-29 06:53:59

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

Re: Plug-in: zem_contact_reborn

Version .12 available. No code changes so no need to rush. I’ve gone through the Help text and removed any errors or ambiguities and improved the formatting. Also added some information relating to localisation. If nothing else this will be the best-documented plug-in available. :)


Stuart

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

Offline

#152 2006-01-29 11:02:01

alexandra
Member
From: Cologne, Germany
Registered: 2004-04-02
Posts: 1,370

Re: Plug-in: zem_contact_reborn

Stu rocks :) Thanks for managing that!

Offline

#153 2006-01-29 11:22:40

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

Re: Plug-in: zem_contact_reborn

Ha haaaa. I’ll try anything once. ;)


Stuart

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

Offline

#154 2006-01-30 00:38:52

pfactor
New Member
From: Boise, ID USA
Registered: 2005-12-31
Posts: 8
Website

Re: Plug-in: zem_contact_reborn

Thanks to all involved with bringing this plugin back to life. It rocks!

I’m having a little trouble styling the output the way I’d like to. I wanted to have the zemError class items in the <ul> show up as red text, but they don’t. The input field labels do show up as bold and red as expected, but the bullets in the <ul> are black.

I’m sure it’s just some CSS syntax that I don’t have quite right. Can someone tell me what I did wrong?
<pre><code>#zemContactForm legend { color: #000; font-weight: bold; font-size: 125%;
}

.zemError, label.zemRequirederrorElement { color: #800;
}

label.zemRequirederrorElement { font-weight: bold;
}
</code></pre>

Thanks,
Phil

Offline

#155 2006-01-30 03:02:03

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

Re: Plug-in: zem_contact_reborn

I have this which works:

<code>
ul.zemError {list-style-type: none; margin: 5px; padding: 2px; border: 1px #f00 solid; color:#f00; background:#fff;}

.zemRequired {font-weight:bold;}

.zemRequirederrorElement {color:#f00; font-weight:bold;}

input.zemRequirederrorElement, select.zemRequirederrorElement,textarea.zemRequirederrorElement {background:#e2e2e7;}

p.red {color: red; font-weight:bold;}

</code>

Offline

#156 2006-01-30 05:30:10

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

Re: Plug-in: zem_contact_reborn

Try using “ul.zemError”. I don’t actually show the “list-style” over on my /test/ site but if I bring it back in and change “color” it does change the bullet colour as well as the text.

Last edited by thebombsite (2006-01-30 05:32:38)


Stuart

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

Offline

  1. Index
  2. » Archives
  3. » Plug-in: zem_contact_reborn

Board footer

Powered by FluxBB