cvs: smarty /docs/en/appendixes tips.xml
"Mehdi Achour" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsdidou1080554225@cvsserver> |
didou Mon Mar 29 04:57:05 2004 EDT
Modified files:
/smarty/docs/en/appendixes tips.xml
Log:
add PHP tags to get syntax colorized and correct the problem
# http://didou.keliglia.com/php/livedocs-smarty/index.php?l=en&q=tips
http://cvs.php.net/diff.php/smarty/docs/en/appendixes/tips.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/en/appendixes/tips.xml
diff -u smarty/docs/en/appendixes/tips.xml:1.3 smarty/docs/en/appendixes/tips.xml:1.4
--- smarty/docs/en/appendixes/tips.xml:1.3 Sun Mar 28 20:54:07 2004
+++ smarty/docs/en/appendixes/tips.xml Mon Mar 29 04:57:04 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<chapter id="tips">
<title>Tips & Tricks</title>
<para>
@@ -8,13 +8,13 @@
<title>Blank Variable Handling</title>
<para>
There may be times when you want to print a default value for an empty
- variable instead of printing nothing, such as printing " " so that
+ variable instead of printing nothing, such as printing "&nbsp;" so that
table backgrounds work properly. Many would use an {if} statement to
handle this, but there is a shorthand way with Smarty, using the
<emphasis>default</emphasis> variable modifier.
</para>
<example>
- <title>Printing when a variable is empty</title>
+ <title>Printing &nbsp; when a variable is empty</title>
<programlisting>
<![CDATA[
{* the long way *}
@@ -171,6 +171,8 @@
<title>converting form date elements back to a timestamp</title>
<programlisting role="php">
<![CDATA[
+<?php
+
// this assumes your form elements are named
// startDate_Day, startDate_Month, startDate_Year
@@ -190,6 +192,7 @@
return mktime(0, 0, 0, $month, $day, $year);
}
+?>
]]>
</programlisting>
</example>
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php