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