cvs: smarty /docs/en/appendixes bugs.xml tips.xml troubleshooting.xml
"Mehdi Achour" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsdidou1080501335@cvsserver> |
didou Sun Mar 28 14:15:35 2004 EDT
Modified files:
/smarty/docs/en/appendixes bugs.xml tips.xml troubleshooting.xml
Log:
various things
http://cvs.php.net/diff.php/smarty/docs/en/appendixes/bugs.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/appendixes/bugs.xml
diff -u smarty/docs/en/appendixes/bugs.xml:1.1 smarty/docs/en/appendixes/bugs.xml:1.2
--- smarty/docs/en/appendixes/bugs.xml:1.1 Sun Mar 28 10:15:37 2004
+++ smarty/docs/en/appendixes/bugs.xml Sun Mar 28 14:15:35 2004
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<chapter id="bugs">
<title>BUGS</title>
<para>
- Check the BUGS file that comes with the latest distribution of Smarty, or
- check the website.
+ Check the <filename>BUGS</filename> file that comes with
+ the latest distribution of Smarty, or check the website.
</para>
</chapter>
<!-- Keep this comment at the end of the file
@@ -26,4 +26,4 @@
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
+-->
http://cvs.php.net/diff.php/smarty/docs/en/appendixes/tips.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/appendixes/tips.xml
diff -u smarty/docs/en/appendixes/tips.xml:1.1 smarty/docs/en/appendixes/tips.xml:1.2
--- smarty/docs/en/appendixes/tips.xml:1.1 Sun Mar 28 10:15:37 2004
+++ smarty/docs/en/appendixes/tips.xml Sun Mar 28 14:15:35 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<chapter id="tips">
<title>Tips & Tricks</title>
<para>
@@ -120,10 +120,12 @@
control over date formatting, and also makes it easy to compare dates if
necessary.
</para>
- <para>
- NOTE: As of Smarty 1.4.0, you can pass dates to Smarty as unix
- timestamps, mysql timestamps, or any date parsable by strtotime().
- </para>
+ <note>
+ <para>
+ As of Smarty 1.4.0, you can pass dates to Smarty as unix
+ timestamps, mysql timestamps, or any date parsable by strtotime().
+ </para>
+ </note>
<example>
<title>using date_format</title>
<programlisting>
@@ -160,18 +162,21 @@
// 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);
}
]]>
</programlisting>
@@ -195,10 +200,12 @@
// 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 @@
// 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);
}
?>
]]>
http://cvs.php.net/diff.php/smarty/docs/en/appendixes/troubleshooting.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/appendixes/troubleshooting.xml
diff -u smarty/docs/en/appendixes/troubleshooting.xml:1.1 smarty/docs/en/appendixes/troubleshooting.xml:1.2
--- smarty/docs/en/appendixes/troubleshooting.xml:1.1 Sun Mar 28 10:15:37 2004
+++ smarty/docs/en/appendixes/troubleshooting.xml Sun Mar 28 14:15:35 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<chapter id="troubleshooting">
<title>Troubleshooting</title>
<para></para>
@@ -74,4 +74,4 @@
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
+-->
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php