PHPTutorial11

From Steema Software Reference Wiki
Jump to: navigation, search

Tchart php.png

Contents page
Previous | Next


Tutorial 11 – Plug-ins and extras

TeeChart Plug-ins

TeeChart for PHP can be used to create plug-ins for Joomla, WordPress and Drupal among others, thereby making it possible to show Charts in the web portals designed using these CMS's. The TeeChart for PHP installer includes an example of a plug-in for each one of these CMS's, which can be found in the plugins folder.

Joomla plug-in

TeeChart can be easily integrated as a plug-in into versions Joomla 1.5 and 2.5 as can be seen in the example found in the /plugins/joomla folder.

To see the plugin in operation click on the following link:

http://steema.us/joomla/index.php?option=com_content&view=article&id=2&Itemid=2

http://steema.us/joomla25/index.php/teechartphp

WordPress plug-in

TeeChart also offers the possibility to appear within WordPress contents. To see a working example of the plug-in click on the following link:

http://steema.us/wp/?page_id=3

Drupal plug-in

The installer for TeeChart for PHP also includes a plug-in for Drupal.

TeeChart JavaScript

TeeChart.js into TeeChart for PHP=

The latest version of TeeChart for PHP also includes the TeeChart JavaScript product. This way the user of TeeChart for PHP has the option of obtaining a live Chart, which generate the minimum amount of PHP code by exporting the Chart in JavaScript instead.

Tutorial 12 shows us the series types we can use to export a JavaScript Chart, together with the tools and code necessary.

By integrating TeeChart JavaScript into TeeChart for PHP the programmer can choose between the following:

- Continue using PHP code to generate the Chart, in the same way that they were doing until now, but with the option to export it to javascript.

- Use javascript code directly to obtain the Chart in its final form.

- Mix PHP code and javascript in the same PHP page.

Using TeeChart for JavaScript

By default TeeChart for PHP references the latest version of TeeChart.js from its source code via the Steema server where it wil be periodically updated. The existing references are defined as static variables within the JavaScriptExport class

http://www.steema.com/files/public/teechart/html5/jscript/src/teechart.js

http://www.steema.com/files/public/teechart/html5/jscript/src/teechart-extras.js

Giving the option to the developed to easily modify the value to the one disired.

If, on the other hand, the developer prefers to save the .js files to another location and to reference them manually, then they can find the files necessary in the "teechartjs" folder within the "sources" folder of TeeChart for PHP.

CMS plug-ins

TeeChart JavaScript can also be integrated into the CMS’s mentioned above, namely Joomla WordPress or Drupal. These are not included in the installer but can be downloaded directly from our web site at:

http://www.steema.com/download/html5

And to see a working example of each:

http://steema.us/wp/

http://steema.us/joomla/

http://steema.us/joomla25/




PREVIOUS

NEXT


© 1998-2019 Steema Software SL. All rights reserved.