views-view-table.tpl.php + Flash Diagramm PROBLEM

am 22.03.2010 - 12:07 Uhr in
Hallo, naja ich wurstel zur zeit etwas mit FusionChart rum ... aber nun ha bich ein problem und komm nicht weiter. Ich binde in die views-view-table.tpl.php Datei folgenden Code ein (von Statistik bis Ende):
<?php
// $Id: views-view-table.tpl.php,v 1.8 2009/01/28 00:43:43 merlinofchaos Exp $
/**
* @file views-view-table.tpl.php
* Template to display a view as a table.
*
* - $title : The title of this group of rows. May be empty.
* - $header: An array of header labels keyed by field id.
* - $fields: An array of CSS IDs to use for each field id.
* - $class: A class or classes to apply to the table, based on settings.
* - $row_classes: An array of classes to apply to each row, indexed by row
* number. This matches the index in $rows.
* - $rows: An array of row items. Each row is an array of content.
* $rows are keyed by row number, fields within rows are keyed by field ID.
* @ingroup views_templates
*/
?>
<div> ----Statistik----- </div>
<?php
include_once('Class/FusionCharts_Gen.php');
$FC = new FusionCharts("Column3D","600","350");
$FC->setSWFPath("FusionCharts/");
$strParam="caption=Einsatzarten - Jahres Übersicht 2010;xAxisName=Feuer (B), Technische Hilfeleistung (TH), Wasserunfall (W), Gefahrguteinsatz (G), Sonstiges (S) ;yAxisName=Anzahl;numberPrefix=;decimalPrecision=0;formatNumberScale=1";
$FC->setChartParams($strParam);
$FC->addChartData("250","name=TH");
$FC->addChartData("333","name=B");
$FC->addChartData("562","name=W");
$FC->addChartData("144","name=S");
?>
<head>
<script language='javascript' src='FusionCharts/FusionCharts.js'></script>
</head>
<body>
<?
$FC->renderChart();
?>
</body>
</html>
<div> ---ENDE---- </div>
<table class="<?php print $class; ?>">
<?php if (!empty($title)) : ?>
<caption><?php print $title; ?></caption>
<?php endif; ?>
<thead>
<tr>
<?php foreach ($header as $field => $label): ?>
<th class="views-field views-field-<?php print $fields[$field]; ?>">
<?php print $label; ?>
</th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach ($rows as $count => $row): ?>
<tr class="<?php print implode(' ', $row_classes[$count]); ?>">
<?php foreach ($row as $field => $content): ?>
<td class="views-field views-field-<?php print $fields[$field]; ?>">
<?php print $content; ?>
</td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
Was ich nun erwarte ist das er mir durch den Code ein Flashobjekt einfügt ... das funktioniert auch wenn ich das mit einer normalen Html oder Php datei mache. Doch hier im Code setzt er nur ein String ein wo drinnen steht "Char." ... Ohne eine Fehlermeldung oder sonstiges. An was kann das liegen bin ratlos. Warum erkennt er das Flash Objekt nicht ? hat das evtl. mit dem "include_once" zu tun ? sobalt ich das auf include stelle hagelt ein Error "Fatal error: Cannot redeclare class FusionCharts in ..." im Orginalcode von FusionChart wird das nämlich nur mit "include" importiert.
mfg
- Anmelden oder Registrieren um Kommentare zu schreiben
ich glaube er findet die
am 22.03.2010 - 12:38 Uhr
ich glaube er findet die Javascript Datei nicht "
<script language='javascript' src='FusionCharts/FusionCharts.js'></script>
" ....Ich hab semtliche methoden
am 22.03.2010 - 14:49 Uhr
Ich hab semtliche methoden versucht um die Javascript Datei anders hinzu zu fügen ... ohne erfolg ... kann keiner helfen ???