cvs: pear /HTML_Progress/examples/generator custom.php default.html default.php embedded.html embedded.php htmlpage.html htmlpage.php itdynamic.php
smartydynamic.php

From: Date: Mon, 25 Jul 2005 12:52:16 +0000
Subject: cvs: pear /HTML_Progress/examples/generator custom.php default.html default.php embedded.html embedded.php htmlpage.html htmlpage.php itdynamic.php
smartydynamic.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33303@lists.php.net to get a copy of this message
farell Mon Jul 25 08:52:16 2005 EDT Modified files: /pear/HTML_Progress/examples/generator custom.php default.html default.php embedded.html embedded.php htmlpage.html htmlpage.php itdynamic.php smartydynamic.php Log: Prepare examples to be removed from main package and moved into the optional package

http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/custom.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/generator/custom.php diff -u pear/HTML_Progress/examples/generator/custom.php:1.1 pear/HTML_Progress/examples/generator/custom.php:1.2 --- pear/HTML_Progress/examples/generator/custom.php:1.1 Sun Jun 27 09:08:05 2004 +++ pear/HTML_Progress/examples/generator/custom.php Mon Jul 25 08:52:14 2005 @@ -2,9 +2,10 @@ /** * How to customize HTML_Progress_Generator usage. * - * @version $Id: custom.php,v 1.1 2004/06/27 13:08:05 farell Exp $ + * @version $Id: custom.php,v 1.2 2005/07/25 12:52:14 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress/generator.php'; @@ -23,12 +24,12 @@ $tabbed = new HTML_Progress_Generator(); -/* 2. 'ActionDisplay' is default classname that should exists +/* 2. 'ActionDisplay' is default classname that should exists to manage wizard/tabbed display. But you can also create - your own class under a new name. Then you've to give + your own class under a new name. Then you've to give the new name to HTML_Progress_Generator. For example: - + class MyDisplayHandler extends HTML_QuickForm_Action_Display { ... @@ -39,38 +40,38 @@ */ //$tabbed = new HTML_Progress_Generator('PBwizard2',array('display'=>'MyDisplayHandler')); -/* 3. 'ActionPreview' is default classname that should exists +/* 3. 'ActionPreview' is default classname that should exists to run live progress bar demo. But you can also create - your own class under a new name. Then you've to give + your own class under a new name. Then you've to give the new name to HTML_Progress_Generator. For example: - + class MyPreviewHandler extends HTML_QuickForm_Action { ... } If your 'MyPreviewHandler' class is not defined, then default - 'ActionPreview' ('HTML/Progress/generator/preview.php') + 'ActionPreview' ('HTML/Progress/generator/preview.php') will be used. - + YES, but why allow to cutomize preview function ? PERHARPS, because you want to do something else than just run your progress bar new look and feel ! */ //$tabbed = new HTML_Progress_Generator('PBwizard3',array('preview'=>'MyPreviewHandler')); -/* 4. 'ActionProcess' is default classname that should exists +/* 4. 'ActionProcess' is default classname that should exists to save your progress bar php/css source-code. But you can also create - your own class under a new name. Then you've to give + your own class under a new name. Then you've to give the new name to HTML_Progress_Generator. For example: - + class MyProcessHandler extends HTML_QuickForm_Action { ... } If your 'MyProcessHandler' class is not defined, then default - 'ActionProcess' ('HTML/Progress/generator/process.php') + 'ActionProcess' ('HTML/Progress/generator/process.php') will be used. */ //$tabbed = new HTML_Progress_Generator('PBwizard4',array('process'=>'MyProcessHandler')); http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/default.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/generator/default.html diff -u pear/HTML_Progress/examples/generator/default.html:1.2 pear/HTML_Progress/examples/generator/default.html:1.3 --- pear/HTML_Progress/examples/generator/default.html:1.2 Sat Sep 25 08:40:48 2004 +++ pear/HTML_Progress/examples/generator/default.html Mon Jul 25 08:52:15 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Default ProgressBar Generator</span></h1> -<p align="right">$Date: 2004/09/25 12:40:48 $</p> +<p align="right">$Date: 2005/07/25 12:52:15 $</p> <div class="toc">&nbsp;Table of contents </div> <ul> @@ -32,25 +32,25 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress_Generator 1.2.0RC3 or better (see source at line 12).</li> +<li>PEAR::HTML_Progress_Generator 1.2.2 or better (see source at line 12).</li> </ul> </p> <p>Be aware that: <ul> -<li>HTML_Progress_Generator has dependencies (HTML_CSS 0.3.4+, HTML_QuickForm 3.1.1+, HTML_QuickForm_Controller 0.9.3+) </li> +<li>HTML_Progress_Generator has dependencies (HTML_QuickForm 3.2.4+, HTML_QuickForm_Controller 1.0.4+) </li> </ul> </p> <hr/> -<p><b>This example will run a default ProgressBar Controller Wizard that will help you +<p><b>This example will run a default ProgressBar Controller Wizard that will help you to create your own progress bar. You may even save the CSS and/or PHP code at end !</b></p> - -<p>Few lines of code are necessary to run this generator. -First we start a session at line 15 (to keep data), then we create a HTML_Progress_Generator + +<p>Few lines of code are necessary to run this generator. +First we start a session at line 15 (to keep data), then we create a HTML_Progress_Generator instance at line 17 without options, and finally run the controller wizard itself at line 18.</p> <p>[<a href="#top">Top</a>]</p> @@ -76,7 +76,7 @@ <p><img src="../screenshots/generator_standard.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/>&nbsp;PHP source syntax highlight</h2> @@ -92,4 +92,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/default.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/generator/default.php diff -u pear/HTML_Progress/examples/generator/default.php:1.1 pear/HTML_Progress/examples/generator/default.php:1.2 --- pear/HTML_Progress/examples/generator/default.php:1.1 Sun Jun 27 09:08:05 2004 +++ pear/HTML_Progress/examples/generator/default.php Mon Jul 25 08:52:15 2005 @@ -1,12 +1,12 @@ <?php -@include '../include_path.php'; /** * Generator usage example using Default QF renderer * without any changes (all default options are used). * - * @version $Id: default.php,v 1.1 2004/06/27 13:08:05 farell Exp $ + * @version $Id: default.php,v 1.2 2005/07/25 12:52:15 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress/generator.php'; http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/embedded.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/generator/embedded.html diff -u pear/HTML_Progress/examples/generator/embedded.html:1.2 pear/HTML_Progress/examples/generator/embedded.html:1.3 --- pear/HTML_Progress/examples/generator/embedded.html:1.2 Sat Sep 25 08:40:48 2004 +++ pear/HTML_Progress/examples/generator/embedded.html Mon Jul 25 08:52:15 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">Embedded ProgressBar Generator</span></h1> -<p align="right">$Date: 2004/09/25 12:40:48 $</p> +<p align="right">$Date: 2005/07/25 12:52:15 $</p> <div class="toc">&nbsp;Table of contents </div> <ul> @@ -32,7 +32,7 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> <li>PEAR::HTML_Progress_Generator 1.2.0RC3 or better (see source at line 12).</li> @@ -41,13 +41,13 @@ <p>Be aware that: <ul> -<li>HTML_Progress_Generator has dependencies (HTML_CSS 0.3.4+, HTML_QuickForm 3.1.1+, HTML_QuickForm_Controller 0.9.3+) </li> +<li>HTML_Progress_Generator has dependencies (HTML_QuickForm 3.2.4+, HTML_QuickForm_Controller 1.0.4+) </li> </ul> </p> <hr/> <p><b>This example will run a custom ProgressBar Controller Wizard integrated in your own -existing pages. As other examples it will help you to create your own progress bar. +existing pages. As other examples it will help you to create your own progress bar. You may even save the CSS and/or PHP code at end !</b></p> <p>This example will show you how to customize all actions (display, preview, process). @@ -58,7 +58,7 @@ <p>But we have choosen to include the generator in our own pages (itdynamic_generator.html) set at line 43.</p> -<p>For preview tab, we have to make it ourself. This is done on lines 46 to 57. +<p>For preview tab, we have to make it ourself. This is done on lines 46 to 57. CSS and Javascript code required for progress bar are merge into html page on lines 49 to 53.</p> <p>The progress bar generated with all your options at line 47 is finally included into html page @@ -67,8 +67,8 @@ <p>On lines 84 to 208, class MyProcessHandler is defined to replace default 'ActionProcess', that will help you to download the file that contents your progress bar PHP/CSS code (see option 'text/php' at line 172, rather than default 'text/plain').</p> - -<p>Don't forget also on lines 88 to 90 code to manage action when user click on Cancel button.</p> + +<p>Don't forget also on lines 88 to 90 code to manage action when user click on Cancel button.</p> <p>And finally, the generator is create at lines 213 to 216, and run on line 218.</p> @@ -99,7 +99,7 @@ <p><img src="../screenshots/generator_embedded.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/>&nbsp;PHP source syntax highlight</h2> @@ -115,4 +115,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/embedded.php?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/generator/embedded.php diff -u pear/HTML_Progress/examples/generator/embedded.php:1.2 pear/HTML_Progress/examples/generator/embedded.php:1.3 --- pear/HTML_Progress/examples/generator/embedded.php:1.2 Sat Oct 16 08:16:20 2004 +++ pear/HTML_Progress/examples/generator/embedded.php Mon Jul 25 08:52:15 2005 @@ -1,12 +1,12 @@ <?php -@include '../include_path.php'; /** * How to embedded HTML_Progress_Generator into existing html page * and allows php/css source-code download. * - * @version $Id: embedded.php,v 1.2 2004/10/16 12:16:20 farell Exp $ + * @version $Id: embedded.php,v 1.3 2005/07/25 12:52:15 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress/generator.php'; @@ -17,12 +17,12 @@ */ require_once 'HTML/Progress/generator/ITDynamic.php'; -/* 2. 'ActionDisplay' is default classname that should exists +/* 2. 'ActionDisplay' is default classname that should exists to manage wizard/tabbed display. But you can also create - your own class under a new name. Then you've to give + your own class under a new name. Then you've to give the new name to HTML_Progress_Generator. For example: - + class MyDisplayHandler extends HTML_QuickForm_Action_Display { ... @@ -33,7 +33,7 @@ */ class MyDisplayHandler extends HTML_QuickForm_Action_Display { - function _renderForm(&$page) + function _renderForm(&$page) { $pageName = $page->getAttribute('name'); $tabPreview = array_slice ($page->controller->_tabs, -2, 1); @@ -67,18 +67,18 @@ } } -/* 3. 'ActionProcess' is default classname that should exists +/* 3. 'ActionProcess' is default classname that should exists to save your progress bar php/css source-code. But you can also create - your own class under a new name. Then you've to give + your own class under a new name. Then you've to give the new name to HTML_Progress_Generator. For example: - + class MyProcessHandler extends HTML_QuickForm_Action { ... } If your 'MyProcessHandler' class is not defined, then default - 'ActionProcess' ('HTML/Progress/generator/process.php') + 'ActionProcess' ('HTML/Progress/generator/process.php') will be used. */ class MyProcessHandler extends HTML_QuickForm_Action @@ -93,12 +93,12 @@ $page->isFormBuilt() or $page->buildForm(); $page->controller->isValid(); - // what kind of source code is requested + // what kind of source code is requested $code = $page->exportValue('phpcss'); $bar = $page->controller->createProgressBar(); $lineEnd = OS_WINDOWS ? "\r\n" : "\n"; - + if (isset($code['C']) && !isset($code['P'])) { $this->exportOutput($bar->getStyle(), 'text/css'); } @@ -109,7 +109,7 @@ if (isset($code['C'])) { $strCSS = '<style type="text/css">'.$lineEnd; $strCSS .= '<!--'.$lineEnd; - $strCSS .= $bar->getStyle() . $lineEnd; + $strCSS .= $bar->getStyle(); $strCSS .= '// -->'.$lineEnd; $strCSS .= '</style>'.$lineEnd; $strPHP = $strCSS; @@ -120,7 +120,7 @@ $strPHP .= 'require_once \'HTML/Progress.php\';'.$lineEnd.$lineEnd; $strPHP .= '$progress = new HTML_Progress();'.$lineEnd; $strPHP .= '$progress->setIdent(\'PB1\');'.$lineEnd; - + if ($bar->isIndeterminate()) { $strPHP .= '$progress->setIndeterminate(true);'.$lineEnd; } @@ -219,7 +219,7 @@ $strPHP .= "'$attr'=>".($val?'true':'false').', '; } else { $strPHP .= "'$attr'=>'$val', "; - } + } } $strPHP = ereg_replace(', $', '', $strPHP); $strPHP .= '));'; http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/htmlpage.html?r1=1.2&r2=1.3&ty=u Index: pear/HTML_Progress/examples/generator/htmlpage.html diff -u pear/HTML_Progress/examples/generator/htmlpage.html:1.2 pear/HTML_Progress/examples/generator/htmlpage.html:1.3 --- pear/HTML_Progress/examples/generator/htmlpage.html:1.2 Sat Sep 25 08:40:48 2004 +++ pear/HTML_Progress/examples/generator/htmlpage.html Mon Jul 25 08:52:15 2005 @@ -18,7 +18,7 @@ <h1><span class="chapter">HTMLPage ProgressBar Generator</span></h1> -<p align="right">$Date: 2004/09/25 12:40:48 $</p> +<p align="right">$Date: 2005/07/25 12:52:15 $</p> <div class="toc">&nbsp;Table of contents </div> <ul> @@ -32,28 +32,28 @@ <a name="intro"> <h2><img src="../images/info.gif"/> Introduction</h2> - + <p>This example requires : <ul> -<li>PEAR::HTML_Progress_Generator 1.2.0RC3 or better (see source at line 12).</li> +<li>PEAR::HTML_Progress_Generator 1.2.2 or better (see source at line 12).</li> </ul> </p> <p>Be aware that: <ul> -<li>HTML_Progress_Generator has dependencies (HTML_CSS 0.3.4+, HTML_QuickForm 3.1.1+, HTML_QuickForm_Controller 0.9.3+) </li> +<li>HTML_Progress_Generator has dependencies (HTML_QuickForm 3.2.4+, HTML_QuickForm_Controller 1.0.4+) </li> </ul> </p> <hr/> <p><b>This example will run a ProgressBar Controller Wizard using the HTMLPage QF rendering. It will help you to create your own progress bar. You may even save the CSS and/or PHP code at end !</b></p> - -<p>Few lines of code are necessary to run this generator. -First we start a session at line 14 (to keep data), then we create a HTML_Progress_Generator + +<p>Few lines of code are necessary to run this generator. +First we start a session at line 14 (to keep data), then we create a HTML_Progress_Generator instance at line 16 without options, and finally run the controller wizard itself at line 17.</p> -<p>Difference from previous example is to use the HTMLPage QF rendering as ActionDisplay +<p>Difference from previous example is to use the HTMLPage QF rendering as ActionDisplay (see line 12).</p> <p>[<a href="#top">Top</a>]</p> @@ -74,9 +74,9 @@ <li><b>display Action </b> = ActionDisplay => HTML/Progress/generator/HTMLPage.php</li> </ul> As we still use the default class name 'ActionDisplay', no need to tell it with the second -parameter of HTML_Progress_Generator class constructor. +parameter of HTML_Progress_Generator class constructor. <br/> -See a script example of <a target="_blank" href="../highlighter.php?file=generator/custom.php">how to customize</a> +See a script example of <a target="_blank" href="../highlighter.php?file=generator/custom.php">how to customize</a> all actions (preview, display, process). <p>[<a href="#top">Top</a>]</p> @@ -88,7 +88,7 @@ <p><img src="../screenshots/generator_standard.png"/></p> <p>[<a href="#top">Top</a>]</p> - + <a name="source"> <h2><img src="../images/source.gif"/>&nbsp;PHP source syntax highlight</h2> @@ -104,4 +104,4 @@ <p>[<a href="#top">Top</a>]</p> </body> -</html> +</html> \ No newline at end of file http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/htmlpage.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/generator/htmlpage.php diff -u pear/HTML_Progress/examples/generator/htmlpage.php:1.1 pear/HTML_Progress/examples/generator/htmlpage.php:1.2 --- pear/HTML_Progress/examples/generator/htmlpage.php:1.1 Sun Jun 27 09:08:05 2004 +++ pear/HTML_Progress/examples/generator/htmlpage.php Mon Jul 25 08:52:15 2005 @@ -1,11 +1,11 @@ <?php -@include '../include_path.php'; /** * Generator usage example using HTMLPage renderer. * - * @version $Id: htmlpage.php,v 1.1 2004/06/27 13:08:05 farell Exp $ + * @version $Id: htmlpage.php,v 1.2 2005/07/25 12:52:15 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress/generator.php'; http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/itdynamic.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/generator/itdynamic.php diff -u pear/HTML_Progress/examples/generator/itdynamic.php:1.1 pear/HTML_Progress/examples/generator/itdynamic.php:1.2 --- pear/HTML_Progress/examples/generator/itdynamic.php:1.1 Sun Jun 27 09:08:05 2004 +++ pear/HTML_Progress/examples/generator/itdynamic.php Mon Jul 25 08:52:15 2005 @@ -2,9 +2,10 @@ /** * Generator usage example using ITDynamic QF renderer. * - * @version $Id: itdynamic.php,v 1.1 2004/06/27 13:08:05 farell Exp $ + * @version $Id: itdynamic.php,v 1.2 2005/07/25 12:52:15 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress/generator.php'; http://cvs.php.net/diff.php/pear/HTML_Progress/examples/generator/smartydynamic.php?r1=1.1&r2=1.2&ty=u Index: pear/HTML_Progress/examples/generator/smartydynamic.php diff -u pear/HTML_Progress/examples/generator/smartydynamic.php:1.1 pear/HTML_Progress/examples/generator/smartydynamic.php:1.2 --- pear/HTML_Progress/examples/generator/smartydynamic.php:1.1 Sun Jun 27 09:08:05 2004 +++ pear/HTML_Progress/examples/generator/smartydynamic.php Mon Jul 25 08:52:15 2005 @@ -3,9 +3,10 @@ * Generator usage example using Array QF renderer * for Smarty template engine. * - * @version $Id: smartydynamic.php,v 1.1 2004/06/27 13:08:05 farell Exp $ + * @version $Id: smartydynamic.php,v 1.2 2005/07/25 12:52:15 farell Exp $ * @author Laurent Laville <pear@laurent-laville.org> * @package HTML_Progress + * @subpackage Examples */ require_once 'HTML/Progress/generator.php';
« previous php.pear.cvs (#33303) next »