Thread: [phpwebapp-commits] CVS: documentation/templates/tutorial weboxes.html,1.4,1.5 tutorial.html,1.4,1.5
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-07-21 17:15:45
|
Update of /cvsroot/phpwebapp/documentation/templates/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5212/templates/tutorial Modified Files: weboxes.html tutorial.html transitions.html templates.html sess_var.html intro.html events.html documentation.html database.html advanced.html Log Message: Index: weboxes.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/weboxes.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** weboxes.html 22 Aug 2003 06:51:17 -0000 1.4 --- weboxes.html 21 Jul 2004 17:15:31 -0000 1.5 *************** *** 17,23 **** <a href="http://phpwebapp.sourceforge.net/download/app3.tar.gz">Download</a> </span> ! <br> ! <hr> <h3><a name="toc">Table of Contents</a></h3> --- 17,23 ---- <a href="http://phpwebapp.sourceforge.net/download/app3.tar.gz">Download</a> </span> ! <br /> ! <hr /> <h3><a name="toc">Table of Contents</a></h3> *************** *** 61,65 **** </li> </ul> ! <hr> <a name="webboxes"></a> --- 61,65 ---- </li> </ul> ! <hr /> <a name="webboxes"></a> *************** *** 73,82 **** queries etc., associated with it.</p> ! <p>It is denoted by the tag <strong><WebBox></strong> and it has an <strong>ID</strong> attribute:</p> <pre> ! <WebBox ID="box_id"> ! <!-- content of WebBox --> ! </WebBox> </pre> <p>The identifier must be different for each WebBox used in the --- 73,82 ---- queries etc., associated with it.</p> ! <p>It is denoted by the tag <strong>&lt;WebBox&gt;</strong> and it has an <strong>ID</strong> attribute:</p> <pre> ! &lt;WebBox id="box_id"&gt; ! &lt;!-- content of WebBox --&gt; ! &lt;/WebBox&gt; </pre> <p>The identifier must be different for each WebBox used in the *************** *** 90,94 **** styles etc.) are associated to the WebBox by means of <strong>box_id</strong>, the identifier of the WebBox. When the ! framework parses a <strong><WebBox></strong> tag, it looks for a file named <strong>box_id.php</strong> in the same folder where the WebBox template is. If it finds such a file, it includes it.</p> --- 90,94 ---- styles etc.) are associated to the WebBox by means of <strong>box_id</strong>, the identifier of the WebBox. When the ! framework parses a <strong>&lt;WebBox&gt;</strong> tag, it looks for a file named <strong>box_id.php</strong> in the same folder where the WebBox template is. If it finds such a file, it includes it.</p> *************** *** 98,102 **** like this:</p> <pre> ! <?php class <strong>box_id</strong> extends <strong>WebObject</strong> { --- 98,102 ---- like this:</p> <pre> ! &lt;?php class <strong>box_id</strong> extends <strong>WebObject</strong> { *************** *** 105,109 **** . } ! ?> </pre> --- 105,109 ---- . } ! ?&gt; </pre> *************** *** 162,166 **** <em>HTML</em> page. For example, it includes <strong>box_id.js</strong> and <strong>box_id.css</strong> in the ! <em><head></em> of the page. As an example, <a href="{{APP3_URL}}browse.php?templates/menu/" target="_blank"> see the files of the WebBox <em>menu</em></a>.</p> --- 162,166 ---- <em>HTML</em> page. For example, it includes <strong>box_id.js</strong> and <strong>box_id.css</strong> in the ! <em>&lt;head&gt;</em> of the page. As an example, <a href="{{APP3_URL}}browse.php?templates/menu/" target="_blank"> see the files of the WebBox <em>menu</em></a>.</p> *************** *** 175,180 **** <p>A WebBox is defined inside a template file and the <em>TPL</em> ! code of the WebBox is inside the <em><WebBox></em> tag (is the ! content of the <em><WebBox></em> element). However a WebBox is different from a template because it can also have its own <em>PHP</em> code. Another difference is that a template must include --- 175,180 ---- <p>A WebBox is defined inside a template file and the <em>TPL</em> ! code of the WebBox is inside the <em>&lt;WebBox&gt;</em> tag (is the ! content of the <em>&lt;WebBox&gt;</em> element). However a WebBox is different from a template because it can also have its own <em>PHP</em> code. Another difference is that a template must include *************** *** 184,191 **** <em>see this example</em></a>, however, for a WebBox the framework handles them automatically, by including them at the ! <em><head></em> of the page</p> <span class="button"><a href="#toc">TOC</a></span> ! <hr> <a name="tips"></a> --- 184,191 ---- <em>see this example</em></a>, however, for a WebBox the framework handles them automatically, by including them at the ! <em>&lt;head&gt;</em> of the page</p> <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <a name="tips"></a> *************** *** 198,203 **** <li>The framework tags are case sensitive, e.g. the framework will ! reckognize the tag <strong><WebBox></strong>, however will not ! reckognize the tag <strong><webbox></strong>. (This is a limitation of the current implementation, it may be improved later.)</li> --- 198,203 ---- <li>The framework tags are case sensitive, e.g. the framework will ! reckognize the tag <strong>&lt;WebBox&gt;</strong>, however will not ! reckognize the tag <strong>&lt;webbox&gt;</strong>. (This is a limitation of the current implementation, it may be improved later.)</li> *************** *** 205,210 **** <li>The framework tag attributes are case sensitive, e.g. the framework will reckognize the attribute <strong>ID</strong> of the ! tag <WebBox>, however will not reckognize the attribute ! <strong>id</strong> of the tag <WebBox>.</li> <li>All the files of a WebBox (<strong>.js</strong>, --- 205,210 ---- <li>The framework tag attributes are case sensitive, e.g. the framework will reckognize the attribute <strong>ID</strong> of the ! tag &lt;WebBox&gt;, however will not reckognize the attribute ! <strong>id</strong> of the tag &lt;WebBox&gt;.</li> <li>All the files of a WebBox (<strong>.js</strong>, *************** *** 237,241 **** <span class="button"><a href="#toc">TOC</a></span> ! <hr> <a name="study"></a> --- 237,241 ---- <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <a name="study"></a> *************** *** 254,258 **** of the <em>menu</em> (like templates) because it is done automatically by the framework. ! <br><br> </li> --- 254,258 ---- of the <em>menu</em> (like templates) because it is done automatically by the framework. ! <br /><br /> </li> *************** *** 261,265 **** <em>Page 2</em></a>. To include a webbox we simply include the template that contains the webbox (it is a template inclusion). ! <br><br> </li> --- 261,265 ---- <em>Page 2</em></a>. To include a webbox we simply include the template that contains the webbox (it is a template inclusion). ! <br /><br /> </li> *************** *** 268,272 **** and notice what is wrong with them (it is explained in the comments). (Make sure that you select <em>Code View</em> in the file browser.) ! <br><br> </li> --- 268,272 ---- and notice what is wrong with them (it is explained in the comments). (Make sure that you select <em>Code View</em> in the file browser.) ! <br /><br /> </li> *************** *** 282,286 **** or rename this folder, you have to change just the value of a constant and not every occurrence of the path. ! <br><br> </li> --- 282,286 ---- or rename this folder, you have to change just the value of a constant and not every occurrence of the path. ! <br /><br /> </li> *************** *** 290,294 **** <a href="javascript:codeReview('{{APP3_PATH}}init.php','7')"> <em>init.php</em></a>. ! <br><br> </li> --- 290,294 ---- <a href="javascript:codeReview('{{APP3_PATH}}init.php','7')"> <em>init.php</em></a>. ! <br /><br /> </li> *************** *** 342,346 **** <dd>This file is included after each page is constructed.</dd> </dl> ! <br> Browse also the <a href="{{SAMPLE_URL}}browse.php" target="_blank">empty-sample</a> --- 342,346 ---- <dd>This file is included after each page is constructed.</dd> </dl> ! <br /> Browse also the <a href="{{SAMPLE_URL}}browse.php" target="_blank">empty-sample</a> *************** *** 352,356 **** <span class="button"><a href="#toc">TOC</a></span> ! <hr> <a name="exercises"></a> --- 352,356 ---- <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <a name="exercises"></a> *************** *** 374,379 **** <li>Open the file <a href="javascript:codeReview('{{APP2_PATH}}templates/header.html')"> ! header.html</a> and append the line: <br> ! <kbd><Include SRC="{{#UP_PATH}}app3/templates/menu/menu.html" /></kbd> </li> --- 374,379 ---- <li>Open the file <a href="javascript:codeReview('{{APP2_PATH}}templates/header.html')"> ! header.html</a> and append the line: <br /> ! <kbd>&lt;Include src="{{#UP_PATH}}app3/templates/menu/menu.html" /&gt;</kbd> </li> *************** *** 386,390 **** <p>If you view the HTML code of <em>app2</em> (in browser), you will notice that <em>menu.js</em> and <em>menu.css</em> have been included ! as well in the <em><head></em> of the page.</p> --- 386,390 ---- <p>If you view the HTML code of <em>app2</em> (in browser), you will notice that <em>menu.js</em> and <em>menu.css</em> have been included ! as well in the <em>&lt;head&gt;</em> of the page.</p> *************** *** 398,403 **** <li>Open the file <a href="javascript:codeReview('{{APP2_PATH}}templates/header.html')"> ! header.html</a> and append the line: <br> ! <kbd><Include SRC="{{#UP_PATH}}app3/templates/tip/tip.html" /></kbd> </li> --- 398,403 ---- <li>Open the file <a href="javascript:codeReview('{{APP2_PATH}}templates/header.html')"> ! header.html</a> and append the line: <br /> ! <kbd>&lt;Include src="{{#UP_PATH}}app3/templates/tip/tip.html" /&gt;</kbd> </li> *************** *** 408,414 **** <li>Open <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','2')"> ! tip.php</a> and replace the include statement with:<br> ! <kbd>$tip_path = dirname(__FILE__)."/";</kbd><br> ! <kbd>include_once $tip_path."fun.get_random_tip.php";</kbd><br> Do the same thing with <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/fun.get_random_tip.php','9')"> --- 408,414 ---- <li>Open <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','2')"> ! tip.php</a> and replace the include statement with:<br /> ! <kbd>$tip_path = dirname(__FILE__)."/";</kbd><br /> ! <kbd>include_once $tip_path."fun.get_random_tip.php";</kbd><br /> Do the same thing with <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/fun.get_random_tip.php','9')"> *************** *** 418,422 **** the tip is displayed, but it has no styles. This is because the framework does not reckognize <em>tip_styles.css</em> as being the stylesheet of ! webbox <em>tip</em>. Make a copy of it with the name <em>tip.css</em>:<br> <kbd>$ cp tip_styles.css tip.css</kbd></li> --- 418,422 ---- the tip is displayed, but it has no styles. This is because the framework does not reckognize <em>tip_styles.css</em> as being the stylesheet of ! webbox <em>tip</em>. Make a copy of it with the name <em>tip.css</em>:<br /> <kbd>$ cp tip_styles.css tip.css</kbd></li> *************** *** 470,481 **** state variables and the functions <strong>WebApp::addSVar()</strong>, <strong>WebApp::setSVar()</strong> and <strong>WebApp::getSVar()</strong>. ! <br><br> </li> <li>Now suppose that we want to control ourselves the rotation of the tips. That is, the tip will stay the same when we switch the pages, however it ! will have some buttons like this: '<strong><</strong>'(previous), ! '<strong>></strong>'(next), '<strong><<</strong>'(first), ! '<strong>>></strong>'(last). When we click the button <em>next</em> we should get the next tip, etc. How can we do this? Think about it.</li> </ol> --- 470,481 ---- state variables and the functions <strong>WebApp::addSVar()</strong>, <strong>WebApp::setSVar()</strong> and <strong>WebApp::getSVar()</strong>. ! <br /><br /> </li> <li>Now suppose that we want to control ourselves the rotation of the tips. That is, the tip will stay the same when we switch the pages, however it ! will have some buttons like this: '<strong>&lt;</strong>'(previous), ! '<strong>&gt;</strong>'(next), '<strong>&lt;&lt;</strong>'(first), ! '<strong>&gt;&gt;</strong>'(last). When we click the button <em>next</em> we should get the next tip, etc. How can we do this? Think about it.</li> </ol> Index: tutorial.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/tutorial.html,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tutorial.html 25 Aug 2003 14:34:23 -0000 1.4 --- tutorial.html 21 Jul 2004 17:15:31 -0000 1.5 *************** *** 1,7 **** ! <WebBox ID="tutorial"> <div class="white_box"> ! <Include SRC="{{WEBOBJ_PATH}}tabs/tabs3.html" /> ! <WebObject Class="tabs3" Name="tutorial" /> ! <Include SRC="{{./}}{{tabs3::tutorial->selected_item}}.html" /> </div> ! </WebBox> --- 1,7 ---- ! <webbox id="tutorial"> <div class="white_box"> ! <include src="{{TABS_PATH}}tabs3.html" /> ! <webobject class="tabs3" name="tutorial" /> ! <include src="{{./}}{{tabs3::tutorial->selected_item}}.html" /> </div> ! </webbox> Index: transitions.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/transitions.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** transitions.html 20 Aug 2003 07:33:55 -0000 1.5 --- transitions.html 21 Jul 2004 17:15:31 -0000 1.6 *************** *** 5,9 **** Explains what are the transitions and the difference between the transitions and the links. Explains how to debug transitions.</p> ! <br> <span class="button"> <a href="{{APP1_URL}}" target="_blank">Test</a> --- 5,9 ---- Explains what are the transitions and the difference between the transitions and the links. Explains how to debug transitions.</p> ! <br /> <span class="button"> <a href="{{APP1_URL}}" target="_blank">Test</a> *************** *** 15,20 **** <a href= "http://phpwebapp.sourceforge.net/download/app1.tar.gz">Download</a> </span> ! <br> ! <hr> <h3><a name="toc">Table of Contents</a></h3> --- 15,20 ---- <a href= "http://phpwebapp.sourceforge.net/download/app1.tar.gz">Download</a> </span> ! <br /> ! <hr /> <h3><a name="toc">Table of Contents</a></h3> *************** *** 47,51 **** <li><a href="#experiments">Experiments and questions</a></li> </ul> ! <hr> <p><a name="goto"></a></p> --- 47,51 ---- <li><a href="#experiments">Experiments and questions</a></li> </ul> ! <hr /> <p><a name="goto"></a></p> *************** *** 73,77 **** See the code</a> of the first page and notice how the <strong>GoTo()</strong> is used. ! <br> If you have not tested the application yet, please <a href="{{APP1_URL}}" target="_blank">test it</a> now and pay attention to --- 73,77 ---- See the code</a> of the first page and notice how the <strong>GoTo()</strong> is used. ! <br /> If you have not tested the application yet, please <a href="{{APP1_URL}}" target="_blank">test it</a> now and pay attention to *************** *** 79,83 **** <span class="button"><a href="#toc">TOC</a></span> ! <hr> <a name="external"></a> --- 79,83 ---- <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <a name="external"></a> *************** *** 109,113 **** <span class="button"><a href="#toc">TOC</a></span> ! <hr> <a name="structure"></a> --- 109,113 ---- <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <a name="structure"></a> *************** *** 135,139 **** webapp.php -- standart framework file </pre> ! <br> <p>The application files and folders are:</p> --- 135,139 ---- webapp.php -- standart framework file </pre> ! <br /> <p>The application files and folders are:</p> *************** *** 148,152 **** styles.css </pre> ! <br> <p>The file <em>browse.php</em> is not required by the framework --- 148,152 ---- styles.css </pre> ! <br /> <p>The file <em>browse.php</em> is not required by the framework *************** *** 169,173 **** <span class="button"><a href="#toc">TOC</a></span> ! <hr> <a name="exercises"></a> --- 169,173 ---- <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <a name="exercises"></a> *************** *** 188,192 **** <ol> ! <li>Copy the folder <em>app1</em> to the folder <em>app1_test</em>:<br> <kbd>$ cp -R app1 app1_test</kbd></li> --- 188,192 ---- <ol> ! <li>Copy the folder <em>app1</em> to the folder <em>app1_test</em>:<br /> <kbd>$ cp -R app1 app1_test</kbd></li> *************** *** 203,208 **** <ol> ! <li>Create the folder <em>test</em> and move <em>app1_test</em> to it: <br> ! <kbd>$ mkdir test <br> $ mv app1_test test</kbd></li> <li>Edit the file <em>test/app1_test/config/<a href="javascript:codeReview('{{APP1_PATH}}config/const.Paths.php','3')">const.Paths.php</a></em> --- 203,208 ---- <ol> ! <li>Create the folder <em>test</em> and move <em>app1_test</em> to it: <br /> ! <kbd>$ mkdir test <br /> $ mv app1_test test</kbd></li> <li>Edit the file <em>test/app1_test/config/<a href="javascript:codeReview('{{APP1_PATH}}config/const.Paths.php','3')">const.Paths.php</a></em> *************** *** 247,252 **** <ol> <li>Copy <em>page1.html</em> to <em>page4.html</em> and change its ! title and content to <em>Page 4</em>. <br> ! <kbd>$ cd test/app1_test <br> $ cp page1.html page4.html</kbd></li> <li>Change the links at the bottom of the pages to link to --- 247,252 ---- <ol> <li>Copy <em>page1.html</em> to <em>page4.html</em> and change its ! title and content to <em>Page 4</em>. <br /> ! <kbd>$ cd test/app1_test <br /> $ cp page1.html page4.html</kbd></li> <li>Change the links at the bottom of the pages to link to *************** *** 278,285 **** <ol> ! <li>Create a new folder named <em>pages</em>: <br> <kbd>$ mkdir pages</kbd></li> ! <li>Move all the pages to this folder: <br> <kbd>$ mv page*.html pages</kbd></li> --- 278,285 ---- <ol> ! <li>Create a new folder named <em>pages</em>: <br /> <kbd>$ mkdir pages</kbd></li> ! <li>Move all the pages to this folder: <br /> <kbd>$ mv page*.html pages</kbd></li> *************** *** 314,318 **** <span class="button"><a href="#toc">TOC</a></span> ! <hr> <a name="experiments"></a> --- 314,318 ---- <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <a name="experiments"></a> *************** *** 335,341 **** </ol> ! <p><br> ! <br> <span class="button"><a href="#toc">TOC</a></span> </p> ! <hr> --- 335,341 ---- </ol> ! <p><br /> ! <br /> <span class="button"><a href="#toc">TOC</a></span> </p> ! <hr /> Index: templates.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/templates.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** templates.html 22 Aug 2003 06:51:17 -0000 1.6 --- templates.html 21 Jul 2004 17:15:31 -0000 1.7 *************** *** 1,5 **** <h2>2 - Templates</h2> ! <p>Explains templates. This application uses the <Include> tag to insert the same header file at the beginning of each template and to break the templates into sub templates. It shows --- 1,5 ---- <h2>2 - Templates</h2> ! <p>Explains templates. This application uses the &lt;Include&gt; tag to insert the same header file at the beginning of each template and to break the templates into sub templates. It shows *************** *** 17,23 **** <a href="http://phpwebapp.sourceforge.net/download/app2.tar.gz">Download</a> </span> ! <br> ! <hr> <h3><a name="toc">Table of Contents</a></h3> --- 17,23 ---- <a href="http://phpwebapp.sourceforge.net/download/app2.tar.gz">Download</a> </span> ! <br /> ! <hr /> <h3><a name="toc">Table of Contents</a></h3> *************** *** 30,34 **** <li><a href="#variables">Template Variables</a></li> ! <li><a href="#include">The <Include> tag</a></li> <li><a href="#comments">Comments</a></li> --- 30,34 ---- <li><a href="#variables">Template Variables</a></li> ! <li><a href="#include">The &lt;Include&gt; tag</a></li> <li><a href="#comments">Comments</a></li> *************** *** 68,72 **** </li> </ul> ! <hr> <a name="templates"></a> --- 68,72 ---- </li> </ul> ! <hr /> <a name="templates"></a> *************** *** 103,114 **** <a name="include"></a> ! <h4>2 - The <Include> tag</h4> <p>The templates may also contain some extra tags, which are not HTML tags. These tags are reckognised and processed by the ! framework. One of them is the <Include> tag, which is used to include another template inside the current template:</p> <pre> ! <Include SRC="file_to_be_included" /> </pre> --- 103,114 ---- <a name="include"></a> ! <h4>2 - The &lt;Include&gt; tag</h4> <p>The templates may also contain some extra tags, which are not HTML tags. These tags are reckognised and processed by the ! framework. One of them is the &lt;Include&gt; tag, which is used to include another template inside the current template:</p> <pre> ! &lt;Include src="file_to_be_included" /&gt; </pre> *************** *** 127,131 **** <p>The templates may contain some special comments as well:</p> <pre> ! <!--# Framework comments #--> </pre> --- 127,131 ---- <p>The templates may contain some special comments as well:</p> <pre> ! &lt;!--# Framework comments #--&gt; </pre> *************** *** 144,153 **** styles of its own, then it is better to include them at the begining of the template (instead of including them globally, at ! the <Head> of the page). This makes the template more independant from the other parts of the page and thus easier to use it again into another page. They are included like this:</p> <pre> ! <script language="javascript" src="file.js"></script> ! <link rel="stylesheet" type="text/css" href="file.css"> </pre> --- 144,153 ---- styles of its own, then it is better to include them at the begining of the template (instead of including them globally, at ! the &lt;Head&gt; of the page). This makes the template more independant from the other parts of the page and thus easier to use it again into another page. They are included like this:</p> <pre> ! &lt;script language="javascript" src="file.js"&gt;&lt;/script&gt; ! &lt;link rel="stylesheet" type="text/css" href="file.css"&gt; </pre> *************** *** 165,169 **** <span class="button"><a href="#toc">TOC</a></span> ! <hr> <h3><a name="study">Study the sample</a></h3> --- 165,169 ---- <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <h3><a name="study">Study the sample</a></h3> *************** *** 180,185 **** <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','4')"> <em>config/const.Paths.php</em></a>. ! <br> ! <br></li> <li>All the images of this application are placed in the folder --- 180,185 ---- <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','4')"> <em>config/const.Paths.php</em></a>. ! <br /> ! <br /></li> <li>All the images of this application are placed in the folder *************** *** 192,197 **** <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','6')"> <em>config/const.Paths.php</em></a>. ! <br> ! <br></li> <li>All the files and templates of the page3 are placed in the --- 192,197 ---- <a href="javascript:codeReview('{{APP2_PATH}}config/const.Paths.php','6')"> <em>config/const.Paths.php</em></a>. ! <br /> ! <br /></li> <li>All the files and templates of the page3 are placed in the *************** *** 201,206 **** <a href="javascript:codeReview('{{APP2_PATH}}templates/footer.js','17')"> Notice</a> how the transition to page3 is done. ! <br> ! <br></li> <li>All the pages include the same header and footer template, e.g. see --- 201,206 ---- <a href="javascript:codeReview('{{APP2_PATH}}templates/footer.js','17')"> Notice</a> how the transition to page3 is done. ! <br /> ! <br /></li> <li>All the pages include the same header and footer template, e.g. see *************** *** 209,214 **** the page, then you don't have to change every page, but you make the change only once in the footer. ! <br> ! <br></li> <li><a href="{{APP2_URL}}browse.php" target="_blank">Browse</a> --- 209,214 ---- the page, then you don't have to change every page, but you make the change only once in the footer. ! <br /> ! <br /></li> <li><a href="{{APP2_URL}}browse.php" target="_blank">Browse</a> *************** *** 217,222 **** See them both in preview mode and in code view mode (select the "Code View" mode in the panel at the top and then click "Refresh"). ! <br> ! <br></li> <li>Browse the files and see the template <em>page2.html</em> and all --- 217,222 ---- See them both in preview mode and in code view mode (select the "Code View" mode in the panel at the top and then click "Refresh"). ! <br /> ! <br /></li> <li>Browse the files and see the template <em>page2.html</em> and all *************** *** 228,237 **** several small subtemplates. Try to make the same modification in both of them and see which one is easier to be modified. ! <br> ! <br></li> </ul> <span class="button"><a href="#toc">TOC</a></span> ! <hr> <h3><a name="exercises">Exercises</a></h3> --- 228,237 ---- several small subtemplates. Try to make the same modification in both of them and see which one is easier to be modified. ! <br /> ! <br /></li> </ul> <span class="button"><a href="#toc">TOC</a></span> ! <hr /> <h3><a name="exercises">Exercises</a></h3> *************** *** 287,291 **** <ol> <li>Rename folder <em>img</em> to <em>images</em>: ! <kbd>$ mv img images</kbd> <br> Test the application; the images will be broken.</li> --- 287,291 ---- <ol> <li>Rename folder <em>img</em> to <em>images</em>: ! <kbd>$ mv img images</kbd> <br /> Test the application; the images will be broken.</li> *************** *** 297,303 **** <p>If all the images in the application are linked like this: ! <kbd><img src="{{#IMG_URL}}image_name.png"/></kbd> there will be no problem. However, if any image is hard linked ! like this: <kbd><img src="/img/image_name.png"/></kbd> it will not be displayed.</p> --- 297,303 ---- <p>If all the images in the application are linked like this: ! <kbd>&lt;img src="{{#IMG_URL}}image_name.png"/&gt;</kbd> there will be no problem. However, if any image is hard linked ! like this: <kbd>&lt;img src="/img/image_name.png"/&gt;</kbd> it will not be displayed.</p> *************** *** 311,334 **** <em>tpl_vars.html</em>.</li> ! <li>Replace the selected lines with this line: <br> ! <kbd><Include SRC="{{#./}}tpl_vars.html"/></kbd></li> <li>Copy the <a href="javascript:codeReview('{{APP2_PATH}}templates/page1_content.html','16-30','10-35')"> selected lines</a> of <em>page1_content.html</em> to file ! <em>include_tag.html</em>, and replace them with: <br> ! <kbd><Include SRC="{{#./}}include_tag.html"/></kbd></li> <li>Copy the <a href="javascript:codeReview('{{APP2_PATH}}templates/page1_content.html','32-42','27-47')"> selected lines</a> of <em>page1_content.html</em> to file ! <em>comments.html</em>, and replace them with: <br> ! <kbd><Include SRC="{{#./}}comments.html"/></kbd></li> <li>Copy the <a href="javascript:codeReview('{{APP2_PATH}}templates/page1_content.html','44-63','40-70')"> selected lines</a> of <em>page1_content.html</em> to file ! <em>js_code.html</em>, and replace them with: <br> ! <kbd><Include SRC="{{#./}}js_code.html"/></kbd></li> <li>Test that the application is OK.</li> --- 311,334 ---- <em>tpl_vars.html</em>.</li> ! <li>Replace the selected lines with this line: <br /> ! <kbd>&lt;Include src="{{#./}}tpl_vars.html"/&gt;</kbd></li> <li>Copy the <a href="javascript:codeReview('{{APP2_PATH}}templates/page1_content.html','16-30','10-35')"> selected lines</a> of <em>page1_content.html</em> to file ! <em>include_tag.html</em>, and replace them with: <br /> ! <kbd>&lt;Include src="{{#./}}include_tag.html"/&gt;</kbd></li> <li>Copy the <a href="javascript:codeReview('{{APP2_PATH}}templates/page1_content.html','32-42','27-47')"> selected lines</a> of <em>page1_content.html</em> to file ! <em>comments.html</em>, and replace them with: <br /> ! <kbd>&lt;Include src="{{#./}}comments.html"/&gt;</kbd></li> <li>Copy the <a href="javascript:codeReview('{{APP2_PATH}}templates/page1_content.html','44-63','40-70')"> selected lines</a> of <em>page1_content.html</em> to file ! <em>js_code.html</em>, and replace them with: <br /> ! <kbd>&lt;Include src="{{#./}}js_code.html"/&gt;</kbd></li> <li>Test that the application is OK.</li> *************** *** 345,354 **** <ol> ! <li>Create new folder <em>page1</em>: <br> <kbd>$ mkdir page1</kbd></li> <li>Move files <em>page1.html</em>, <em>page1_content.html</em>, <em>tpl_vars.html</em>, <em>include_tags.html</em>, <em>comments.html</em>, ! <em>js_code.html</em> to folder <em>page1</em><br> e.g. <kbd>$ mv page1.html page1/</kbd></li> --- 345,354 ---- <ol> ! <li>Create new folder <em>page1</em>: <br /> <kbd>$ mkdir page1</kbd></li> <li>Move files <em>page1.html</em>, <em>page1_content.html</em>, <em>tpl_vars.html</em>, <em>include_tags.html</em>, <em>comments.html</em>, ! <em>js_code.html</em> to folder <em>page1</em><br /> e.g. <kbd>$ mv page1.html page1/</kbd></li> *************** *** 392,396 **** <li>At the top of the file <em>page1_content.html</em> add this line: <pre> ! <link rel="stylesheet" type="text/css" href="{{#./}}page1_content.css"> </pre> </li> --- 392,396 ---- <li>At the top of the file <em>page1_content.html</em> add this line: <pre> ! &lt;link rel="stylesheet" type="text/css" href="{{#./}}page1_content.css"&gt; </pre> </li> *************** *** 405,414 **** <ol> ! <li>Create new folder <em>tpl_2</em>:<br> <kbd>$ cd templates/page3/ ; mkdir tpl_2</kbd></li> <li>Move the files <em>tpl_2.html</em>, <em>tpl_2.css</em>, <em>tpl_2_1.html</em>, <em>tpl_2_1.css</em>, <em>tpl_2_2.html</em>, ! <em>tpl_2_2.css</em> to the new folder: <br> <kbd>$ mv tpl_2*.* tpl_2</kbd></li> --- 405,414 ---- <ol> ! <li>Create new folder <em>tpl_2</em>:<br /> <kbd>$ cd templates/page3/ ; mkdir tpl_2</kbd></li> <li>Move the files <em>tpl_2.html</em>, <em>tpl_2.css</em>, <em>tpl_2_1.html</em>, <em>tpl_2_1.css</em>, <em>tpl_2_2.html</em>, ! <em>tpl_2_2.css</em> to the new folder: <br /> <kbd>$ mv tpl_2*.* tpl_2</kbd></li> *************** *** 457,459 **** <p><span class="button"><a href="#toc">TOC</a></span></p> ! <hr> --- 457,459 ---- <p><span class="button"><a href="#toc">TOC</a></span></p> ! <hr /> Index: sess_var.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/sess_var.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sess_var.html 15 Aug 2003 07:37:30 -0000 1.2 --- sess_var.html 21 Jul 2004 17:15:32 -0000 1.3 *************** *** 5,12 **** Explains how the session variables are used to keep the state of the weboxes and the states of the application (introduces ! the function onLoad() of the weboxes). Explains how the <If> elements are used to display templates conditionally. Explains how to debug the session variables. ! <br><br> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> --- 5,12 ---- Explains how the session variables are used to keep the state of the weboxes and the states of the application (introduces ! the function onLoad() of the weboxes). Explains how the &lt;If&gt; elements are used to display templates conditionally. Explains how to debug the session variables. ! <br /><br /> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> *************** *** 15,24 **** <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br><br> ! <hr> ! <br> <ul> ! <li> ! <li> ! <li> </ul> --- 15,24 ---- <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br /><br /> ! <hr /> ! <br /> <ul> ! <li></li> ! <li></li> ! <li></li> </ul> Index: intro.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/intro.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** intro.html 25 Aug 2003 14:34:23 -0000 1.5 --- intro.html 21 Jul 2004 17:15:32 -0000 1.6 *************** *** 14,18 **** you can just copy one of the samples and modify it according to your needs.</p> ! <br> <table width="100%" align="center" cellspacing="0" cellpadding="20" border="0"> --- 14,18 ---- you can just copy one of the samples and modify it according to your needs.</p> ! <br /> <table width="100%" align="center" cellspacing="0" cellpadding="20" border="0"> *************** *** 22,26 **** <strong>1 - Transitions</strong> </a> ! <br> A very simple application that has 2 or 3 HTML files which have transitions to each-other and have some links to external --- 22,26 ---- <strong>1 - Transitions</strong> </a> ! <br /> A very simple application that has 2 or 3 HTML files which have transitions to each-other and have some links to external *************** *** 35,41 **** <strong>2 - Templates</strong> </a> ! <br> The HTML files now become templates. This application uses the ! <Include> tag to insert the same header file at the beginning of each template and to break the templates into sub templates. It shows how to include the javascript code and the --- 35,41 ---- <strong>2 - Templates</strong> </a> ! <br /> The HTML files now become templates. This application uses the ! &lt;Include&gt; tag to insert the same header file at the beginning of each template and to break the templates into sub templates. It shows how to include the javascript code and the *************** *** 51,55 **** <strong>3 - Introducing WebBox-es</strong> </a> ! <br> Some of the templates are turned into weboxes. Explains the fundamental difference between a template and a webox. The PHP --- 51,55 ---- <strong>3 - Introducing WebBox-es</strong> </a> ! <br /> Some of the templates are turned into weboxes. Explains the fundamental difference between a template and a webox. The PHP *************** *** 63,67 **** <strong>4 - Sending and Handelling Events</strong> </a> ! <br> Some of the transitions send events to some of the weboxes. The target weboxes handle these events in their eventHandler() --- 63,67 ---- <strong>4 - Sending and Handelling Events</strong> </a> ! <br /> Some of the transitions send events to some of the weboxes. The target weboxes handle these events in their eventHandler() *************** *** 77,81 **** <strong>5 - Session and Variables</strong> </a> ! <br> Explains what are the session variables and how to use them. Explains further how the {{template variables}} are evaluated. --- 77,81 ---- <strong>5 - Session and Variables</strong> </a> ! <br /> Explains what are the session variables and how to use them. Explains further how the {{template variables}} are evaluated. *************** *** 83,87 **** of the weboxes and the states of the application (introduces the function onLoad() of the weboxes). Explains how the ! <If> elements are used to display templates conditionally. Explains how to debug the session variables. --- 83,87 ---- of the weboxes and the states of the application (introduces the function onLoad() of the weboxes). Explains how the ! &lt;If&gt; elements are used to display templates conditionally. Explains how to debug the session variables. *************** *** 92,101 **** <strong>6 - Interacting with a Database</strong> </a> ! <br> Explains how to set a default connection with a database. Explains the configuration file of a template (*.tpc) and the ! <Recordset> element. Explains the <Repeat> elements and how to use them inside a template. Explains the '.db' file ! of a webox, the <Recordset> and <dbCommand> elements inside it, and how to use the functions WebApp::execDBCmd(), WebApp::openRS() and WebApp::execQuery() --- 92,101 ---- <strong>6 - Interacting with a Database</strong> </a> ! <br /> Explains how to set a default connection with a database. Explains the configuration file of a template (*.tpc) and the ! &lt;Recordset&gt; element. Explains the &lt;Repeat&gt; elements and how to use them inside a template. Explains the '.db' file ! of a webox, the &lt;Recordset&gt; and &lt;dbCommand&gt; elements inside it, and how to use the functions WebApp::execDBCmd(), WebApp::openRS() and WebApp::execQuery() *************** *** 111,115 **** <strong>7 - All the rest of the advanced features</strong> </a> ! <br> A complicated, real and almost finished web application (which may evolve from the previous samples or may be --- 111,115 ---- <strong>7 - All the rest of the advanced features</strong> </a> ! <br /> A complicated, real and almost finished web application (which may evolve from the previous samples or may be *************** *** 119,128 **** <ul> ! <li>Detailed explanation of the <Repeat> element and the page recordsets.</li> ! <li><Var> elements</li> ! <li>An <Include> element that uses a variable.</li> <li>Usage of an external webox.</li> --- 119,128 ---- <ul> ! <li>Detailed explanation of the &lt;Repeat&gt; element and the page recordsets.</li> ! <li>&lt;Var&gt; elements</li> ! <li>An &lt;Include&gt; element that uses a variable.</li> <li>Usage of an external webox.</li> *************** *** 136,140 **** <strong>8 - The documentation application</strong> </a> ! <br> This web application (the 'phpWebApp documentation') is built using phpWebApp itself. This tutorial explains how this web --- 136,140 ---- <strong>8 - The documentation application</strong> </a> ! <br /> This web application (the 'phpWebApp documentation') is built using phpWebApp itself. This tutorial explains how this web Index: events.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/events.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** events.html 15 Aug 2003 07:37:30 -0000 1.2 --- events.html 21 Jul 2004 17:15:32 -0000 1.3 *************** *** 6,10 **** the transitions to 'thisPage', sending an event to 'any' webox, and sending events to 'none' of the weboxes (independent events). ! <br><br> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> --- 6,10 ---- the transitions to 'thisPage', sending an event to 'any' webox, and sending events to 'none' of the weboxes (independent events). ! <br /><br /> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> *************** *** 13,22 **** <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br><br> ! <hr> ! <br> <ul> ! <li> ! <li> ! <li> </ul> --- 13,22 ---- <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br /><br /> ! <hr /> ! <br /> <ul> ! <li></li> ! <li></li> ! <li></li> </ul> Index: documentation.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/documentation.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** documentation.html 15 Aug 2003 07:37:30 -0000 1.2 --- documentation.html 21 Jul 2004 17:15:32 -0000 1.3 *************** *** 4,8 **** using phpWebApp itself. This tutorial explains how this web application is constructed. ! <br><br> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> --- 4,8 ---- using phpWebApp itself. This tutorial explains how this web application is constructed. ! <br /><br /> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> *************** *** 11,20 **** <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br><br> ! <hr> ! <br> <ul> ! <li> ! <li> ! <li> </ul> --- 11,20 ---- <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br /><br /> ! <hr /> ! <br /> <ul> ! <li></li> ! <li></li> ! <li></li> </ul> Index: database.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/database.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** database.html 15 Aug 2003 07:37:30 -0000 1.2 --- database.html 21 Jul 2004 17:15:32 -0000 1.3 *************** *** 2,13 **** Explains how to set a default connection with a database. Explains the configuration file of a template (*.tpc) and ! the <Recordset> element. Explains the <Repeat> elements and how to use them inside a template. Explains the '.db' file ! of a webox, the <Recordset> and <dbCommand> elements inside it, and how to use the functions WebApp::execDBCmd(), WebApp::openRS() and WebApp::execQuery() inside the PHP code of the webox. Explains how to debug the recordsets of the page and the execution times of the queries (and other processes). ! <br><br> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> --- 2,13 ---- Explains how to set a default connection with a database. Explains the configuration file of a template (*.tpc) and ! the &lt;Recordset&gt; element. Explains the &lt;Repeat&gt; elements and how to use them inside a template. Explains the '.db' file ! of a webox, the &lt;Recordset&gt; and &lt;dbCommand&gt; elements inside it, and how to use the functions WebApp::execDBCmd(), WebApp::openRS() and WebApp::execQuery() inside the PHP code of the webox. Explains how to debug the recordsets of the page and the execution times of the queries (and other processes). ! <br /><br /> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> *************** *** 16,25 **** <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br><br> ! <hr> ! <br> <ul> ! <li> ! <li> ! <li> </ul> --- 16,25 ---- <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br /><br /> ! <hr /> ! <br /> <ul> ! <li></li> ! <li></li> ! <li></li> </ul> Index: advanced.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/advanced.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** advanced.html 15 Aug 2003 07:37:30 -0000 1.2 --- advanced.html 21 Jul 2004 17:15:32 -0000 1.3 *************** *** 6,17 **** previous samples. Such features may be: <ul> ! <li> Detailed explanation of the <Repeat> element and the page ! recordsets. ! <li> <Var> elements ! <li> An <Include> element that uses a variable. ! <li> Usage of an external webox. ! <li> Etc. </ul> ! <br><br> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> --- 6,17 ---- previous samples. Such features may be: <ul> ! <li> Detailed explanation of the &lt;Repeat&gt; element and the page ! recordsets.</li> ! <li> &lt;Var&gt; elements</li> ! <li> An &lt;Include&gt; element that uses a variable.</li> ! <li> Usage of an external webox.</li> ! <li> Etc.</li> </ul> ! <br /><br /> <span class="button"> <a href="javascript: alert('Sorry! Not implemented yet.')">Test</a> *************** *** 20,29 **** <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br><br> ! <hr> ! <br> <ul> ! <li> ! <li> ! <li> </ul> --- 20,29 ---- <a href="javascript: alert('Sorry! Not implemented yet.')">Browse</a> </span> ! <br /><br /> ! <hr /> ! <br /> <ul> ! <li></li> ! <li></li> ! <li></li> </ul> |