Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#21 2007-02-21 16:26:31

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 255

Re: zem_contact_reborn 4.0.3.19 (old version)

Maybe I wasn’t clear in my previous post, but I want to connect an emailaddress to each option in the <txp:zem_contact_select /> tag. So the email goes to the correct emailaddress (the to attribute becomes a variable). I can’t find such an example in the help?


Regards,

Joey

Offline

#22 2007-02-21 16:39:01

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

You were perfectly clear…. First make sure that you’re using the 4.0.3.19 version of this plugin, which has a much improved plugin help. If you use an older version, please upgrade.

The example is in the “advanced examples” section of the help and is called “User selectable recipient, without showing email addresses”.

Offline

#23 2007-02-21 18:09:49

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: zem_contact_reborn 4.0.3.19 (old version)

Just wanted to say thanks for your work on this plugin, I’m using the new version without problems.

Offline

#24 2007-02-21 19:46:28

Joey
Member
From: Netherlands
Registered: 2005-01-19
Posts: 255

Re: zem_contact_reborn 4.0.3.19 (old version)

Thanks Ruud, I was indeed using 4.0.3.18. The new one has a very nice help, and it contains exactly what I was looking for. Thanks for the great work!


Regards,

Joey

Offline

#25 2007-02-26 13:35:19

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 9,639
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

LeeUmm wrote:

However, I think a better solution would be to count the time it takes the form to be submitted and if it’s less than say, 5 seconds, it’s spam.

Not sure if this is the right place for my musings but since the topic came up, here goes anyway: a looong time ago I experimented with an approach to spam filtering that required form submissions to appear ‘human’.

I’m a big proponent of a technique for authorisation (invented by a guy I happen to know) called Loosely Coupled Sets. For those that don’t know, LCS is a system whereby you take a series of very rough, yet equally statistically weighted, measures about a process and if the majority “pass” within a set tolerance you can be pretty sure the person is “real” and not an imposter.

Contrast that with a single method of authentication, e.g. a PIN, an iris scan, RFID chip, or a fingerprint, which are all ridiculously prone to error and doomed to fail or mis-represent someone in time.

A good example is this: you have a keypad entry system to a building. The 6-digit passcode is easily stolen or gained. A fingerprint/iris is cloneable or you can cut someone’s finger/eye off and use it. But if the system loosely measured:

  • The person’s height as they approached the door
  • Their weight
  • Their stride length/gait
  • The pause between reaching the keypad and beginning to enter numbers
  • The delay between each consecutive digit as they’re punched in
  • How long before the iris scan/fingerprint is presented to the system

etc etc, then each of these build up a “profile” of that person. Obviously things fluctuate and the system has to “adjust” over time and “learn” up front, but the idea is that once a profile is stored, an imposter is likely to fail one or more of the mannerisms, or perform them outside of tolerance. If the real person hurt themselves and limped, the system would (rightly) think they were an imposter and seek a 2nd opinion from a human operator because the height/gait and stride would all be off.

Anyway, back in the world of spam detection, I experimented with a similar thing. In addition to the usual checks; referrer, domain, e-mail address yahde yahde, I added a host of javascript object timers that were supposed to roughly capture stuff like time between keystrokes, time between onblur events, time to submit as a whole, time the page was on-screen etc etc. Nothing too accurate; the system works best with a lot of very rough measurements than a few very accurate ones.

It would then fire off all the results to the server, along with the rest of the black-and-white form data and the server could decide if, overall, the results were “reasonably human”. Those it thought were suspect could be flagged and redirected to another box. Of course, I never finished it and the code has now fermented in the mists of time :-(

To gain the most from the system it was intended as a means to authenticate someone, and be linked to a person’s profile, which means you’d have to store the results against a username and verify that way. Evidently, for a one-shot contact form this is somewhat out of scope!

The best we can hope for is to pick a reasonable “range” of values that represent how most humans behave compared to how a bot might behave and use these heuristics to make an intelligent stab either way. The spammers have then got to make their bots act like a human as well as fill in all the right boxes and get all the data in the correct format to pass; which is less likely to get through than a decision based on simply testing the “content”. Keeps us ahead of the game anyway… for a while at least. Just got to see the, mostly laughable, Turing Test conversations to see how far AI is away from reality.

I know that ‘less likely’ is a woolly measure and far from certainty, but I think it would be an improvement as only those people who typed faster than a machine (or spent 3 days filling the boxes in) would have their message put in a potential spam box – or binned depending on the severity of the offence. Less false positives gets my vote. Compare that to the nigh-on useless spam prevention measures we have today and it could be a fair step forward. [ I think the TXP comment-spam filter is great, btw. At least, I’ve not had any spam problems. Mind you, I only get three visitors a decade ]

I’d love to be able to prove (hopefully not disprove.. *gulp *) that this system would help in the fight against spam; even comment spam – maybe the obvious ‘fail’ messages go into a moderation queue while others get posted straight to the page? But it needs some graft and experimentation with a broad range of computer users/bots to gauge its effectiveness, which I don’t have the time to do on my own. If anyone fancies collaborating on something like this or has some ideas on loose measurable metrics (or any better ideas), let’s move this to a new thread and start something…

Was gonna say “that’s my 2p”, but it’s more like a pound’s worth…
Of drivel :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#26 2007-02-28 06:21:05

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: zem_contact_reborn 4.0.3.19 (old version)

Is there a way using zem contact reborn to send information stored in custom fields in an article.

Here is how I would like it to work:

The user hits a button and the form appears. All the user needs to do is type in their name and email and hit send. At the point they hit send, what is sent is there information to an email that is stored in an article custom field, PLUS several pieces of information information that is also stored in other custom fields. I tried using the secret fetaure, but may be doing something wrong.

Any and all guidance would be greatlt appreciated.

Thanks.

progre55

Offline

#27 2007-02-28 06:38:57

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,267
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

Try this:

<txp:php>
zem_contact_store('any-label-you-like', 'a name which will appear in the message', 
custom_field (array('name' => 'my custom field'))
);
</txp:php>
<txp:zem_contact ...usual attributes come here... />

Replace 'my custom field' with the name you gave to your custom field in preferences.

Last edited by wet (2007-02-28 06:41:54)

Offline

#28 2007-02-28 09:17:20

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

Which can also be done like this (you may have to remove spacing and linebreaks between the tags, but I’ve added it so it looks better here):

<txp:zem_contact_secret label="label which appears in the message">
  <txp:custom_field name="my custom field" />
</txp:zem_contact_secret>

The zem_contact_secret tag goes inside the zem_contact container tag along with the other tags for building the form. The order of the form fields is also used in the email.

Last edited by ruud (2007-02-28 09:18:47)

Offline

#29 2007-02-28 13:08:08

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: zem_contact_reborn 4.0.3.19 (old version)

wet/rudd:

thanks.

I will test out, and hopefully that will answer how to pass custom field info. I think I had my tagging wrong.

But I still have two questions:

How I can make the “to” in the email the value of a custom field in an article, since this form will be use on a single page, but for many different articles?

I have a graphical button that I want to initiate this process, ie the user hits the button and then a pop up occurs with the form for the little bit of info I need for them to fill out. Is this the best way to accomplish my goal or do I need to redirect them to another page?

thanks again for all the assistance.

progre55

Offline

#30 2007-02-28 14:43:55

ruud
Developer emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: zem_contact_reborn 4.0.3.19 (old version)

Use a to_form with something like this:

<txp:custom_field name="custom field name" />

I don’t know if a popup will work. Unless the form is on the article page, how will it know the contents of the custom fields for that article? Perhaps you can use some Javascript and CSS to hide the form by default and make it visible by clicking the graphical button.

Last edited by ruud (2007-02-28 16:03:48)

Offline

Board footer

Powered by FluxBB