[phpwebapp-commits] CVS: documentation/templates/tutorial weboxes.html,1.5,1.6
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-07-30 09:57:23
|
Update of /cvsroot/phpwebapp/documentation/templates/tutorial In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6665/templates/tutorial Modified Files: weboxes.html Log Message: Index: weboxes.html =================================================================== RCS file: /cvsroot/phpwebapp/documentation/templates/tutorial/weboxes.html,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** weboxes.html 21 Jul 2004 17:15:31 -0000 1.5 --- weboxes.html 30 Jul 2004 09:57:13 -0000 1.6 *************** *** 111,115 **** <a href="javascript:codeReview('{{APP3_PATH}}templates/menu/menu.html','1')"> <em>templates/menu/menu.html</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/menu/menu.php','2')"> <em>templates/menu/menu.php</em></a>. </p> --- 111,115 ---- <a href="javascript:codeReview('{{APP3_PATH}}templates/menu/menu.html','1')"> <em>templates/menu/menu.html</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/menu/menu.php','4')"> <em>templates/menu/menu.php</em></a>. </p> *************** *** 144,148 **** <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.html','5')"> <em>templates/tip/tip.html</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','10,13')"> <em>templates/tip/tip.php</em></a>. The framework replaces the variables {{#rand}} and {{#tip_text}} by the --- 144,148 ---- <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.html','5')"> <em>templates/tip/tip.html</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','12,15')"> <em>templates/tip/tip.php</em></a>. The framework replaces the variables {{#rand}} and {{#tip_text}} by the *************** *** 197,211 **** with the same <strong>ID</strong>.</li> - <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> - - <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>, <strong>.css</strong>, <strong>.db</strong>, etc.) must have the --- 197,200 ---- *************** *** 227,239 **** <li>Never construct HTML code in the PHP, put all the HTML in the template instead!</li> - - <li>Assign to template variables only a value that is really a - variable, what is not a variable should be placed in the - template.</li> </ul> - <p>Don't worry if you don't understand these last 3 tips, we will - discuss them later.</p> - <span class="button"><a href="#toc">TOC</a></span> <hr /> --- 216,221 ---- *************** *** 258,262 **** <li>Notice how are included several webboxes in ! <a href="javascript:codeReview('{{APP3_PATH}}templates/page2.html','22,25,28,31,34')"> <em>Page 2</em></a>. To include a webbox we simply include the template that contains the webbox (it is a template inclusion). --- 240,244 ---- <li>Notice how are included several webboxes in ! <a href="javascript:codeReview('{{APP3_PATH}}templates/page2.html','25,28,31,34')"> <em>Page 2</em></a>. To include a webbox we simply include the template that contains the webbox (it is a template inclusion). *************** *** 272,281 **** <li>The application has defined a constant TIP_PATH in ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Paths.php','8')"> <em>config/const.Paths.php</em></a> and then has used it in several places, like in ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','2')"> <em>tip.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/fun.get_random_tip.php','9')"> <em>fun.get_random_tip.php</em></a>, etc. This is better than hardcoding paths, because in case that you move --- 254,263 ---- <li>The application has defined a constant TIP_PATH in ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Paths.php','10')"> <em>config/const.Paths.php</em></a> and then has used it in several places, like in ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','4')"> <em>tip.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/fun.get_random_tip.php','11')"> <em>fun.get_random_tip.php</em></a>, etc. This is better than hardcoding paths, because in case that you move *************** *** 288,292 **** the application. This is done using the function <strong>WebApp::message()</strong> in the file ! <a href="javascript:codeReview('{{APP3_PATH}}init.php','7')"> <em>init.php</em></a>. <br /><br /> --- 270,274 ---- the application. This is done using the function <strong>WebApp::message()</strong> in the file ! <a href="javascript:codeReview('{{APP3_PATH}}init.php','9')"> <em>init.php</em></a>. <br /><br /> *************** *** 296,304 **** The application has also support for counting clicks and displaying them, however it is optional. See how it is done: ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Options.php','51-55')"> <em>config/const.Options.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}init.php','9-12')"> <em>init.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}global.php','8-14')"> <em>global.php</em></a>. --- 278,286 ---- The application has also support for counting clicks and displaying them, however it is optional. See how it is done: ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Options.php','72-76')"> <em>config/const.Options.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}init.php','11-14')"> <em>init.php</em></a>, ! <a href="javascript:codeReview('{{APP3_PATH}}global.php','10-16')"> <em>global.php</em></a>. *************** *** 329,333 **** <dd>This file is included by the framework only the first time that the application is openned (at the beginning of the session).It may ! be used to initialize anything.</dd> <dt><strong>global.php</strong></dt> --- 311,315 ---- <dd>This file is included by the framework only the first time that the application is openned (at the beginning of the session).It may ! be used to initialize any thing.</dd> <dt><strong>global.php</strong></dt> *************** *** 375,379 **** <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> --- 357,361 ---- <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> *************** *** 407,416 **** <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')"> fun.get_random_tip.php</a>.</li> --- 389,398 ---- <li>Open ! <a href="javascript:codeReview('{{APP3_PATH}}templates/tip/tip.php','4')"> 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','11')"> fun.get_random_tip.php</a>.</li> *************** *** 432,436 **** <ol> <li>Open the file ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Options.php','51-55')"> config/const.Options.php</a> and set the constant <em>COUNT_CLICKS</em> to <em>true</em>.</li> --- 414,418 ---- <ol> <li>Open the file ! <a href="javascript:codeReview('{{APP3_PATH}}config/const.Options.php','72-76')"> config/const.Options.php</a> and set the constant <em>COUNT_CLICKS</em> to <em>true</em>.</li> *************** *** 449,455 **** <ol> <li>Open the files ! <a href="javascript:codeReview('{{APP3_PATH}}before_page.php','6')"> before_page.php</a> and ! <a href="javascript:codeReview('{{APP3_PATH}}after_page.php','6')"> after_page.php</a> and uncomment the <em>print</em> statements.</li> --- 431,437 ---- <ol> <li>Open the files ! <a href="javascript:codeReview('{{APP3_PATH}}before_page.php','8')"> before_page.php</a> and ! <a href="javascript:codeReview('{{APP3_PATH}}after_page.php','8')"> after_page.php</a> and uncomment the <em>print</em> statements.</li> |