Questions answered by this recipe
Generate on-the-fly graphics within a pmwiki page using a PHP script.
(:Display PHP built graphics on the fly using PHP Image functions:)
One of the organizations I work with wanted to display a Thermometer / Goal Graph that would indicate the current status of our fundraiser graphically.
I found a PHP Thermometer / Goal Graph at http://www.arkie.net/~scripts/thermometer/ but didn't know how to call it from within pmWiki. So I posted to the pmwiki-users group and Wendell Brown answered. He let me know he was the writer of the program. He was also able show me how to implement it in pmwiki. Thanks Wendell!
From that page I copied everything between
-------- Script Starts Here -------
-------- Script Ends Here -------
and saved it to a file called thermometer.php.
I uploaded this file to the pmwiki/scripts directory and called it from within the body of a pmwiki page as follows:
Using this style of programming we were able to instantly change the parameters of the Thermometer / Goal Graph from within the pmwiki page and display the new results.
You can look at http://pmwiki.org/wiki/PmWiki/Images to see how you can wrap text around images
Later, I modified Wendell's program to add a "blow off the top" feature so when the goal was reached or exceeded there would be a mini-explosion of the Thermometer / Goal Graph.
- Goal Meter Based on this script, developed into standard recipe, for highly customisable goal thermometers