Content Polls module, new way to evaluate and rate!

miraclestyle - June 29, 2009 - 16:11

I am not a drupal developer, however I have defined exactly what I currently need for my (drupal based) web site, and I would like to share my idea with drupal community.

I personally believe that this module would gain high popularity in drupal world.

I have also small budged on a side for supporting the development of this module.

Perhaps, there is another approach to developing the features explained below. Developers should know that better than me, so I leave that up to them.

So, here it is!

Content Polls module

So far, we've seen evaluation and rating modules that provide overall content rating. They lack precision of what it is about the content that reader likes and what he/she doesn't like. With support of comment system, readers have more freedom of expressing their opinion however, this approach still lacks crucial analytical property.

Presented is the concept that could bring evaluation and rating system to the whole new level.

Module design

The module automatically generates poll(s) and associates them with a node being created, based on the content type and/or taxonomy term chosen to categorize the node.

- poll associations are admin configurable set of parameters that associate poll template nodes with node types or taxonomy terms.

- poll template node is a drupal core poll node, created as read only node that isn't used anywhere in the system.

- poll instance node is a drupal core poll node cloned from poll template node, that is automatically attached to a single node instance of a certain content type, and/or associated with certain taxonomy term(s), and exists during the existence of the node instance.

- poll instance nodes should make use of the views.

CASE EXAMPLE

Content type "place" allows users to submit nodes about the locations they've visited or otherwise have knowledge about. It includes information such as: street address, city, zip/postal code, etc.; google map entry; location images; text description; etc. It's also associated with mandatory taxonomy vocabulary "place type" that classifies place, for example: disco club; grocery store; museum; etc.

Poll template nodes are predefined by site moderators, with each poll containing a question and set of possible answers.

Poll associations further associate particular taxonomy terms of vocabulary "place type" with particular poll template node(s).

Once a new "place" is created, poll instance node(s) will be created based on the poll associations criteria, and attached to the "place" node, without authors intervention or control. These poll instance nodes will remain glued to the "place" node, and will be erased once the node has been erased.

Once they encounter the "place" they've also visited or otherwise have knowledge about it, other site users are challenged to answer polls' questions that are related to that "place" and therefore provide feedback about it.

Site users may as well use predefined views that filter and sort the place nodes based on the associated polls' evaluations.

i dont understanding this

mm167 - June 30, 2009 - 11:55

i dont understanding this ...

"Poll template nodes are predefined by site moderators, with each poll containing a question and set of possible answers."

could u give an example ....

say ..I have been to Disneyland in Florida. i dont like it. too expensive. too many people. long queues....

I created a node. mentioned all my bad feelings.

Then .. what question and answers u may set to my node?

We go the drupal way. How about you?
http://www.drupalway.com

It goes like this:

miraclestyle - June 30, 2009 - 13:52

It goes like this:

Let's say that "place" content type utilizes following modules: Location; GMap; CCK; FileField; ImageField.

Site admin has defined the content type with following fields:

Place Name - (Title field label)

Location Type - (Taxonomy vocabulary)
Location - (Location Field) - Here you have fields for: street; city; zip; state; country.
map - (GMap)
info - (textarea)
images - (image field)

Site admin has defined following poll template nodes (which are in fact just ordinary polls, functionality of a drupal core poll module) and associated all of them with "Location Type" term "theme park":

Poll template node 1

How are you satisfied with prices?

1. So much fun for a dime!
2. I can bear the expenses!
3. It's getting too much out of my pocket!

Poll template node 2

What about the crowd?

1. Nobody is there!
2. It was just fine!
3. It's too crowded!

Poll template node 3

Staff?

1. They take good care of me!
2. They are ok!
3. The don't care about their customers!

So, you have been to Disneyland in Florida, and you create a "place" node choosing "Location Type" term "theme park" for category, filing "Location" fields with address, marking a place on a Google Map, typing in whatever is on your mind, and adding some images. And just after you click Save button, your node is created with those associated polls below it. After that you can vote on the questions, just as anybody else on the site.

There are no limits to the poll questions and answers. No limits to the number of polls associated with each taxonomy term. Poll can be associated by multiple terms, so it gets created for different types of location. For example: "How are you satisfied with prices?" is a question that can be related to stores, disco clubs, theme parks, etc.

Of course, it doesn't have to be a "place" at all. Anything that comes to your mind is a well enough. :D

The work flow is important:

- define content type
- define content type fields
- define taxonomy vocabulary
- define vocabulary terms
- define poll template nodes
- associate poll template nodes with content types
- associate poll template nodes with taxonomy vocabulary terms
- let people post content
- let people vote on content

Hope, that clears the things a bit.

Peace.

That look interesting. here

ecstasy2 - June 30, 2009 - 13:31

That look interesting.
here is what i think about this (please correct me if i'm wrong).
I think this is a new way to evaluate content based on different criteria.
Usualy, what we achieve using rating modules such as 5Star is to express our feeling about a content: whether or not we like it (the more we give stars the more we like the content).
With this module however, i think we can achieve better review of content content.
Say that we have a video content type:

if we use 5 star:
when the user rate it with 4 stars : he want to say that he liked the video as a whole and give it 4 stars.

using this module, the admin whould create a poll template like this one:

  • How did you find the quality of this video ?

    1. Good
    2. Not Good
    3. ....

But he can also create a poll like this one:

  • Did you seen this video before ?

    1. Yes
    2. No
    3. I don't Know

As you can see, this is a very flexible way to rate content.

However, i think that there are few things that need to be defined/designed in a flexible way such:

  1. I think that The way poll templates are assigned to a content need to be extensible: (taxonomy, content type, ....)
  2. Does more than one poll can be associated to a content?
  3. When node are edited: do we reasign the template?

Been a Top Drupal Project Manager one step at the time.

* How did you find the

vertazzar - June 30, 2009 - 13:47

    *
      How did you find the quality of this video ?
         1. Good
         2. Not Good
         3. ....

    *
      Did you seen this video before ?
         1. Yes
         2. No
         3. I don't Know

Exactly.

However, i think that there are few things that need to be defined/designed in a flexible way such:

   1. I think that The way poll templates are assigned to a content need to be extensible: (taxonomy, content type, ....)
   2. Does more than one poll can be associated to a content?
   3. When node are edited: do we reasign the template?

I agree that it should be highly customizable, that you can create template poll for each content type, or maybe even by taxonomy category ?

e.g. You have the content type "event" => you create poll template of type "1.how was it? (horrible,fine, amazing etc.) , What was the atmosphere? (horrible,fine, amazing etc.), Did the service did their job well? (horrible,fine, amazing etc.)"

That is by the content type.

But we could be more specific if we could create poll template for every taxonomy category, e.g. content=>EVENT, taxonomy=>PARTY

if PARTY category , then get poll template xxxx.

etc.

Personally i think this module is highly innovative and it will bring evolution to the "polls" world. We all remember "polls" like basic voting stuff e.g. ;

"Do you like this site?"
1. Yes, its nice
2. Not bad
3. No, it sucks
4. Worst site i've ever seen.

and such, pretty much useless eh?

All of the above is correct!

miraclestyle - June 30, 2009 - 13:56

What you've just said is totally correct.

And I already suggested that the polls should be associative by content type or (even better) taxonomy terms!

Unfortunately, I am not a developer to build this module, but hope that someone would get involved. :D

Peace.

what u talking about is a

mm167 - June 30, 2009 - 14:25

what u talking about is a feature in fivestar - multiple axis

user may vote a node in more than 1 item.

say price, staff, ..etc.

We go the drupal way. How about you?
http://www.drupalway.com

I am afraid that this isn't really anything like a fivestar.

miraclestyle - June 30, 2009 - 15:01

I am afraid that this isn't really anything like a fivestar.

I want to ask the audience specific questions and offer them very specific answers to respond to. Just the way you can do it with core drupal Poll module.

And those questions should precisely match the subject of the content!

As miraclestyle said, what

ecstasy2 - June 30, 2009 - 19:10

As miraclestyle said, what this module will provide is note to rate on multiple axis: it will provide a question with precise answers.

Been a Top Drupal Project Manager one step at the time.

what u talking about is a

mm167 - June 30, 2009 - 14:27

what u talking about is a feature in fivestar - multiple axis

user may vote a node in more than 1 item.

say price, staff, ..etc.

We go the drupal way. How about you?
http://www.drupalway.com

Personnaly, i'm interested in

ecstasy2 - June 30, 2009 - 14:05

Personnaly, i'm interested in creating this module (i'll send you an email): i think it is really a brand new concept to associate polls to content on the fly.
However i wonder if using the core poll nodes is a good idea :

I think that here are the pros:

  1. No need to write the code to implemente the polling system
  2. Based on a core module (very robust, well tested, ...)
  3. Will save many times

Now the Con (i've found one yet):

  1. Create at least a node for each added node

What do you think about that?

Been a Top Drupal Project Manager one step at the time.

I agree with you about the pros

miraclestyle - June 30, 2009 - 14:35

I agree with you about the pros of the core poll module, but I don't quite understand the con that you've mentioned.

I was thinking that poll nodes should have double role in this scenario.

First to have the admins create "poll template nodes" which are just plain unpublished polls, and users can not vote on them, nor they are visible on site.

Second, the drupal engine should clone "poll template node/nodes", making "poll instance node/nodes", that are to be associated with the content that is being submitted based on the "poll associations" criteria.

However, I am not a developer, and therefore I don't consider myself competent to decide on development approach. So, whoever adopts this proposal, has a freedom to do it he/she thinks is the best way to do it.

About the con. Say you have

ecstasy2 - June 30, 2009 - 15:01

About the con.
Say you have 1000 nodes of type Video and you have configured so that each video to be associated to a poll, then there would be another 1000 nodes (of type poll) to create.
I don't know if this is a big problem for users.
I think that the goal of this discussion is to get feedback of other developpers in the forum.

Been a Top Drupal Project Manager one step at the time.

Ok, so you are thinking about

miraclestyle - June 30, 2009 - 15:21

Ok, so you are thinking about the existing nodes as well! Than the module should give to an admin options (once he configured everything as he wanted to be) to trigger the polls creation, or to schedule it on some cron time.

Let me use your example:

Say you have 1000 nodes of type Video and you have configured so that each video to be associated to a poll, then there would be another 1000 nodes (of type poll) to create.

It doesn't have to be 1000 poll nodes. Each Video content type could be associated with one or more polls, and each taxonomy term could be associated with one or more polls to be created as well. And each Video could be tagged by more than one taxonomy term. So at the end, we could have multiple polls created for each Video content. And those polls should be automatically generated out of the admin defined templates, and glued to the Video nodes. No user intervention should be required.

And yes, the goal is to get the feedback of those who are experienced with development.

Another approach...

miraclestyle - June 30, 2009 - 16:15

Another approach...

"Poll template nodes" could actually be "poll templates", that don't have to be nodes, but say part of Content Polls configuration. And the system would utilize them for generating "poll instances".

This is really a matter of development. The concept and work flow should just remain the same, that's all.

To respond to following

miraclestyle - June 30, 2009 - 17:24

To respond to following questions:

However, i think that there are few things that need to be defined/designed in a flexible way such:

1. I think that The way poll templates are assigned to a content need to be extensible: (taxonomy, content type, ....)

This is absolutely correct. Poll templates are assigned to the content by multiple criteria!

2. Does more than one poll can be associated to a content?

More than one poll could be associated to a content type. More than one poll could be associated to a taxonomy term.
This means that multiple polls could be glued to each content!

3. When node are edited: do we reasign the template?

Clones of the templates remain glued to the content, except in the cases when content tags are changed. The polls
change accordingly. Those which are not associated anymore get deleted, and new are created. However, polls always get reset upon content editing, since the user might completely change the content and therefore the votes in the polls would not be of relevance anymore.

This feature/behavior itself introduces more of a complex scenario. Perhaps, an option to the node author should be given upon editing the content, so he/she can decide whether to reset polls or not, on individual poll basis. We can go further and let the site admins decide through drupal permissions system whether to give more control to the author, so he/she may select the polls to be generated for his/her content, and further take care of the polls later during the content life cycle. The options are unlimited.

Token support is another

miraclestyle - June 30, 2009 - 17:29

Token support is another feature that would make polls even more personal!

So the poll could be:

How do you like [username]'s [taxonomyterm] [nodetitle]?

1. [username]'s [nodetitle] is great!
2. [username]'s [nodetitle] is ok!
3. [username]'s [nodetitle] is nothing special!

Content Polls vs. "the rest of the drupal evaluation world"

miraclestyle - July 3, 2009 - 15:59

We can think of Content Polls as dynamic content surveys as that's what they resemble in to. I am further commenting here to broaden the perspective of this module's potential.

If you were on a web site which utilized fivestar evaluation, and you've looked at a particular "place" content with associated taxonomy term "Restaurant", you wouldn't really know all the pros and cons of that "Restaurant" by simply observing the rating it has got. There are plenty of things that could make a Restaurant nice place to be, or bad place to be. While it may offer a good food, toilets could be disaster, the staff could be rude, music could be too loud, it could be too cold, poorly ventilated, etc. Conventional voting we see now on web, can't handle such things. That's why comments are often necessary to supplement the current evaluation systems. Content Polls could be designed to deal with those questions and much more. Think of any kind of content for this matter, not just "places" that I use in this example.

If we further explore our case, the Restaurants' owners/managers could benefit from it too. Instead going over each comment that users posted about a Restaurant, manager could easily spot the points that have to be improved. So that confirms that Content Polls could find their niche in a commercial world of web.

Content Polls & Views, perfect symbiosis!

miraclestyle - July 3, 2009 - 16:01

Integrating Views with Content Polls would make them do a lot more. Users could easily use exposed view properties to filter content by particular question and sort it based on the percentage of a particular answer which received user votes.

For example:

Filter "place" content with associated taxonomy term "Restaurant". Further, select a question that has been asked for "Restaurant" content such as "How's the food?". Than, sort the content view list by percentage proportion of the votes for an answer "It was delicious!" in a descending order.

And that is just one example of how those modules combined could have been used.

Poll Templates

miraclestyle - July 14, 2009 - 20:16

Under the drupal's "Site building" section, there should be a "Content Polls" item, with "Add Content Poll" and "List" options.

Add Content Poll

This option should allow creation of new poll template with following fields:

- "Poll" fieldgroup to include "Question", "Choice", "Vote count", "Add another choice" controls;
- "Question" textbox to fill in the desired question;
- "Choice" textbox to fill in possible answer to the question (there should be two instances of this field);
- "Vote count" textbox (just next to the "Choice" textbox) to set the starting number of votes for the given choice (there should be two instances of this field, respectfully to each initial "Choice" textbox), defaulting to 0 (zero);
- "Add another choice" button to add additional "Choice" textboxes to the poll;
- "Content types" fieldgroup to include checkboxes for each defined content type to be associated with the poll template;
- "Tags" fieldgroup to include multiple selection lists for each taxonomy vocabulary with it's terms to be associated with the poll template;
- "Poll behavior" fieldgroup that includes "Reset votes on content editing", "Permanently delete disassociated poll" controls;
- "Reset votes on content editing" checkbox which will indicate whether to reset all poll votes after the content is edited and saved. Default is checked;
- "Permanently delete disassociated poll" checkbox which will indicate whether to hide or permanently delete the poll that has been disassociated with a content as a result of it's tag associations (that initially associated the poll) being removed upon editing. In case the content is associated again with (previously removed) tags, the poll could be retrieved or a new one could be created, depending of the state of the checkbox. Default is checked;

List

This option should list poll templates that are already created, having their "Questions" displayed as list item titles. Each item should have an "edit" link, that will open a form for editing the poll template.

Edit form should allow for editing all of the poll template fields. In addition to "Save" button, there should be a "Delete" button to delete the poll template and all poll instances that were derived from it upon content creation, and "Reset" button to reset all votes on all poll instances that were derived from it upon content creation.

I will add suggestion for Content Poll Permissions soon.

Poll Templates 2.0

miraclestyle - July 15, 2009 - 10:36

Under the drupal's "Site building" section, there should be a "Content Polls" item, with "Add Content Poll" and "List" options.

Add Content Poll

This option should allow creation of new poll template with following fields:

- "Poll" fieldgroup to include "Question", "Choice", "Vote count", "Add another choice" controls;
- "Question" textbox to fill in the desired question;
- "Choice" textbox to fill in possible answer to the question (there should be two instances of this field);
- "Vote count" textbox (just next to the "Choice" textbox) to set the starting number of votes for the given choice (there should be two instances of this field, respectfully to each initial "Choice" textbox), defaulting to 0 (zero);
- "Add another choice" button to add additional "Choice" textboxes to the poll;

- "Content types" fieldgroup to include checkboxes for each defined content type to be associated with the poll template;

- "Tags" fieldgroup to include multiple selection lists for each taxonomy vocabulary with it's terms to be associated with the poll template;

- "Poll types" fieldgroup to include "Global poll", "Individual poll" radio buttons;
- "Global poll" radio button to indicate that one global poll instance should be created and glued to all of the associated content. If this button is checkd, controls of "Poll behavior" fieldgroup should be dimmed and read only;
- "Individual poll" radio button to indicate that one poll instance should be created for each associated content. Default is checked;

- "Poll behavior" fieldgroup that includes "Reset votes on content editing", "Permanently delete disassociated poll" controls;
- "Reset votes on content editing" checkbox which will indicate whether to reset all poll votes after the content is edited and saved. Default is checked;
- "Permanently delete disassociated poll" checkbox which will indicate whether to suspend/hide or permanently delete the poll that has been disassociated with a content as a result of it's tag associations (that initially associated the poll) being removed upon editing. In case the content is associated again with (previously removed) tags, the poll could be retrieved or a new one could be created, depending of the state of the checkbox. Default is checked;

- "Poll instance control" filedgroup that includes "Reset poll instances", "Recreate poll instances", "Suspend poll instances", "Activate poll instances", "Delete poll instances" controls that should react on form "Submit" or "Save" button click;
- "Reset poll instances" checkbox to reset all votes on all poll instances that were derived from it upon content creation;
- "Recreate poll instances" checkbox to recreate poll instances for all of the content that has been created and associated with the poll template;
- "Suspend poll instances" checkbox to suspend/hide poll instances for all of the content that has been created and associated with the poll template;
- "Activate poll instances" checkbox to activate/show poll instances for all of the content that has been created and associated with the poll template;
- "Delete poll instances" checkbox to delete poll instances for all of the content that has been created and associated with the poll template;

List

This option should list poll templates that are already created, having their "Questions" displayed as list item titles. Each item should have an "edit" link, that will open a form for editing the poll template.

Edit form should allow for editing all of the poll template fields. In addition to "Save" button, there should be a "Delete" button to delete the poll template and all poll instances that were derived from it upon content creation.

I will add suggestion for Content Poll Permissions soon.

Hi miraclestyle. I think

ecstasy2 - July 15, 2009 - 10:50

Hi miraclestyle.
I think there is a better and cleaner way to add Node Template.
It is to add maybe a checkbox on the poll add form (Use this poll as a Content Poll template).

When the user check this box, the Poll that is edited, won't be published.

There is another section called maybe: Template Assignement Rules

in this section, the user can create assignement rules says: When the node type is 'story' and the node is assigned with the taxonomy term term1
The user will crate as many as rules as he want (using AND and ORs).

The will be a second tab, where the user will map previously created rules to Poll Content Template.

Been a Top Drupal Project Manager one step at the time.

I think the your rules

miraclestyle - July 15, 2009 - 11:29

I think that your rules strategy suggestion can increase functionality of the module in comparison to my suggestion of:

- "Content types" fieldgroup to include checkboxes for each defined content type to be associated with the poll template;

- "Tags" fieldgroup to include multiple selection lists for each taxonomy vocabulary with it's terms to be associated with the poll template;

Further, I think your suggestion is simple which is definitely good thing, but I am not sure if the rules strategy could implement other features that I've suggested in Poll Templates 2.0, such as:

- "Poll types" fieldgroup to include "Global poll", "Individual poll" radio buttons;
- "Global poll" radio button to indicate that one global poll instance should be created and glued to all of the associated content. If this button is checkd, controls of "Poll behavior" fieldgroup should be dimmed and read only;
- "Individual poll" radio button to indicate that one poll instance should be created for each associated content. Default is checked;

or

- "Poll behavior" fieldgroup that includes "Reset votes on content editing", "Permanently delete disassociated poll" controls;
- "Reset votes on content editing" checkbox which will indicate whether to reset all poll votes after the content is edited and saved. Default is checked;
- "Permanently delete disassociated poll" checkbox which will indicate whether to suspend/hide or permanently delete the poll that has been disassociated with a content as a result of it's tag associations (that initially associated the poll) being removed upon editing. In case the content is associated again with (previously removed) tags, the poll could be retrieved or a new one could be created, depending of the state of the checkbox. Default is checked;

and

- "Poll instance control" filedgroup that includes "Reset poll instances", "Recreate poll instances", "Suspend poll instances", "Activate poll instances", "Delete poll instances" controls that should react on form "Submit" or "Save" button click;
- "Reset poll instances" checkbox to reset all votes on all poll instances that were derived from it upon content creation;
- "Recreate poll instances" checkbox to recreate poll instances for all of the content that has been created and associated with the poll template;
- "Suspend poll instances" checkbox to suspend/hide poll instances for all of the content that has been created and associated with the poll template;
- "Activate poll instances" checkbox to activate/show poll instances for all of the content that has been created and associated with the poll template;
- "Delete poll instances" checkbox to delete poll instances for all of the content that has been created and associated with the poll template;

Of course, all of these features could be overkill, but they can also mean "one to rule them all"!

 
 

Drupal is a registered trademark of Dries Buytaert.