problem with an extension

Author Message

Eric Tshiunza

Monday 27 April 2009 6:34:47 am

I use an extension StarRating, which makes me the votes, a place I must note that the side I want to give and another place I must have an average rating of all the videos. how to get my problem noted.

Bruce Morrison

Monday 27 April 2009 7:18:13 pm

Hi Eric

StarRating questions are better addressed to the extension forum http://projects.ez.no/index.php//starrating/forum

Once you have access to the content attribute you can access the average via $attribute.content.rounded_average or $attribute.content.average

Retrieving the average across all content classes is a little more difficult. Each rating is stored in the database http://svn.projects.ez.no/starrating/sql/starrating.sql Once you know the attribute id ( contentobject_attribute_id ) of the content object it shouldn't be hard to work out the average.

If I have time I'll look at adding this to the extension.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 19:03:55
Script start
Timing: Jan 18 2025 19:03:55
Module start 'layout'
Timing: Jan 18 2025 19:03:55
Module start 'content'
Timing: Jan 18 2025 19:03:56
Module end 'content'
Timing: Jan 18 2025 19:03:56
Script end

Main resources:

Total runtime0.9633 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0085 587.9141152.6250
Module start 'layout' 0.00850.0030 740.539139.4453
Module start 'content' 0.01150.9480 779.9844519.6797
Module end 'content' 0.95950.0038 1,299.66418.3203
Script end 0.9633  1,307.9844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4144160.0002
Check MTime0.00200.2098160.0001
Mysql Total
Database connection0.00200.204610.0020
Mysqli_queries0.904493.8889540.0167
Looping result0.00070.0700520.0000
Template Total0.915095.020.4575
Template load0.00240.248220.0012
Template processing0.912194.680720.4560
Template load and register function0.00030.028110.0003
states
state_id_array0.00120.122310.0012
state_identifier_array0.00190.198920.0010
Override
Cache load0.00180.1819130.0001
Sytem overhead
Fetch class attribute can translate value0.00080.086620.0004
Fetch class attribute name0.00240.250330.0008
XML
Image XML parsing0.00270.285520.0014
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00340.3539160.0002
String conversion0.00000.000940.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs