Forums / Setup & design / Problems with the poll functionality

Problems with the poll functionality

Author Message

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 settings
Copied 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?

Cheers
Tore

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/enabled
CollectionUserData=multiple/unique/overwrite

I can't find content_object in poll_result.tpl, could you post your poll_result.tpl?

Regards,
wenyue

Tore Skobba

Monday 16 February 2004 5:10:24 am

Hi

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.
Cheers
Tore

Wenyue Yu

Monday 16 February 2004 7:47:03 am

Hi,

There is something wrong with the template. Change $content_object to $node.object.

Regards,
wenyue

eZ debug

Timing: Jan 19 2025 09:57:11
Script start
Timing: Jan 19 2025 09:57:11
Module start 'content'
Timing: Jan 19 2025 09:57:11
Module end 'content'
Timing: Jan 19 2025 09:57:11
Script end

Main resources:

Total runtime0.1669 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 590.2031180.8281
Module start 'content' 0.00610.0068 771.031393.7891
Module end 'content' 0.01290.1540 864.8203523.8281
Script end 0.1668  1,388.6484 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00352.0853200.0002
Check MTime0.00140.8368200.0001
Mysql Total
Database connection0.00060.343410.0006
Mysqli_queries0.118170.76621410.0008
Looping result0.00160.97451390.0000
Template Total0.153692.010.1536
Template load0.00090.521310.0009
Template processing0.152791.497410.1527
Override
Cache load0.00060.372610.0006
Sytem overhead
Fetch class attribute can translate value0.00070.432710.0007
XML
Image XML parsing0.00030.151610.0003
General
dbfile0.00583.4623200.0003
String conversion0.00000.004930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs