cvs: smarty /docs/en appendixes.xml
"Monte Ohrt" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmohrt1080080751@cvsserver> |
mohrt Tue Mar 23 17:25:51 2004 EDT
Modified files:
/smarty/docs/en appendixes.xml
Log:
fix blunder in componentized template example
http://cvs.php.net/diff.php/smarty/docs/en/appendixes.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/appendixes.xml
diff -u smarty/docs/en/appendixes.xml:1.1 smarty/docs/en/appendixes.xml:1.2
--- smarty/docs/en/appendixes.xml:1.1 Thu Mar 18 12:16:23 2004
+++ smarty/docs/en/appendixes.xml Tue Mar 23 17:25:51 2004
@@ -317,17 +317,18 @@
<![CDATA[
<?php
-// function.load_ticker.php
-function smarty_function_load_ticker($params, &$smarty) {
- // setup our function for fetching stock data
- function fetch_ticker($params['symbol']) {
- // put logic here that fetches $ticker_info
- // from some resource
- return $ticker_info;
- }
+// drop file "function.load_ticker.php" in plugin directory
+
+// setup our function for fetching stock data
+function fetch_ticker($symbol) {
+ // put logic here that fetches $ticker_info
+ // from some ticker resource
+ return $ticker_info;
+}
+function smarty_function_load_ticker($params, &$smarty) {
// call the function
- $ticker_info = fetch_ticker("YHOO",$ticker_info);
+ $ticker_info = fetch_ticker($params['symbol']);
// assign template variable
$smarty->assign($params['assign'],$ticker_info);
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php