Forums / Developer / Implementing JPGraph into EzPublish

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.

eZ debug

Timing: Jan 30 2025 21:45:33
Script start
Timing: Jan 30 2025 21:45:33
Module start 'content'
Timing: Jan 30 2025 21:45:33
Module end 'content'
Timing: Jan 30 2025 21:45:34
Script end

Main resources:

Total runtime0.2969 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0061 587.9531370.2891
Module start 'content' 0.00610.0140 958.24221,017.6563
Module end 'content' 0.02020.2766 1,975.89843,906.7109
Script end 0.2968  5,882.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00461.5660200.0002
Check MTime0.00130.4533200.0001
Mysql Total
Database connection0.00050.170810.0005
Mysqli_queries0.203668.59491410.0014
Looping result0.00140.47771390.0000
Template Total0.276293.010.2762
Template load0.00080.266210.0008
Template processing0.275492.779710.2754
Override
Cache load0.00060.191610.0006
Sytem overhead
Fetch class attribute can translate value0.00180.617810.0018
XML
Image XML parsing0.00020.083510.0002
General
dbfile0.00622.1047200.0003
String conversion0.00000.001830.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs