Here's the story (and the need) : we're working on a website under drupal 7 (;)) Into it, there'll be a content with a field (repeatable) where one can put some (no limit in there numbers) emails : Joe Doe's email, Paul Simon's email, etc.

When the content is save (unpublished by default), a mail must be sent to each collected emails with a standard text and two links, one called "Yes", the other "No"

A. When Joe Doe gets his mail, he just have to click on "Yes" or "No" to follow the "Yes" or the "No" link that drive's him to a page to say that his "vote" has been registered.

B. Behind/after that (you've understand it) we've to collected those votes "Yes" or "No" and to manage a condition : as soon as we have have number of collected "Yes" equal number of collected emails, the content has to be published - and of course, the content stays unpublished until that moment.

Is anybody here having some ideas on how one can made A and then B working ? We're thinking of use Webform or Poll but I can't figure how to do that "easily", nor if it is possible.

The B. need should be "easy" to configure ; but I have no idea for A. and that "vote by email" stuff

Any idea welcome (for A and B :)
Best regards

D.

Comments

john_b’s picture

You should be able to send email with Rules module.

You may be able to collect votes with Flag and http://drupal.org/project/dlike. A major issue is how secure you need to be about stopping someone voting twice. I am not sure if that setup prevents repeat voting using Cookies. The method is obviously insecure. You may need to create a unique single-use request string for each vote to be more secure. Sounds a little complicated.

To publish automatically one option may be to count votes in a non-displayed view and use Views / Rules integration to trigger publication.

It is pretty complicated so it may be better to write or commission a custom module.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors