[PHPLIB-DEV] cvs commit From: uw (phplib-dev <email protected>)
Date: 04/17/00

From: uw
Date: Mon Apr 17 12:43:08 2000
Added files:
      php-lib/pages/form/assistant.php3
      php-lib/pages/form/template_bridge_dump.php3
      php-lib/pages/form/images/error.gif
      php-lib/pages/form/images/ok.gif
      php-lib/pages/form/images/optional.gif
      php-lib/pages/form/templates/assistant_main.tpl
      php-lib/pages/form/templates/form_main.tpl

Modified files:
      php-lib/pages/form/example_assistant.inc
      php-lib/pages/form/example_template_bridge.inc
      php-lib/pages/form/index.php3

Log message:
Added some demos.

Index: php-lib/pages/form/example_assistant.inc
diff -u php-lib/pages/form/example_assistant.inc:1.1 php-lib/pages/form/example_assistant.inc:1.2
--- php-lib/pages/form/example_assistant.inc:1.1 Thu Apr 13 15:04:16 2000
+++ php-lib/pages/form/example_assistant.inc Mon Apr 17 12:42:33 2000
@@ -1,11 +1,11 @@
 <?php
-class my_assistant extends assistant {
+class example_assistant extends assistant {
 
- var $classname = "my_assistant";
+ var $classname = "example_assistant";
         
         function Init() {
                 
- $this->setTemplatePath("/home/www/servers/ulf.dev.netuse.de/templates/");
+ $this->setTemplatePath("/home/www/servers/ulf.dev.netuse.de/pages/newooh/templates/");
                 $this->setMode("strict");
                 $this->setFinish("Finish the assistant", "finish.php3");
                 
@@ -21,7 +21,7 @@
                                                                                 array(
                                                                                                                 "name" => "page1",
                                                                                                                 "tab" => "Page1",
- "object" => $GLOBALS["tpl"],
+ "object" => "example_template_bridge",
                                                                                                                 "next" => ">> page2",
                                                                                                                 "prev" => "",
                                                                                                                 "submit" => "save page1",
@@ -34,7 +34,7 @@
                                                                                 array(
                                                                                                                 "name" => "page2",
                                                                                                                 "tab" => "Page2",
- "object" => $GLOBALS["tpl2"],
+ "object" => "example_template_bridge",
                                                                                                                 "optional" => true,
                                                                                                                 "submit" => "save page2",
                                                                                                                 "comment" => "<b>Page2</b><br>This page is optional"
@@ -45,7 +45,7 @@
                                                                                 array(
                                                                                                                 "name" => "page3",
                                                                                                                 "tab" => "Page3",
- "object" => $GLOBALS["tpl"],
+ "object" => "example_template_bridge",
                                                                                                                 "submit" => "save page3",
                                                                                                                 "comment" => "<b>Page3</b><br>Comment for page3"
                                                                                                 )
@@ -56,5 +56,5 @@
         }
         
 
-} // end class my_assistant
+} // end class example_assistant
 ?>
Index: php-lib/pages/form/example_template_bridge.inc
diff -u php-lib/pages/form/example_template_bridge.inc:1.1 php-lib/pages/form/example_template_bridge.inc:1.2
--- php-lib/pages/form/example_template_bridge.inc:1.1 Thu Apr 13 15:04:17 2000
+++ php-lib/pages/form/example_template_bridge.inc Mon Apr 17 12:42:34 2000
@@ -1,7 +1,8 @@
 <?php
-class my_newform_to_template extends newform_to_template {
+
+class example_template_bridge extends template_bridge {
         /**
- * Array of colors, override it in your class
+ * Array of colors
         *  <email protected> array $colors
         *  <email protected> private
         */
@@ -9,17 +10,21 @@
                                                                                                         "comment" => "#ffffff"
                                                                                         );
         
+ // defines the form
         function Init() {
                 
- $this->setForm("my_form");
+ // name of form class used
+ $this->setForm("example_form");
+ // path to images
                 $this->setImagepath("/home/www/servers/ulf.dev.netuse.de/pages/newooh/");
- $this->setTemplatePath("/home/www/servers/ulf.dev.netuse.de/templates/");
+ // path to templates
+ $this->setTemplatePath("/home/www/servers/ulf.dev.netuse.de/pages/newooh/templates/");
                 
                 $this->setImages(
                                                                                         array (
- "ok" => "ok.gif",
- "error" => "error.gif",
- "optional"=> "optional.gif"
+ "ok" => "images/ok.gif",
+ "error" => "images/error.gif",
+ "optional"=> "images/optional.gif"
                                                                                                                 )
                                                                                 );
                                                                                 
Index: php-lib/pages/form/index.php3
diff -u php-lib/pages/form/index.php3:1.1 php-lib/pages/form/index.php3:1.2
--- php-lib/pages/form/index.php3:1.1 Mon Apr 17 11:22:40 2000
+++ php-lib/pages/form/index.php3 Mon Apr 17 12:42:34 2000
@@ -36,8 +36,8 @@
         ?>
         <table border="0" cellspacing="4" cellpadding="4">
                 <tr bgcolor="#DCE1EF">
- <td align="left" valign="top"><a href="index.php3">New OOH Forms</a></td>
- <td align="left" valign="top"><a href="template_auto.php3">Plain OOH to Template</a><br><a href="template_custom.php3">Custom OOH to Template</a></td>
+ <td align="left" valign="top"><a href="index.php3">Forms</a></td>
+ <td align="left" valign="top"><a href="template_bridge_dump.php3">Template Bridge used to dump a form</a><br><a href="template_bridge_custom.php3">Custom Template Bridge </a></td>
                         <td align="left" valign="top"><a href="assistant.php3">Assistant</a></td>
                 </tr>
                 <tr>

-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.