Changeset 6903
- Timestamp:
- 01/03/08 07:11:44 (1 year ago)
- Files:
-
- plugins/dwSwfChartPlugin/LICENSE (modified) (1 diff)
- plugins/dwSwfChartPlugin/README (modified) (2 diffs)
- plugins/dwSwfChartPlugin/config (deleted)
- plugins/dwSwfChartPlugin/lib/helper/SwfChartHelper.php (modified) (1 diff)
- plugins/dwSwfChartPlugin/lib/sfSwfChart.class.php (modified) (10 diffs)
- plugins/dwSwfChartPlugin/modules/dwSwfChart (moved) (moved from plugins/dwSwfChartPlugin/modules/sfSwfChart)
- plugins/dwSwfChartPlugin/modules/dwSwfChart/actions/actions.class.php (modified) (1 diff)
- plugins/dwSwfChartPlugin/modules/dwSwfChart/templates/testSuccess.php (modified) (1 diff)
- plugins/dwSwfChartPlugin/package.xml (modified) (3 diffs)
- plugins/dwSwfChartPlugin/web/swfcharts/charts.swf (added)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/arno.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/arst.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/brfl.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/brno.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/brst.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/cl3d.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/clfl.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/clno.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/clp3.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/cls3.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/clst.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/cnno.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/lnno.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/mxno.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/pi3d.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/pino.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/pono.swf (modified) (previous)
- plugins/dwSwfChartPlugin/web/swfcharts/charts_library/scno.swf (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/dwSwfChartPlugin/LICENSE
r1003 r6903 1 Copyright (c) 2004-2006 Dustin Whittle1 The MIT License 2 2 3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 3 Permission is hereby granted, free of charge, to any person obtaining a copy 4 of this software and associated documentation files (the "Software"), to deal 5 in the Software without restriction, including without limitation the rights 6 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 copies of the Software, and to permit persons to whom the Software is 8 furnished to do so, subject to the following conditions: 4 9 5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 The above copyright notice and this permission notice shall be included in 11 all copies or substantial portions of the Software. 6 12 7 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 THE SOFTWARE. plugins/dwSwfChartPlugin/README
r2860 r6903 1 = sfSwfChartPlugin plugin =1 = dwSwfChartPlugin = 2 2 3 The ` sfSwfChartPlugin` provides abstraction for the PHP/SWF Charts library.3 The `dwSwfChartPlugin` provides abstraction for the PHP/SWF Charts library. 4 4 5 5 == Installation == 6 6 7 7 * Install the plugin 8 8 9 9 {{{ 10 symfony plugin-install http://plugins.symfony-project. com/sfSwfChartPlugin10 symfony plugin-install http://plugins.symfony-project.org/dwSwfChartPlugin 11 11 }}} 12 12 … … 18 18 19 19 * You're done. 20 21 == Using the plugin == 22 23 See the bundled module/action: dwSwfChart/source. plugins/dwSwfChartPlugin/lib/helper/SwfChartHelper.php
r5385 r6903 2 2 3 3 /* 4 * This file is part of the symfony package.5 * (c) 2004-2006 Dustin Whittle <dustin.whittle@symfony-project.com>6 *7 * For the full copyright and license information, please view the LICENSE8 * file that was distributed with this source code.9 */4 * This file is part of the symfony package. 5 * (c) 2004-2006 Dustin Whittle <dustin.whittle@symfony-project.com> 6 * 7 * For the full copyright and license information, please view the LICENSE 8 * file that was distributed with this source code. 9 */ 10 10 11 11 /** 12 * @package symfony.runtime.addon 12 * @package symfony 13 * @subpackage dwSwfChartPlugin 13 14 * @author Dustin Whittle <dustin.whittle@symfony-project.com> 14 15 * @version SVN: $Id: sfSwfChart.class.php 1519 2006-06-24 03:44:30Z dwhittle $ 15 16 */ 17 function swf_chart($xml_source, $width=400, $height=250, $bg_color="#ffffff", $transparent = false, $license = null ) 18 { 19 $library_path = sfConfig::get('sf_swfchart_dir', '/dwSwfChartPlugin/swfcharts/'); 20 $flash_file = $library_path . 'chart.swf'; 16 21 17 function swf_chart($xml_source, $width=400, $height=250, $bg_color="#ffffff", $transparent = false, $license = null ) 18 { 19 $library_path = sfConfig::get('sf_swfchart_dir', '/swfcharts/'); 20 $flash_file = $library_path . 'chart.swf'; 22 $u = (strpos($flash_file,"?") === false) ? "?" : ((substr($flash_file, -1) === "&") ? "" : "&"); 21 23 22 $u = (strpos($flash_file,"?") === false) ? "?" : ((substr($flash_file, -1) === "&") ? "" : "&"); 24 $license_query = ($license != null) ? '&license=' . $license : '' ; 25 $transparent_html = ($transparent) ? '<param name="wmode" value="transparent" />' : '' ; 26 $movie = $flash_file.$u.'library_path='.$library_path.'&php_source='.$xml_source.$license_query; 23 27 24 $license_query = ($license != null) ? '&license=' . $license : '' ; 25 $transparent_html = ($transparent) ? '<param name="wmode" value="transparent" />' : '' ; 26 $movie = $flash_file.$u.'library_path='.$library_path.'&php_source='.$xml_source.$license_query; 27 28 return '<object type="application/x-shockwave-flash" data="'.$movie.'" width="'.$width.'" height="'.$height.'" id="chart"> 28 return '<object type="application/x-shockwave-flash" data="'.$movie.'" width="'.$width.'" height="'.$height.'" id="chart"> 29 29 <param name="movie" value="'.$movie.'" /> 30 30 <param name="quality" value="high" /> 31 31 <param name="bgcolor" value="'.$bg_color.'" />' 32 . $transparent_html.33 '</object>';32 . $transparent_html. 33 '</object>'; 34 34 35 }35 } 36 36 37 37 ?> plugins/dwSwfChartPlugin/lib/sfSwfChart.class.php
r2818 r6903 10 10 11 11 /** 12 * @package symfony.runtime.addon13 * @author Dustin Whittle <dustin.whittle@symfony-project.com>14 * @version SVN: $Id$15 */16 17 /**18 12 * 19 13 * sfSwfChart class. … … 21 15 * This class provides an abstraction layer to the PHP SWF Charts library which provides interactive flash graphs. 22 16 * 23 * @package symfony.runtime.addon 17 * @package symfony 18 * @subpackage dwSwfChartPlugin 24 19 * @author Dustin Whittle <dustin.whittle@symfony-project.com> 25 20 * @version SVN: $Id$ … … 30 25 { 31 26 32 public function __construct()33 {34 35 }36 37 27 public function convertArray($chart=array()) 38 28 { 39 29 $xml="<chart>\r\n"; 40 $ Keys1= array_keys((array) $chart);41 for ($i1=0;$i1<count($ Keys1);$i1++){42 if(is_array($chart[$ Keys1[$i1]])){43 $ Keys2=array_keys($chart[$Keys1[$i1]]);44 if(is_array($chart[$ Keys1[$i1]][$Keys2[0]])){45 $xml.="\t<".$ Keys1[$i1].">\r\n";46 for($i2=0;$i2<count($ Keys2);$i2++){47 $ Keys3=array_keys((array) $chart[$Keys1[$i1]][$Keys2[$i2]]);48 switch($ Keys1[$i1]){30 $keys1= array_keys((array) $chart); 31 for ($i1=0;$i1<count($keys1);$i1++){ 32 if(is_array($chart[$keys1[$i1]])){ 33 $keys2=array_keys($chart[$keys1[$i1]]); 34 if(is_array($chart[$keys1[$i1]][$keys2[0]])){ 35 $xml.="\t<".$keys1[$i1].">\r\n"; 36 for($i2=0;$i2<count($keys2);$i2++){ 37 $keys3=array_keys((array) $chart[$keys1[$i1]][$keys2[$i2]]); 38 switch($keys1[$i1]){ 49 39 case "chart_data": 50 40 $xml.="\t\t<row>\r\n"; 51 for($i3=0;$i3<count($ Keys3);$i3++){41 for($i3=0;$i3<count($keys3);$i3++){ 52 42 switch(true){ 53 case ($chart[$ Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]===null):43 case ($chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]===null): 54 44 $xml.="\t\t\t<null/>\r\n"; 55 45 break; 56 46 57 case ($ Keys2[$i2]>0 and $Keys3[$i3]>0):58 $xml.="\t\t\t<number>".$chart[$ Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]."</number>\r\n";47 case ($keys2[$i2]>0 and $keys3[$i3]>0): 48 $xml.="\t\t\t<number>".$chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]."</number>\r\n"; 59 49 break; 60 50 61 51 default: 62 $xml.="\t\t\t<string>".$chart[$ Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]."</string>\r\n";52 $xml.="\t\t\t<string>".$chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]."</string>\r\n"; 63 53 break; 64 54 } … … 70 60 $xml.="\t\t<row>\r\n"; 71 61 $count=0; 72 for($i3=0;$i3<count($ Keys3);$i3++){73 if($chart[$ Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]===null){$xml.="\t\t\t<null/>\r\n";}74 else{$xml.="\t\t\t<string>".$chart[$ Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]."</string>\r\n";}62 for($i3=0;$i3<count($keys3);$i3++){ 63 if($chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]===null){$xml.="\t\t\t<null/>\r\n";} 64 else{$xml.="\t\t\t<string>".$chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]."</string>\r\n";} 75 65 } 76 66 $xml.="\t\t</row>\r\n"; … … 80 70 $xml.="\t\t<row>\r\n"; 81 71 $count=0; 82 for($i3=0;$i3<count($ Keys3);$i3++){83 if($chart[$ Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]===null){$xml.="\t\t\t<null/>\r\n";}84 else{$xml.="\t\t\t<string>".$chart[$ Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]."</string>\r\n";}72 for($i3=0;$i3<count($keys3);$i3++){ 73 if($chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]===null){$xml.="\t\t\t<null/>\r\n";} 74 else{$xml.="\t\t\t<string>".$chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]."</string>\r\n";} 85 75 } 86 76 $xml.="\t\t</row>\r\n"; … … 89 79 case "draw": 90 80 $text=""; 91 $xml.="\t\t<".$chart[$ Keys1[$i1]][$Keys2[$i2]]['type'];92 for($i3=0;$i3<count($ Keys3);$i3++){93 if($ Keys3[$i3]!="type"){94 if($ Keys3[$i3]=="text"){$text=$chart[$Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]];}95 else{$xml.=" ".$ Keys3[$i3]."=\"".$chart[$Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]."\"";}81 $xml.="\t\t<".$chart[$keys1[$i1]][$keys2[$i2]]['type']; 82 for($i3=0;$i3<count($keys3);$i3++){ 83 if($keys3[$i3]!="type"){ 84 if($keys3[$i3]=="text"){$text=$chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]];} 85 else{$xml.=" ".$keys3[$i3]."=\"".$chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]."\"";} 96 86 } 97 87 } … … 103 93 default://link, etc. 104 94 $xml.="\t\t<value"; 105 for($i3=0;$i3<count($ Keys3);$i3++){106 $xml.=" ".$ Keys3[$i3]."=\"".$chart[$Keys1[$i1]][$Keys2[$i2]][$Keys3[$i3]]."\"";95 for($i3=0;$i3<count($keys3);$i3++){ 96 $xml.=" ".$keys3[$i3]."=\"".$chart[$keys1[$i1]][$keys2[$i2]][$keys3[$i3]]."\""; 107 97 } 108 98 $xml.=" />\r\n"; … … 110 100 } 111 101 } 112 $xml.="\t</".$ Keys1[$i1].">\r\n";102 $xml.="\t</".$keys1[$i1].">\r\n"; 113 103 }else{ 114 if($ Keys1[$i1]=="chart_type" or $Keys1[$i1]=="series_color" or $Keys1[$i1]=="series_image" or $Keys1[$i1]=="series_explode" or $Keys1[$i1]=="axis_value_text"){115 $xml.="\t<".$ Keys1[$i1].">\r\n";116 for($i2=0;$i2<count($ Keys2);$i2++){117 if($chart[$ Keys1[$i1]][$Keys2[$i2]]===null){$xml.="\t\t<null/>\r\n";}118 else{$xml.="\t\t<value>".$chart[$ Keys1[$i1]][$Keys2[$i2]]."</value>\r\n";}104 if($keys1[$i1]=="chart_type" or $keys1[$i1]=="series_color" or $keys1[$i1]=="series_image" or $keys1[$i1]=="series_explode" or $keys1[$i1]=="axis_value_text"){ 105 $xml.="\t<".$keys1[$i1].">\r\n"; 106 for($i2=0;$i2<count($keys2);$i2++){ 107 if($chart[$keys1[$i1]][$keys2[$i2]]===null){$xml.="\t\t<null/>\r\n";} 108 else{$xml.="\t\t<value>".$chart[$keys1[$i1]][$keys2[$i2]]."</value>\r\n";} 119 109 } 120 $xml.="\t</".$ Keys1[$i1].">\r\n";110 $xml.="\t</".$keys1[$i1].">\r\n"; 121 111 }else{//axis_category, etc. 122 $xml.="\t<".$ Keys1[$i1];123 for($i2=0;$i2<count($ Keys2);$i2++){124 $xml.=" ".$ Keys2[$i2]."=\"".$chart[$Keys1[$i1]][$Keys2[$i2]]."\"";112 $xml.="\t<".$keys1[$i1]; 113 for($i2=0;$i2<count($keys2);$i2++){ 114 $xml.=" ".$keys2[$i2]."=\"".$chart[$keys1[$i1]][$keys2[$i2]]."\""; 125 115 } 126 116 $xml.=" />\r\n"; … … 128 118 } 129 119 }else{//chart type, etc. 130 $xml.="\t<".$ Keys1[$i1].">".$chart[$Keys1[$i1]]."</".$Keys1[$i1].">\r\n";120 $xml.="\t<".$keys1[$i1].">".$chart[$keys1[$i1]]."</".$keys1[$i1].">\r\n"; 131 121 } 132 122 } … … 134 124 return $xml; 135 125 } 136 137 public function __destruct()138 {139 140 }141 142 126 } 143 127 plugins/dwSwfChartPlugin/modules/dwSwfChart/actions/actions.class.php
r2818 r6903 2 2 3 3 /** 4 * sfSwfChart actions.4 * dwSwfChart actions. 5 5 * 6 * @package sfSwfChartPlugin 6 * @package symfony 7 * @subpackage dwSwfChartPlugin 7 8 * @author Dustin Whittle 8 9 * @version SVN: $Id$ 9 10 */ 10 class sfSwfChartActions extends sfActions11 class dwSwfChartActions extends sfActions 11 12 { 12 13 /** plugins/dwSwfChartPlugin/modules/dwSwfChart/templates/testSuccess.php
r2818 r6903 3 3 use_helper('SwfChart'); 4 4 5 echo swf_chart("/ sfSwfChart/source", 400, 250);5 echo swf_chart("/dwSwfChart/source", 400, 250); 6 6 7 7 ?> plugins/dwSwfChartPlugin/package.xml
r5385 r6903 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <package packagerversion="1.4.9" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> 3 <name> sfSwfChartPlugin</name>4 <channel>pear.symfony-project. com</channel>5 <summary> symfony sfSwfChart plugin</summary>6 <description> symfony sfSwfChart plugin is for dynamically generating interactive flash chart via PHP/SWF Charts.</description>3 <name>dwSwfChartPlugin</name> 4 <channel>pear.symfony-project.org</channel> 5 <summary>dwSwfChartPlugin</summary> 6 <description>dwSwfChartPlugin is for dynamically generating interactive flash chart via PHP/SWF Charts.</description> 7 7 <lead> 8 8 <name>Dustin Whittle</name> 9 9 <user>dwhittle</user> 10 <email>dustin.whittle@symfony-project. com</email>10 <email>dustin.whittle@symfony-project.org</email> 11 11 <active>yes</active> 12 12 </lead> 13 <date>200 7-10-05</date>13 <date>2008-01-01</date> 14 14 <version> 15 <release>1.0. 4</release>16 <api>1.0. 4</api>15 <release>1.0.0</release> 16 <api>1.0.0</api> 17 17 </version> 18 18 <stability> … … 20 20 <api>stable</api> 21 21 </stability> 22 <license uri="http://www.symfony-project. com/license">MIT license</license>22 <license uri="http://www.symfony-project.org/content/license">MIT license</license> 23 23 <notes>-</notes> 24 24 <contents> … … 63 63 <package> 64 64 <name>symfony</name> 65 <channel>pear.symfony-project. com</channel>65 <channel>pear.symfony-project.org</channel> 66 66 <min>1.0.0</min> 67 <max>1.1.0</max> 68 <exclude>1.1.0</exclude> 67 <max>1.2.0</max> 69 68 </package> 70 69 </required> 71 70 </dependencies> 72 <phprelease /> 73 <changelog /> 71 72 <phprelease> 73 </phprelease> 74 75 <changelog> 76 </changelog> 74 77 </package>