I want to do what ez did in the contrib section

Author Message

Daniel Guerrier

Monday 22 August 2005 9:18:07 am

I have asked this question many tmes but never really got an answer. I noticed that the contrib section of the ez.no site is doing exactly that. I wanted to keep track of the number of times a file is downloaded and display it to the user. Just as it is here http://ez.no/community/contribs/applications

Can the person who worked on this give us some insite on how this was done. Many of the folks on this board posed the same question with no response.

Daniel Guerrier

Tuesday 23 August 2005 7:25:51 am

Anyone?!?!?

bisk

Tuesday 23 August 2005 9:10:18 am

In the contributions there's ezstats and ez viewcounter. I think with those you can do what you want, although I haven't tried it myself.

http://ez.no/community/contribs/template_plugins

-------------------------------
http://www.kookfijn.nl & http://www.magento.be

Hans Melis

Tuesday 23 August 2005 12:14:21 pm

Hi Daniel,

That's really something simple. The download count is an attribute of the ezbinaryfile class.

Suppose you have a class which contains a file attribute, you'd display the download count in templates like this:

{$object.data_map.file_attribute.content.download_count}

I don't know when this was added in eZ publish, but I guess in 3.5.

Hans
http://blog.hansmelis.be

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 31 2025 06:20:09
Script start
Timing: Jan 31 2025 06:20:09
Module start 'layout'
Timing: Jan 31 2025 06:20:09
Module start 'content'
Timing: Jan 31 2025 06:20:11
Module end 'content'
Timing: Jan 31 2025 06:20:11
Script end

Main resources:

Total runtime1.4258 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 588.2656151.2266
Module start 'layout' 0.00530.0022 739.492236.6953
Module start 'content' 0.00751.4175 776.1875966.4844
Module end 'content' 1.42490.0008 1,742.671911.8125
Script end 1.4258  1,754.4844 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2127160.0002
Check MTime0.00130.0879160.0001
Mysql Total
Database connection0.00080.054810.0008
Mysqli_queries1.377096.5728620.0222
Looping result0.00070.0468600.0000
Template Total1.393997.820.6970
Template load0.00210.145520.0010
Template processing1.391997.617220.6959
Template load and register function0.00140.095110.0014
states
state_id_array0.00170.121910.0017
state_identifier_array0.00090.063720.0005
Override
Cache load0.00170.1178170.0001
Sytem overhead
Fetch class attribute can translate value0.00050.035130.0002
Fetch class attribute name0.00200.139150.0004
XML
Image XML parsing0.00180.128630.0006
class_abstraction
Instantiating content class attribute0.00000.000950.0000
General
dbfile0.00180.1274150.0001
String conversion0.00000.000540.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
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/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/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs