cvs: smarty /docs/en/designers/language-custom-functions language-function-html-checkboxes.xml language-function-html-image.xml language-function-html-options.xml language-function-html-radios.xml language-function-mailto.xml language-function-popup-init.xml language-function-popup.xml

[email protected] ("Peter 'Mash' Morgan") Mon, 13 Mar 2006 23:13:39 -0000
Newsgroups php.smarty.cvs
Message-ID <cvspete_morgan1142291619@cvsserver>
pete_morgan		Mon Mar 13 23:13:39 2006 UTC

  Modified files:              
    /smarty/docs/en/designers/language-custom-functions	
                                                       	language-function-html-checkboxes.xml 
                                                       	language-function-html-image.xml 
                                                       	language-function-html-options.xml 
                                                       	language-function-html-radios.xml 
                                                       	language-function-mailto.xml 
                                                       	language-function-popup-init.xml 
                                                       	language-function-popup.xml 
  Log:
  even more tweaks
pete_morgan-20060313231339.txt (text/plain, 13.9 KB)
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/designers/language-custom-functions/language-function-html-checkboxes.xml?r1=1.12&r2=1.13&diff_format=u
Index: smarty/docs/en/designers/language-custom-functions/language-function-html-checkboxes.xml
diff -u smarty/docs/en/designers/language-custom-functions/language-function-html-checkboxes.xml:1.12 smarty/docs/en/designers/language-custom-functions/language-function-html-checkboxes.xml:1.13
--- smarty/docs/en/designers/language-custom-functions/language-function-html-checkboxes.xml:1.12	Mon Mar 13 14:49:07 2006
+++ smarty/docs/en/designers/language-custom-functions/language-function-html-checkboxes.xml	Mon Mar 13 23:13:38 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
 <sect1 id="language.function.html.checkboxes">
  <title>{html_checkboxes}</title>
   <para>
@@ -9,7 +9,7 @@
    group with provided data. It takes care of which item(s) are
    selected by default as well. Required attributes are values and
    output, unless you use options instead. All output is XHTML
-   compatible.
+   compliant.
  </para>
  
  <informaltable frame="all">
@@ -117,8 +117,8 @@
   </para>
   <programlisting>
 <![CDATA[
-{html_checkboxes name="id" values=$cust_ids output=$cust_names
-   selected=$customer_id  separator="<br />"}
+{html_checkboxes name='id' values=$cust_ids output=$cust_names
+   selected=$customer_id  separator='<br />'}
 ]]>
   </programlisting>
   <para>
@@ -144,7 +144,7 @@
   </para>
   <programlisting>
 <![CDATA[
-{html_checkboxes name="id" options=$cust_checkboxes selected=$customer_id separator="<br />"}
+{html_checkboxes name='id' options=$cust_checkboxes selected=$customer_id separator='<br />'}
 ]]>
   </programlisting>
   <para>
@@ -168,10 +168,11 @@
 <![CDATA[
 <?php
 
-$sql = 'select type_id, types from types order by type';
-$smarty->assign('types',$db->getAssoc($sql));
+$sql = 'select type_id, types from contact_types order by type';
+$smarty->assign('contact_types',$db->getAssoc($sql));
 
-$sql = 'select * from contacts where contact_id=12';
+$sql = 'select contact_id, contact_type_id, contact '
+       ,'from contacts where contact_id=12';
 $smarty->assign('contact',$db->getRow($sql));
 
 ?>
@@ -179,7 +180,8 @@
   </programlisting>
 <programlisting>
 <![CDATA[
-{html_checkboxes name="type" options=$types selected=$contact.type_id separator="<br />"}
+{html_checkboxes name='contact_type_id' options=$contact_types 
+        selected=$contact.contact_type_id separator='<br />'}
 ]]>
 </programlisting>
  </example>
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/designers/language-custom-functions/language-function-html-image.xml?r1=1.7&r2=1.8&diff_format=u
Index: smarty/docs/en/designers/language-custom-functions/language-function-html-image.xml
diff -u smarty/docs/en/designers/language-custom-functions/language-function-html-image.xml:1.7 smarty/docs/en/designers/language-custom-functions/language-function-html-image.xml:1.8
--- smarty/docs/en/designers/language-custom-functions/language-function-html-image.xml:1.7	Mon Oct 10 14:45:34 2005
+++ smarty/docs/en/designers/language-custom-functions/language-function-html-image.xml	Mon Mar 13 23:13:38 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
 <sect1 id="language.function.html.image">
  <title>{html_image}</title>
   <para>
@@ -117,9 +117,9 @@
 <![CDATA[
 where index.tpl is:
 -------------------
-{html_image file="pumpkin.jpg"}
-{html_image file="/path/from/docroot/pumpkin.jpg"}
-{html_image file="../path/relative/to/currdir/pumpkin.jpg"}
+{html_image file='pumpkin.jpg'}
+{html_image file='/path/from/docroot/pumpkin.jpg'}
+{html_image file='../path/relative/to/currdir/pumpkin.jpg'}
 ]]>
   </programlisting>
   <para>
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/designers/language-custom-functions/language-function-html-options.xml?r1=1.12&r2=1.13&diff_format=u
Index: smarty/docs/en/designers/language-custom-functions/language-function-html-options.xml
diff -u smarty/docs/en/designers/language-custom-functions/language-function-html-options.xml:1.12 smarty/docs/en/designers/language-custom-functions/language-function-html-options.xml:1.13
--- smarty/docs/en/designers/language-custom-functions/language-function-html-options.xml:1.12	Fri Dec  2 10:02:48 2005
+++ smarty/docs/en/designers/language-custom-functions/language-function-html-options.xml	Mon Mar 13 23:13:38 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
 <sect1 id="language.function.html.options">
  <title>{html_options}</title>
   <para>
@@ -159,10 +159,10 @@
 <![CDATA[
 <?php
 
-$sql = 'select type_id, types from types order by type';
-$smarty->assign('types',$db->getAssoc($sql));
+$sql = 'select type_id, types from contact_types order by type';
+$smarty->assign('contact_types',$db->getAssoc($sql));
 
-$sql = 'select contact_id, name, email, type_id
+$sql = 'select contact_id, name, email, contact_type_id
         from contacts where contact_id='.$contact_id;
 $smarty->assign('contact',$db->getRow($sql));
 
@@ -176,7 +176,8 @@
 <![CDATA[
 <select name="type_id">
     <option value='null'>-- none --</option>
-    {html_options name="type" options=$types selected=$contact.type_id}
+    {html_options name='contact_type_type' options=$contact_types 
+        selected=$contact.type_id}
 </select>
 ]]>
   </programlisting>
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/designers/language-custom-functions/language-function-html-radios.xml?r1=1.11&r2=1.12&diff_format=u
Index: smarty/docs/en/designers/language-custom-functions/language-function-html-radios.xml
diff -u smarty/docs/en/designers/language-custom-functions/language-function-html-radios.xml:1.11 smarty/docs/en/designers/language-custom-functions/language-function-html-radios.xml:1.12
--- smarty/docs/en/designers/language-custom-functions/language-function-html-radios.xml:1.11	Fri Dec 23 11:19:18 2005
+++ smarty/docs/en/designers/language-custom-functions/language-function-html-radios.xml	Mon Mar 13 23:13:38 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
 <sect1 id="language.function.html.radios">
  <title>{html_radios}</title>
   <para>
@@ -8,7 +8,7 @@
    that creates html radio button
    group with provided data. It takes care of which item is selected
    by default as well. Required attributes are values and output,
-   unless you use options instead. All output is XHTML compatible.
+   unless you use options instead. All output is XHTML compliant.
  </para>
  
  <informaltable frame="all">
@@ -80,7 +80,7 @@
  </para>
 
  <example>
-  <title>{html_radios} : Example 1</title>
+  <title>{html_radios} example 1</title>
 <programlisting role="php">
 <![CDATA[
 <?php
@@ -102,13 +102,13 @@
   </para>
   <programlisting>
 <![CDATA[
-{html_radios name="id" values=$cust_ids output=$cust_names
-       selected=$customer_id separator="<br />"}
+{html_radios name='id' values=$cust_ids output=$cust_names
+       selected=$customer_id separator='<br />'}
    ]]>
   </programlisting>
 </example>
 <example>
- <title>{html_radios} : Example 2</title>
+ <title>{html_radios} example 2</title>
 <programlisting role="php">
 <![CDATA[
 <?php
@@ -128,7 +128,8 @@
   </para>
   <programlisting>
 <![CDATA[
-{html_radios name="id" options=$cust_radios selected=$customer_id separator="<br />"}
+{html_radios name='id' options=$cust_radios 
+     selected=$customer_id separator='<br />'}
 ]]>
   </programlisting>
   <para>
@@ -145,7 +146,7 @@
   </screen>
  </example>
  <example>
-  <title>{html_radios}- Database example (eg PEAR or ADODB):</title>
+  <title>{html_radios} - Database example (eg PEAR or ADODB):</title>
   <programlisting role="php">
 <![CDATA[
 <?php
@@ -153,7 +154,7 @@
 $sql = 'select type_id, types from types order by type';
 $smarty->assign('types',$db->getAssoc($sql));
 
-$sql = 'select contact_id, name, email, type_id
+$sql = 'select contact_id, name, email, contact_type_id
         from contacts where contact_id='.$contact_id;
 $smarty->assign('contact',$db->getRow($sql));
 
@@ -165,7 +166,8 @@
   </para>
   <programlisting>
 <![CDATA[
-{html_radios name="type" options=$types selected=$contact.type_id separator="<br />"}
+{html_radios name='contact_type_type' options=$types 
+     selected=$contact.contact_type_id separator='<br />'}
 ]]>
   </programlisting>
  </example>
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/designers/language-custom-functions/language-function-mailto.xml?r1=1.6&r2=1.7&diff_format=u
Index: smarty/docs/en/designers/language-custom-functions/language-function-mailto.xml
diff -u smarty/docs/en/designers/language-custom-functions/language-function-mailto.xml:1.6 smarty/docs/en/designers/language-custom-functions/language-function-mailto.xml:1.7
--- smarty/docs/en/designers/language-custom-functions/language-function-mailto.xml:1.6	Tue Sep 13 19:03:11 2005
+++ smarty/docs/en/designers/language-custom-functions/language-function-mailto.xml	Mon Mar 13 23:13:38 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
 <sect1 id="language.function.mailto">
  <title>{mailto}</title>
   <para>
@@ -105,38 +105,38 @@
   </para>
  </note>
  <example>
-  <title>{mailto}</title>
+  <title>{mailto} example lines followed by the result</title>
   <programlisting>
 <![CDATA[
-   {mailto address="[email protected]"}
+{mailto address="[email protected]"}
 <a href="mailto:[email protected]" >[email protected]</a>
 
-   {mailto address="[email protected]" text="send me some mail"}
+{mailto address="[email protected]" text="send me some mail"}
 <a href="mailto:[email protected]" >send me some mail</a>
 
-   {mailto address="[email protected]" encode="javascript"}
+{mailto address="[email protected]" encode="javascript"}
 <script type="text/javascript" language="javascript">
  eval(unescape('%64%6f% ... snipped ...%61%3e%27%29%3b'))
 </script>
 
-   {mailto address="[email protected]" encode="hex"}
+{mailto address="[email protected]" encode="hex"}
 <a href="mailto:%6d%65.. snipped..3%6f%6d">&#x6d;&..snipped...#x6f;&#x6d;</a>
 
-   {mailto address="[email protected]" subject="Hello to you!"}
-   <a href="mailto:[email protected]?subject=Hello%20to%20you%21" >[email protected]</a>
+mailto address="[email protected]" subject="Hello to you!"}
+<a href="mailto:[email protected]?subject=Hello%20to%20you%21" >[email protected]</a>
 
 {mailto address="[email protected]" cc="[email protected],[email protected]"}
-   <a href="mailto:[email protected][email protected]%[email protected]" >[email protected]</a>
+<a href="mailto:[email protected][email protected]%[email protected]" >[email protected]</a>
 
 {mailto address="[email protected]" extra='class="email"'}
-   <a href="mailto:[email protected]" class="email">[email protected]</a>
+<a href="mailto:[email protected]" class="email">[email protected]</a>
 
 {mailto address="[email protected]" encode="javascript_charcode"}
-   <script type="text/javascript" language="javascript">
-   <!--
+<script type="text/javascript" language="javascript">
+<!--
 {document.write(String.fromCharCode(60,97, ... snipped ....60,47,97,62))}
-   //-->
-   </script>
+//-->
+</script>
 ]]>
 </programlisting>
  </example>
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/designers/language-custom-functions/language-function-popup-init.xml?r1=1.5&r2=1.6&diff_format=u
Index: smarty/docs/en/designers/language-custom-functions/language-function-popup-init.xml
diff -u smarty/docs/en/designers/language-custom-functions/language-function-popup-init.xml:1.5 smarty/docs/en/designers/language-custom-functions/language-function-popup-init.xml:1.6
--- smarty/docs/en/designers/language-custom-functions/language-function-popup-init.xml:1.5	Fri Dec 30 15:29:33 2005
+++ smarty/docs/en/designers/language-custom-functions/language-function-popup-init.xml	Mon Mar 13 23:13:38 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
 <sect1 id="language.function.popup.init">
  <title>{popup_init}</title>
  <para>
@@ -23,7 +23,7 @@
 <![CDATA[
 <head>
 {* popup_init must be called once at the top of the page *}
-{popup_init src="javascripts/overlib.js"}
+{popup_init src='javascripts/overlib/overlib.js'}
 </head>
 ]]>
   </programlisting>
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/designers/language-custom-functions/language-function-popup.xml?r1=1.6&r2=1.7&diff_format=u
Index: smarty/docs/en/designers/language-custom-functions/language-function-popup.xml
diff -u smarty/docs/en/designers/language-custom-functions/language-function-popup.xml:1.6 smarty/docs/en/designers/language-custom-functions/language-function-popup.xml:1.7
--- smarty/docs/en/designers/language-custom-functions/language-function-popup.xml:1.6	Tue Sep 13 19:03:11 2005
+++ smarty/docs/en/designers/language-custom-functions/language-function-popup.xml	Mon Mar 13 23:13:38 2006
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
 <sect1 id="language.function.popup">
  <title>{popup}</title>
   <para>
@@ -402,18 +402,20 @@
   <programlisting>
 <![CDATA[
 {* popup_init must be called once at the top of the page *}
-{popup_init src="/javascripts/overlib.js"}
+{popup_init src='/javascripts/overlib.js'}
 
 {* create a link with a popup window when you move your mouse over *}
-<a href="mypage.html" {popup text="This link takes you to my page!"}>mypage</a>
+<a href="mypage.html" {popup text='This link takes you to my page!'}>mypage</a>
 
 {* you can use html, links, etc in your popup text *}
-<a href="mypage.html" {popup sticky=true caption="mypage contents"
+<a href="mypage.html" {popup sticky=true caption='mypage contents'
 text="<ul><li>links</li><li>pages</li><li>images</li></ul>"
-snapx=10 snapy=10}>mypage</a>
+snapx=10 snapy=10 trigger='onClick'}>mypage</a>
 ]]>
   </programlisting>
  </example>
+ <para>There is another good example on the 
+ <link linkend="language.function.capture">{capture}</link> page.</para>
  <para>
  See also
   <link linkend="language.function.popup.init">{popup_init}</link>