Help with rendering class

Hi, I'm trying to pass to the $_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode(); a content that will execute an Echo command however when doing it I'm getting it as a line in the html page and it's not executing it.

Any help how to pass to the designbox conent an echo command??

Thanks

Yossi

Quote · 21 Jun 2008

Could not understand you. Can you post the code here?

----
Quote · 21 Jun 2008

Please look at http://www.fusioncharts.com/free/ and download their free version of charting. There you'll have the right PHP class to use and the JS.

Now take their simple and basic exapme (I did some simple modification):

<?php

# Include FusionCharts PHP Class
require_once('c:/webserver/ewp/Charts/Includes/FusionCharts_Gen.php');
# Create Multiseries Column3D chart object using FusionCharts PHP Class
$FC = new FusionCharts("StackedBar2D","350","120");

# Set the right range
$fullscale = 10;
$Score = 6.4;
$LRange = 3;
$RRange = 7.8;

$RiskRange = $LRange - 0;
$LeftNormalSide = $Score - $RiskRange ;
$MarkedPosition = 0.041;
$RightNormalSide = $RRange - ($Score - $MarkedPosition);
$GoodRange = $fullscale - $RRange- .1;

# Set the relative path of the swf file
$FC->setSWFPath("./Charts/");

# Store chart attributes in a variable
$strParam="caption=;subcaption=;xAxisName=;yAxisName=Scale;numberPrefix=;decimalPrecision=0;showValues=0";

# Set chart attributes
$FC->setChartParams($strParam);


# Add category names
$FC->addCategory("Category 1");


# Create a new dataset
$FC->addDataset("Risk","color=#FF0000");
# Add chart values for the above dataset
$FC->addChartData($RiskRange);


# Create second dataset
$FC->addDataset("Normal", "color=F6BD0F");
# Add chart values for the second dataset
$FC->addChartData($LeftNormalSide);

# Create a new dataset
$FC->addDataset("You are here", "color=black");
# Add chart values for the above dataset
$FC->addChartData($MarkedPosition);


# Create second dataset
$FC->addDataset("", "color=F6BD0F");
# Add chart values for the second dataset
$FC->addChartData($RightNormalSide);
# Create a new dataset
$FC->addDataset("Good", "color=#00CC00");
# Add chart values for the above dataset
$FC->addChartData($GoodRange);

?>

<script language='javascript' src='./JSClass/FusionCharts.js'></script>

<?
# Render Chart
$FC->renderChart();


?>

Try to run it now outside of dolphin (I guess you know how to do it) and you'll see a nice horizontal stackbar.

Now try to embed it inside Dolphin new block..and see what is my problem.

Best and thanks for your help

Yossi

Quote · 21 Jun 2008

Yossi,

Check it out

You were doing the right things but the function return needed to be encapsulated. I will explain it a bit more tomorrow to you. Please PM me.

Updating my BoonexNerd.net site.
Quote · 23 Jun 2008
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.