diff --git a/docs/en/appendixes/bugs.xml b/docs/en/appendixes/bugs.xml index ad8fb6ae..a61f559c 100644 --- a/docs/en/appendixes/bugs.xml +++ b/docs/en/appendixes/bugs.xml @@ -3,8 +3,8 @@ BUGS - Check the BUGS file that comes with the latest distribution of Smarty, or - check the website. + Check the BUGS file that comes with + the latest distribution of Smarty, or check the website. \ No newline at end of file +--> diff --git a/docs/en/appendixes/tips.xml b/docs/en/appendixes/tips.xml index b114d536..9dbde5b6 100644 --- a/docs/en/appendixes/tips.xml +++ b/docs/en/appendixes/tips.xml @@ -120,10 +120,12 @@ footer.tpl control over date formatting, and also makes it easy to compare dates if necessary. - - NOTE: As of Smarty 1.4.0, you can pass dates to Smarty as unix - timestamps, mysql timestamps, or any date parsable by strtotime(). - + + + As of Smarty 1.4.0, you can pass dates to Smarty as unix + timestamps, mysql timestamps, or any date parsable by strtotime(). + + using date_format @@ -160,18 +162,21 @@ OUTPUT: // this assumes your form elements are named // startDate_Day, startDate_Month, startDate_Year -$startDate = makeTimeStamp($startDate_Year,$startDate_Month,$startDate_Day); +$startDate = makeTimeStamp($startDate_Year, $startDate_Month, $startDate_Day); -function makeTimeStamp($year="",$month="",$day="") +function makeTimeStamp($year="", $month="", $day="") { - if(empty($year)) + if(empty($year)) { $year = strftime("%Y"); - if(empty($month)) + } + if(empty($month)) { $month = strftime("%m"); - if(empty($day)) + } + if(empty($day)) { $day = strftime("%d"); + } - return mktime(0,0,0,$month,$day,$year); + return mktime(0, 0, 0, $month, $day, $year); } ]]> @@ -195,10 +200,12 @@ function makeTimeStamp($year="",$month="",$day="") // be sure apache is configure for the .wml extensions! // put this function somewhere in your application, or in Smarty.addons.php -function insert_header($params) { +function insert_header($params) +{ // this function expects $content argument - if(empty($params['content'])) + if (empty($params['content'])) { return; + } header($params['content']); return; } @@ -265,18 +272,20 @@ Pretty easy isn't it? // drop file "function.load_ticker.php" in plugin directory // setup our function for fetching stock data -function fetch_ticker($symbol) { +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) { +function smarty_function_load_ticker($params, &$smarty) +{ // call the function $ticker_info = fetch_ticker($params['symbol']); // assign template variable - $smarty->assign($params['assign'],$ticker_info); + $smarty->assign($params['assign'], $ticker_info); } ?> ]]> diff --git a/docs/en/appendixes/troubleshooting.xml b/docs/en/appendixes/troubleshooting.xml index dadea3c9..e74b324c 100644 --- a/docs/en/appendixes/troubleshooting.xml +++ b/docs/en/appendixes/troubleshooting.xml @@ -74,4 +74,4 @@ End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> \ No newline at end of file +-->