Open Flash Chart Core WordPress Plugin

This Plugin loads the core Open Flash Chart PHP library so that all other Plugins that utilize Open Flash Chart can all share the same up-to-date version. It also helps minimize potential conflicts between Open Flash Chart powered Plugins.

Download

You can download the Plugin as a zip file from the official Plugin repository.

Installation

Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

Integrating with other Plugins

Open Flash Chart Core Plugin exposes the following options which you can use in your Plugin to determine the path of the files included by Open Flash Chart Core Plugin.

  • SM_OFC_PHP_INC – This option contains the directory (include) path to the Open flash chart PHP library
  • SM_OFC_INC_URL – This option contains the url path to the open-flash-chart.swf file.

Open Flash Chart Core Plugin packages the following files

php-ofc-library PHP library

pho-ofc PHP library is already included for your Plugins. You don’t need to include it again and you can directly create an object of all the classes included in this library like

$chart_1 = new open_flash_chart();

open-flash-chart.swf

This is the main component of Open-Flash-Chart. You can include this file in your Plugins using the following code.

<script type="text/javascript">
swfobject.embedSWF("<?php echo get_option("SM_OFC_INC_URL") . "open-flash-chart.swf", "posts_chart", "350", "250", "9.0.0", "expressInstall.swf");
</script>

json.js

This is the JavaScript library to process json data.

This script is already registered using the wp_register_script() function.

To include this file in your Plugins just call the wp_enqueue_script() function.

wp_enqueue_script('json');

swfobjects.js

This is the JavaScript library to access SWF objects using JavaScript.

This script is already registered using the wp_register_script() function.

To include this file in your Plugins just call the wp_enqueue_script() function.

wp_enqueue_script('swfobject');

You can also check out my Year End Stats Plugin to find out how to integrate Open Flash Chart core Plugin with WordPress Plugins.

Let me know if you have used this Plugin with any of your other WordPress Plugins, I will add links to them below.

Feedback

If you have any comments or if you want to report any bugs, please leave a comment below or contact me.

Credits

Thanks to John Glazebrook for creating the excellent Open Flash Chart component.

History

  • 2008-12-28 – v0.1 – First version
  • 2009-01-27 – v0.2 – Second Version
  • 2009-01-30 – v0.3 – Third Version
  • 2009-01-31 – v0.4 – Fourth Version

8 Comments so far

Follow up comments through RSS Feed | Post a comment

11 Trackbacks/Pingbacks so far

Leave a Reply

Your email address will not be published. Required fields are marked *