Forums / Suggestions / Voting mechanism

Voting mechanism

Author Message

Tony Wood

Thursday 15 May 2003 9:12:41 am

A voting mechanism is needed similar to eZ2 but extendable.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Gabriel Ambuehl

Friday 16 May 2003 5:08:14 am

You mean voting on an individual page or a poll mechanism?

The former would be best done with a new datatype I guess. Now if there only were some useable docs on writing datatypes. And stripped to the bare necessary code examples.

Visit http://triligon.org

Jo Henrik Endrerud

Friday 16 May 2003 5:24:48 am

The only documentation for new datatypes we have at the moment at http://www.ez.no/sdk/tutorials/view/datatypes
If this is no good you have to look at the existing ones. I would recomend starting at the ezisbn datatype, this is very simple, and it is easy to understand the main concepts.

Jo Henrik Endrerud | System Developer @ Seeds Consulting | http://www.seeds.no

Tony Wood

Friday 16 May 2003 5:25:34 am

Voting would be for a page, as a form of rating i suppose. The poll would be in answer to an individual question and not on a document. The distinction is fine here... maybe they can be the same thing?

I can;t help with datatype but for operaters check out eZs eZRSS, its got the bare bones... maybe if they released a data type example with installtion instructions it would take some of the mysteral out of it.

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Paul Forsyth

Friday 16 May 2003 5:29:27 am

I think for now we need to get our hands dirty and look at existing code in order to re-code. Not too hard but it is time consuming.

Hopefully this will result in some user docs soon :)

Paul

Tony Wood

Friday 16 May 2003 5:42:04 am

Looks that way... I was wondering is eZ have started to write this stuff?

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Bård Farstad

Friday 16 May 2003 6:16:13 am

We haven't started voting/poll support for information collection, yet. It's on our list, but a bit down.

Right now we're working on:

Notification system, which is a modular system for user subscription and sending of notifications. You can create your own notification handlers and do quite alot with user notifications. Some examples will be provided with 3.1.

Template compilation: processing and storing the templates are pre-compiled php code. This reduces memory usage and execution time. You will notice improvements here with the 3.1 release already, but we will be working more with this in the future.

Template override system: the new template override system will be .ini file based and have more functions. E.g. you can override pr section, node, class and object in combination. These override settings are then compiled into .php files for speed, it will be faster than the old system.

Template override admin: a GUI in the admin to create, edit, remove override files.

RAD: a tool to generate base code for e.g. template operators and data types.

--bård

Documentation: http://ez.no/doc

Gabriel Ambuehl

Friday 16 May 2003 7:08:28 am

Great to see what you're working on. Especially compiled templates and template interface will be very nice to have.

If you guys were able to provide a basic datatype, I might be able to write a rating system with it. The code for the rating itself shouldn't be more than say 50 lines.

I'd do it the following way: a new table (ezratings or whatever) whose key is the contentobjectid. The table basically stores the ratings that were given by users (so people can see why the rating is the way it is plus you need to stop people from voting twice anyway). To speed up calculation of ratings, there's also a row in ezcontentobject table that holds the number of votes currently registered and the sum of all votes so whenever a new rating is added, you can simply add the vote, increment total number of ratings and get the average rating by rating_sum/total_ratings.

As I said, the hardest part for me would be to figure out the whole datatype stuff.

Visit http://triligon.org

eZ debug

Timing: Jan 15 2025 07:06:50
Script start
Timing: Jan 15 2025 07:06:50
Module start 'content'
Timing: Jan 15 2025 07:06:52
Module end 'content'
Timing: Jan 15 2025 07:06:52
Script end

Main resources:

Total runtime1.4913 sec
Peak memory usage6,144.0000 KB
Database Queries208

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 683.9844214.8047
Module start 'content' 0.00851.2532 898.78911,976.3281
Module end 'content' 1.26180.2294 2,875.1172640.6797
Script end 1.4912  3,515.7969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00740.4931210.0004
Check MTime0.00150.1001210.0001
Mysql Total
Database connection0.00070.044210.0007
Mysqli_queries1.366091.60132080.0066
Looping result0.00300.19872050.0000
Template Total1.450497.320.7252
Template load0.00380.254120.0019
Template processing1.446697.004020.7233
Template load and register function0.00150.102310.0015
states
state_id_array0.00090.058910.0009
state_identifier_array0.00260.177620.0013
Override
Cache load0.00330.2237370.0001
Sytem overhead
Fetch class attribute can translate value0.00150.101460.0003
Fetch class attribute name0.00250.1649100.0002
XML
Image XML parsing0.00220.149560.0004
class_abstraction
Instantiating content class attribute0.00000.0015120.0000
General
dbfile0.00140.0937280.0000
String conversion0.00000.000630.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs