Forums / Setup & design / Problems with the poll functionality
Tore Skobba
Friday 13 February 2004 4:56:00 am
Hi
I am manually importing the "Poll" functionality to my site. However, this is not working very well. But first what I have done:
Created an Poll content class Copied the poll templates and set up the correct override settingsCopied the news:"collect.ini" settings file to my own design settings folder
The poll is sort of working now. However,
Everybody can vote as many time as they want (Anonymous also)UPDATE: This has been solved, I edited my collect.ini file in the settings: CollectionUserData=unique instead of default mulitple. However, I would still like to for instance allow forms from mulitple anonymous users.
Each time anyone votes I get an email! This is probably due to my site.ini setting:EmailReceiver=tore@grunderskolen.no. Which is there due to that in the future I might be making forms for various students to sign up for various courses. So basically I want to have some information collectors using email and allowing data from anonymous, and some which is not using email. Is that possible?
CheersTore
Wenyue Yu
Friday 13 February 2004 6:33:34 am
Hi,
Answers to part of your question.
To disable email sending change [EmailSettings] in collect.ini.append as following: [EmailSettings]SendEmail=disabled
Add and change following settings to suit your needs in collect.ini.append: [CollectionSettings] CollectAnonymousDataList[Poll]=disabled/enabledCollectionUserData=multiple/unique/overwrite
I can't find content_object in poll_result.tpl, could you post your poll_result.tpl?
Regards,wenyue
Monday 16 February 2004 5:10:24 am
Thanks for the help, seems as I was a bit fast on the post a forum message, totally forgot about settings, only looked at the actual template code. Everything works fine now, except that I still get the:
"Unknown template variable 'content_object' in namespace ''"
Which is strange since I have simply copied and pasted the template code from the EZ pre installed site designs.
The line generating the error is this (the one in the middle): 12: {attribute_view_gui attribute=$node.object.data_map.option} 13: {section name=ContentAction loop=$node.object.content_action_list show=$content_object.content_action_list}14: <input class="button" type="submit" name="{$ContentAction:item.action}" value="Vote" />
content_object is not defined anywhere before line 13. CheersTore
Monday 16 February 2004 7:47:03 am
There is something wrong with the template. Change $content_object to $node.object.