Forums / Setup & design / Board member voting

Board member voting

Author Message

Tore Skobba

Friday 20 February 2004 4:42:09 am

Hi

In my site I have a need to have support for voting for boardmembers and various roles. For example:
Candidates______President Vice-Presiden Boardmember
Lotriam pura______[ ] [ ] [ ]
Tyurim____________[ ] [ ] [ ]
Porma_____________[ ] [ ] [ ]
etc

For each Candidates the user should select one of the roles (Presiden, Vice President and Boardmember). First I though about using "Option" for each candidate. However, there is a need to have a dynamic number of candidates. Do anyone here have any tips on how to implemnt such functionality with EZ ? Secondly note that each candidate should be an URL, i.e. clicking the name should lead the user to his appeal on the web.

I am not looking for specific code, more tips about how to start solve this. Which existing EZ attribute should I use etc. ?

Cheers
Tore

James Packham

Friday 20 February 2004 5:47:11 am

You could create a class that holds all the relevant information for a candiate (including for example their statement), so that each of the candiates can be represented by an object in the database. You can then add/remove candiates as necessary.

Then you could then build the list of candiates using a fetch statement in your template. You could then have a full.tpl override for each candidate that displayed everything you wanted to appear on their statement page.

To build the link between the two would be fairly simple, you would be able to find out the object variables needed for the link by doing an attribute show on a candidate.

There's also an example of a voting system in the blog siteaccess which should help you with some of the code.

Regards,

James

eZ debug

Timing: Jan 19 2025 06:15:12
Script start
Timing: Jan 19 2025 06:15:12
Module start 'content'
Timing: Jan 19 2025 06:15:12
Module end 'content'
Timing: Jan 19 2025 06:15:12
Script end

Main resources:

Total runtime0.1543 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.0113 588.9375180.8438
Module start 'content' 0.01130.0075 769.781393.8359
Module end 'content' 0.01880.1354 863.6172523.2500
Script end 0.1542  1,386.8672 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00402.6033200.0002
Check MTime0.00140.9034200.0001
Mysql Total
Database connection0.00241.553410.0024
Mysqli_queries0.102466.36181410.0007
Looping result0.00161.05871390.0000
Template Total0.134987.510.1349
Template load0.00090.554810.0009
Template processing0.134186.893010.1341
Override
Cache load0.00050.349310.0005
Sytem overhead
Fetch class attribute can translate value0.00120.798310.0012
XML
Image XML parsing0.00040.261310.0004
General
dbfile0.00281.8203200.0001
String conversion0.00000.006530.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.0002 secs