Implementing JPGraph into EzPublish

Author Message

Nabil Alimi

Monday 21 March 2005 9:02:02 am

Hi everyone,

JpGraph is an application that makes very easy the creation of graphs, like this one : http://starnab.free.fr/sondages/resultat.php?id=306.
And in fact, i'd like to use this soft into EzPublish.
I've already implemented the EzPublish original Poll system in my website and I plan to retrieve the results of each answer and his name, the name of my poll.
Before going any further, is it possible ? ^^
My graphs functions works that way :

/**
*array (int) Result of each answer 
*array strings Title of each answers
*string The title of the graph, displayed on top
*function makeGraph($values,$labels,$title)

(I think i've read something on retrieving those values somewhere on the forum.)

The main problem will be integrating JpGraph into EzPublish. Can anyone help ?

Thanks.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Ekkehard Dörre

Tuesday 22 March 2005 12:23:58 am

Hi Nabil,

allready done by Björn:
http://ez.no/community/contribs/3rd_party/extension_ezpowerlib_pubsvn

Feel free to post your results here.
Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Frederik Holljen

Tuesday 22 March 2005 12:26:04 am

I don't know JPGraph very well, but this sounds like a case where you would want to wrap JPGraph functionality inside either template functions or operators. Could you give a small typical example of JPGraph usage?

(interesting project btw..)

Frederik Holljen

Tuesday 22 March 2005 12:26:57 am

Ekkehard,

Cool, I didn't know.. thanks for letting me know.

Nabil Alimi

Tuesday 22 March 2005 1:36:15 am

Thanks to both of you.
I'll give a try to Björn work. :)

I'll post my results soon.

Frederik, is that what you wanted ? => http://starnab.free.fr/sondages/resultat.php?id=306

Greetings.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Ekkehard Dörre

Tuesday 22 March 2005 2:07:13 am

more examples at
http://www.aditus.nu/jpgraph/features.php

another tread:
http://ez.no/community/forum/developer/take_content_from_multiple_objects_and_put_it_into_one_array

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Nabil Alimi

Tuesday 22 March 2005 6:21:37 am

Well i'm still having trouble using this.
In fact, i didnt found any HOWTO in the .tar.gz file so I've tried by myself, with the other thread Ekkhard mentionned. But I still get the <i>Operator 'jpgraph' is not registered</i> error.
I've unpacked the Ezpowerlib package to my extension folder, added some modifications to the site.ini just as I have done for one other extension I needed (dont even know if it required.)

Is there a readme file about this somewhere ?

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

Ekkehard Dörre

Tuesday 22 March 2005 7:54:12 am

you can look in other contributions with own template operator. There are some readmes.

Greetings, ekke

http://www.coolscreen.de - Over 40 years of certified eZ Publish know-how: http://www.cjw-network.com
CJW Newsletter: http://projects.ez.no/cjw_newsletter - http://cjw-network.com/en/ez-publ...w-newsletter-multi-channel-marketing

Jonathan Dillon-Hayes

Wednesday 23 March 2005 3:04:16 am

<i>Operator 'jpgraph' is not registered</i>

That's as far as I was able to get myself. I've used jp a lot in OO php projects, and never had and issue. But so far, no luck. Haven't put a lot of time into it however.

Anyone had more experience implementing jp?

Jonathan

---------
FireBright provides advanced eZ deployment with root access
http://www.FireBright.com/

source pixel

Thursday 12 July 2007 2:01:16 am

Hello! That 'jpgraph' would not write "Operator 'jpgraph' is not registered", You should download extension "ezpowerlibaddons", on this references "http://pubsvn.ez.no/community/trunk/extension/ezpowerlibaddons/".

<b>Somebody knows as to use "jpgraph()" in a template.</b> I have looked here this reference "http://ezpublish-france.org/index.php/fr/forums/questions_techniques/tableau_de_tableaux", the code there is shown.

The debugger writes nothing, displays empty png a file and more than anything.

And on this references "http://pubsvn.ez.no/community/trunk/extension/ezpowerlibaddons/kernel/common/templatejpgraphoperator.php" there is an example.

Example:
\code
Syntax:
{$data|jpgraph( hash(  function, "getDetails",
		   params, array('parameter1', $paramater1value, ...)
                   )
                )}
\endcode
*/

<b>Somebody can result a working example (simple example) use "jpgraph()" in a template.</b>

Excuse me for my bad English.

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 16:22:38
Script start
Timing: Jan 18 2025 16:22:38
Module start 'layout'
Timing: Jan 18 2025 16:22:38
Module start 'content'
Timing: Jan 18 2025 16:22:39
Module end 'content'
Timing: Jan 18 2025 16:22:39
Script end

Main resources:

Total runtime1.2801 sec
Peak memory usage4,096.0000 KB
Database Queries84

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 587.9375152.6250
Module start 'layout' 0.00810.0029 740.562539.4453
Module start 'content' 0.01101.2676 780.0078747.1094
Module end 'content' 1.27860.0015 1,527.117224.1563
Script end 1.2801  1,551.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.2662160.0002
Check MTime0.00140.1101160.0001
Mysql Total
Database connection0.00150.117410.0015
Mysqli_queries1.200793.7962840.0143
Looping result0.00070.0535820.0000
Template Total1.241497.020.6207
Template load0.00220.172220.0011
Template processing1.239296.805820.6196
Template load and register function0.00010.007710.0001
states
state_id_array0.00200.154810.0020
state_identifier_array0.00190.144820.0009
Override
Cache load0.00190.1462660.0000
Sytem overhead
Fetch class attribute can translate value0.00070.054750.0001
Fetch class attribute name0.00120.0957130.0001
XML
Image XML parsing0.00150.113750.0003
class_abstraction
Instantiating content class attribute0.00000.0026180.0000
General
dbfile0.00110.0833280.0000
String conversion0.00000.001140.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
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
10content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
16content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/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: 45
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs