cvs: smarty /docs/en/designers language-custom-functions.xml language-modifiers.xml

"Mehdi Achour" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsdidou1080722698@cvsserver>
didou		Wed Mar 31 03:44:59 2004 EDT

  Modified files:              
    /smarty/docs/en/designers	language-custom-functions.xml 
                             	language-modifiers.xml 
  Log:
  more CDATA's
  
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-custom-functions.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/designers/language-custom-functions.xml
diff -u smarty/docs/en/designers/language-custom-functions.xml:1.1 smarty/docs/en/designers/language-custom-functions.xml:1.2
--- smarty/docs/en/designers/language-custom-functions.xml:1.1	Sun Mar 28 10:15:37 2004
+++ smarty/docs/en/designers/language-custom-functions.xml	Wed Mar 31 03:44:56 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
         <chapter id="language.custom.functions">
          <title>Custom Functions</title>
         <para>
@@ -707,31 +707,40 @@
 				image tags static for optimal performance.
             	</para>
 			</note>
-<example>
-<title>html_image</title>
-<programlisting>
-index.php:
+   <example>
+    <title>html_image example</title>
+    <programlisting role="php">
+<![CDATA[
+<?php
 
 require('Smarty.class.php');
 $smarty = new Smarty;
-$smarty-&gt;display('index.tpl');
-
-index.tpl:
+$smarty->display('index.tpl');
 
+?>
+]]>
+    </programlisting>
+    <para>
+     where index.tpl is:
+    </para>
+    <programlisting>
+<![CDATA[
 {html_image file="pumpkin.jpg"}
 {html_image file="/path/from/docroot/pumpkin.jpg"}
 {html_image file="../path/relative/to/currdir/pumpkin.jpg"}
-
-OUTPUT: (possible)
-
-&lt;img src="pumpkin.jpg" alt="" border="0" width="44" height="68" /&gt;
-&lt;img src="/path/from/docroot/pumpkin.jpg" alt="" border="0" width="44" height="68" /&gt;
-&lt;img src="../path/relative/to/currdir/pumpkin.jpg" alt="" border="0" width="44" height="68" /&gt;</programlisting>
-
-
-
-
-</example>
+]]>
+    </programlisting>
+    <para>
+     a possible output would be:
+    </para>
+    <screen>
+<![CDATA[
+<img src="pumpkin.jpg" alt="" border="0" width="44" height="68" />
+<img src="/path/from/docroot/pumpkin.jpg" alt="" border="0" width="44" height="68" />
+<img src="../path/relative/to/currdir/pumpkin.jpg" alt="" border="0" width="44" height="68" />
+]]>
+    </screen>
+   </example>
 		</sect1>
 		<sect1 id="language.function.html.options">
 			<title>html_options</title>
@@ -2680,4 +2689,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/designers/language-modifiers.xml?r1=1.3&r2=1.4&ty=u
Index: smarty/docs/en/designers/language-modifiers.xml
diff -u smarty/docs/en/designers/language-modifiers.xml:1.3 smarty/docs/en/designers/language-modifiers.xml:1.4
--- smarty/docs/en/designers/language-modifiers.xml:1.3	Sun Mar 28 20:54:07 2004
+++ smarty/docs/en/designers/language-modifiers.xml	Wed Mar 31 03:44:56 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
     <chapter id="language.modifiers">
      <title>Variable Modifiers</title>
      <para>
@@ -12,8 +12,9 @@
      <example>
       <title>modifier example</title>
       <programlisting>
+<![CDATA[
 {* Uppercase the title *}
-&lt;h2&gt;{$title|upper}&lt;/h2&gt;
+<h2>{$title|upper}</h2>
 
 {* Truncate the topic to 40 characters use ... at the end *}
 Topic: {$topic|truncate:40:"..."}
@@ -22,7 +23,9 @@
 {"now"|date_format:"%Y/%m/%d"}
 
 {* apply modifier to a custom function *}
-{mailto|upper address="[email protected]"}</programlisting>
+{mailto|upper address="[email protected]"}
+]]>
+      </programlisting>
      </example>
      <para>
       If you apply a modifier to an array variable instead of a single value variable,
@@ -61,23 +64,36 @@
        </para>
        <example>
         <title>capitalize</title>
-        <programlisting>
-index.php:
+        <programlisting role="php">
+<![CDATA[
+<?php
 
 $smarty = new Smarty;
-$smarty-&gt;assign('articleTitle', 'Police begin campaign to rundown jaywalkers.');
-$smarty-&gt;display('index.tpl');
-
-index.tpl:
+$smarty->assign('articleTitle', 'Police begin campaign to rundown jaywalkers.');
+$smarty->display('index.tpl');
 
+?>
+]]>
+        </programlisting>
+        <para>
+         Where index.tpl is:
+        </para>
+        <programlisting>
+<![CDATA[
 {$articleTitle}
 {$articleTitle|capitalize}
-
-OUTPUT:
-
+]]>
+        </programlisting>
+        <para>
+         This will output:
+        </para>
+        <screen>
+<![CDATA[
 Police begin campaign to rundown jaywalkers.
-Police Begin Campaign To Rundown Jaywalkers.</programlisting>
-</example>
+Police Begin Campaign To Rundown Jaywalkers.
+]]>
+        </screen>
+       </example>
 		</sect1>
 		<sect1 id="language.modifier.count.characters">
 			<title>count_characters</title>
@@ -112,26 +128,40 @@
 			<para>
 			This is used to count the number of characters in a variable.
 			</para>
-<example>
-<title>count_characters</title>
-<programlisting>
-index.php:
+   <example>
+    <title>count_characters</title>
+    <programlisting role="php">
+<![CDATA[
+<?php
 
 $smarty = new Smarty;
-$smarty-&gt;assign('articleTitle', 'Cold Wave Linked to Temperatures.');
-$smarty-&gt;display('index.tpl');
-
-index.tpl:
+$smarty->assign('articleTitle', 'Cold Wave Linked to Temperatures.');
+$smarty->display('index.tpl');
 
+?>
+]]>
+    </programlisting>
+    <para>
+     Where index.tpl is:
+    </para>
+    <programlisting>
+<![CDATA[
 {$articleTitle}
 {$articleTitle|count_characters}
 {$articleTitle|count_characters:true}
-OUTPUT:
-
+]]>
+    </programlisting>
+    <para>
+     This will output:
+    </para>
+    <screen>
+<![CDATA[
 Cold Wave Linked to Temperatures.
 29
-33</programlisting>
-</example>
+33
+]]>
+    </screen>
+   </example>
 		</sect1>
 		<sect1 id="language.modifier.cat">
 			<title>cat</title>

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.