Hi
Thanks I managed with the variables thanks for you help. Actually with directPhp content plugin I can inject some PHP in article. But for some reason can't pick them in flashchart.
Is there a way I could only load charts that have sql true according to my filter. Or maybe I should ask this in the joomla blog.
as far as I know, you cannot have php-code in Joomla's articles. But you may use flashchart's variable substitution. E.g. for '___ProvinceID' use '#___ProvinceID#'
sql=" sql="SELECT XXX FROM YYY where
ProvinceID='#___ProvinceID#' and DistrictID='#___DistrictID#'......."
hi, thanks for your prompt replies, i am new to both joomla and the flashchart and i went straight into the migration. I think i am missing something here. Probably its how to get variables from joomla in my case the url appended variables and use in my sql query of flashchart. I have also tried a proper query like in your reply before but it doesnt work. I dont understand these variables [___ProvinceID] which i suppose should be coming from the url which looks like this
www.domain/index.php?option=com_content&...=3&___DistrictID=301
so since i do not understand this '[___ProvinceID], I get my own variable from the url like this:
<?php
$provinceId = $_GET['___ProvinceID'];
?>
//when i echo $provinceId in my article i get correct values as in url but the dont seem to work in my flashchart query. here is what i tried.
<?php
if(isset($_GET['___StartDate'])) {
$startDate = $_GET['___StartDate'];
}
if(isset($_GET['___EndDate'])) {
$endDate = $_GET['___EndDate'];
}
if(isset($_GET['___ProvinceID'])) {
$provinceId = $_GET['___ProvinceID'];
}
if(isset($_GET['___DistrictID'])) {
$districtId = $_GET['___DistrictID'];
}
?>
{flashchart data="database" sql="SELECT PeriodShortName, SUM(number_of_plhiv_support_group_male), SUM(number_of_plhiv_support_group_female) FROM xxxx WHERE ProvinceID = '$provinceId' AND DistrictID = '$districtId' AND PeriodID >= '$startDate' AND PeriodID <= '$endDate'" title="" y_legend="" x_legend="" legend="Male,Female" type="bar_stack" show_barvalues="2" tag_style="padding-bottom:5px; font-size:12px; font-weight:bold; font-family:Sans-Serif; color:#000000;font-rotate: 360;" }chartPLHIVEnrolled{/flashchart}
with the above i get the chart but with no data, it cant filter and when i append: GROUP BY PeriodShortName ORDER BY PeriodID, at the end of the query i get *** flashChart - invalid/missing parameter:
- no data found via sql="
I really dont know how else you could help me perhaps point me to solution close enough.
Letzte Änderung: 3 Jahre 4 Monate her von mukopaje singogo.
hi,
the way you use the double quotes in your flashchart tag, only sql="SELECT XXX FROM YYY" will be processed.
Flashchart has no tag for "sqlwhere" or "sqlgroup" . You must respecify your sql-tag. (e.g.
sql=" sql="SELECT XXX FROM YYY where
ProvinceID='[___ProvinceID]' and DistrictID='[___DistrictID]' and PeriodID>=[___StartDate]
and PeriodID<=[___EndDate'
GROUP BY PeriodShortName ORDER BY PeriodID"
{flashchart data="database" sql="SELECT XXX FROM YYY" sqlwhere="ProvinceID='[___ProvinceID]',DistrictID='[___DistrictID]',PeriodID>=[___StartDate],PeriodID<=[___EndDate]" sqlgroup="GROUP BY PeriodShortName ORDER BY PeriodID" title=" " legend=" " type=" " show_barvalues=" "}XXXXXXX{/flashchart}
thats part of the query and how its used, i am able to get results with that but the filtering doesn't work. Its like only the select is working and the WHERE, GROUP BY and ORDER dont work
Cookies erleichtern die Bereitstellung unserer Dienste. Mit der Nutzung unserer Dienste erklären Sie sich damit einverstanden, dass wir Cookies verwenden.
Open Source Matters ist die non-profit Organization, die organisatorische, juristische und finanzielle Unterstützung für das Joomla! Open-Source Projekt leistet. Sie ist für alle die Projektaktivitäten verantwortlich, die nicht von den Arbeitsgruppen für Produktion und Communities abgedeckt sind. Die Aktivitäten beinhalten Bereiche wie Operations Management, Events, den Jooomla Shop, Marketing und Public Relations zusätzlich zu Brand Management und Lizenzfragen.
Dies ist ein Buch für alle Joomla!-Nutzer - ob Einsteiger oder Fortgeschrittene, ob Webdesigner oder Entwickler. Von der Planung und Installation einer Joomla!-basierten Website über ihre richtige Konfiguration, die Erstellung von Inhalten, Anpassung von Templates und den Einsatz von Erweiterungen bis zur Administration erläutert es alles, was Sie als Anwender wissen müssen. Drei große Praxisbeispiele zeigen den konkreten Einsatz und geben Inspiration für Ihre eigenen Joomla!-Projekte.
Viele Anwender und Entwickler haben Erweiterungen (mehr als 7.700 sind es Zeit) für Joomla erstellt, die sie der Nutzergemeinde meist kostenfrei zur Verfügung stellen. Auf diese Weise bietet Joomla einen beachtlichen Funktionsumfang, der praktisch alle üblichen Anwendungen abdeckt.
Bei den Erweiterungen unterscheidet man Plugins, Komponenten, Module und Templates. Plugins verändern bzw. ergänzen den Programmcode von Joomla!, Komponenten bieten zusätzliche Funktionalitäten, Module zeigen Daten aus dem Joomla!-Kern oder anderen Erweiterungen an und die Templates bestimmen das Aussehen und die Seitenstruktur.