cvs: smarty /docs/en/programmers advanced-features.xml api-functions.xml caching.xml plugins.xml

"Mehdi Achour" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsdidou1080525820@cvsserver>
didou		Sun Mar 28 21:03:40 2004 EDT

  Modified files:              
    /smarty/docs/en/programmers	advanced-features.xml api-functions.xml 
                               	caching.xml plugins.xml 
  Log:
  fix parse errors in examples
  # using this: for i in $(ls |grep xml); do php -d short_open_tag=off -l $i; done

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
didou-20040328210340.txt (text/plain, 10.7 KB)
http://cvs.php.net/diff.php/smarty/docs/en/programmers/advanced-features.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/programmers/advanced-features.xml
diff -u smarty/docs/en/programmers/advanced-features.xml:1.1 smarty/docs/en/programmers/advanced-features.xml:1.2
--- smarty/docs/en/programmers/advanced-features.xml:1.1	Sun Mar 28 10:15:37 2004
+++ smarty/docs/en/programmers/advanced-features.xml	Sun Mar 28 21:03:39 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
   <chapter id="advanced.features">
    <title>Advanced Features</title>
    <sect1 id="advanced.features.objects">
@@ -55,7 +55,7 @@
 // the object
 
 class My_Object {
-	function meth1($params, &amp;$smarty_obj) {
+	function meth1($params, &$smarty_obj) {
 		return "this is my meth1";
 	}
 }
@@ -110,7 +110,7 @@
 <![CDATA[
 <?php
 // put this in your application
-function remove_dw_comments($tpl_source, &amp;$smarty)
+function remove_dw_comments($tpl_source, &$smarty)
 {
     return preg_replace("/<!--#.*-->/U","",$tpl_source);
 }
@@ -147,7 +147,7 @@
 <![CDATA[
 <?php
 // put this in your application
-function add_header_comment($tpl_source, &amp;$smarty)
+function add_header_comment($tpl_source, &$smarty)
 {
     return "<?php echo \"<!-- Created by Smarty! -->;\n\" ?>;\n".$tpl_source;
 }
@@ -191,7 +191,7 @@
 <![CDATA[
 <?php
 // put this in your application
-function protect_email($tpl_output, &amp;$smarty)
+function protect_email($tpl_output, &$smarty)
 {
     $tpl_output =
        preg_replace('!(\S+)@([a-zA-Z0-9\.\-]+\.([a-zA-Z]{2,3}|[0-9]{1,3}))!',
@@ -265,7 +265,7 @@
 
 */
 
-function mysql_cache_handler($action, &amp;$smarty_obj, &amp;$cache_content, $tpl_file=null, $cache_id=null, $compile_id=null, $exp_time=null)
+function mysql_cache_handler($action, &$smarty_obj, &$cache_content, $tpl_file=null, $cache_id=null, $compile_id=null, $exp_time=null)
 {
 	// set db host, user and pass here
 	$db_host = 'localhost';
@@ -458,7 +458,7 @@
 <![CDATA[
 <?php
 // put these function somewhere in your application
-function db_get_template ($tpl_name, &amp;$tpl_source, &amp;$smarty_obj)
+function db_get_template ($tpl_name, &$tpl_source, &$smarty_obj)
 {
     // do database call here to fetch your template,
     // populating $tpl_source
@@ -474,7 +474,7 @@
     }
 }
 
-function db_get_timestamp($tpl_name, &amp;$tpl_timestamp, &amp;$smarty_obj)
+function db_get_timestamp($tpl_name, &$tpl_timestamp, &$smarty_obj)
 {
     // do database call here to populate $tpl_timestamp.
     $sql = new SQL;
@@ -489,13 +489,13 @@
     }
 }
 
-function db_get_secure($tpl_name, &amp;$smarty_obj)
+function db_get_secure($tpl_name, &$smarty_obj)
 {
     // assume all templates are secure
     return true;
 }
 
-function db_get_trusted($tpl_name, &amp;$smarty_obj)
+function db_get_trusted($tpl_name, &$smarty_obj)
 {
     // not used for templates
 }
@@ -532,7 +532,7 @@
 <?php
 // put this function somewhere in your application
 
-function make_template ($resource_type, $resource_name, &amp;$template_source, &amp;$template_timestamp, &amp;$smarty_obj)
+function make_template ($resource_type, $resource_name, &$template_source, &$template_timestamp, &$smarty_obj)
 {
 	if( $resource_type == 'file' ) {
 		if ( ! is_readable ( $resource_name )) {
http://cvs.php.net/diff.php/smarty/docs/en/programmers/api-functions.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/programmers/api-functions.xml
diff -u smarty/docs/en/programmers/api-functions.xml:1.1 smarty/docs/en/programmers/api-functions.xml:1.2
--- smarty/docs/en/programmers/api-functions.xml:1.1	Sun Mar 28 10:15:37 2004
+++ smarty/docs/en/programmers/api-functions.xml	Sun Mar 28 21:03:39 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
    <chapter id="api.functions">
      <title>Methods</title>
         <sect1 id="api.append">
@@ -422,7 +422,7 @@
     $db_data = array(
 	    "City" => "Lincoln",
 	    "State" => "Nebraska",
-	    "Zip" = > "68502"
+	    "Zip" => "68502"
 	    );
 
     $smarty->assign("Name","Fred");
@@ -511,7 +511,7 @@
     $db_data = array(
 	    "City" => "Lincoln",
 	    "State" => "Nebraska",
-	    "Zip" = > "68502"
+	    "Zip" => "68502"
 	    );
 
     $smarty->assign("Name","Fred");
@@ -577,10 +577,10 @@
 <programlisting role="php">
 <![CDATA[
 <?php
-function smarty_block_foo($params, &amp;$smarty) {
-	if (isset[$params['object']]) {
+function smarty_block_foo($params, &$smarty) {
+	if (isset($params['object'])) {
 		// get reference to registered object
-   		$obj_ref = &amp;$smarty->&get_registered_object($params['object']);
+   		$obj_ref = &$smarty->get_registered_object($params['object']);
 		// use $obj_ref is now a reference to the object
 	}
 }
@@ -735,7 +735,7 @@
 <?php
 $smarty->register_block("translate", "do_translation");
 
-function do_translation ($params, $content, &amp;$smarty, &amp;$repeat) {
+function do_translation ($params, $content, &$smarty, &$repeat) {
     if (isset($content)) {
         $lang = $params['lang'];
         // do some translation with $content
@@ -1228,4 +1228,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/programmers/caching.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/programmers/caching.xml
diff -u smarty/docs/en/programmers/caching.xml:1.1 smarty/docs/en/programmers/caching.xml:1.2
--- smarty/docs/en/programmers/caching.xml:1.1	Sun Mar 28 10:15:37 2004
+++ smarty/docs/en/programmers/caching.xml	Sun Mar 28 21:03:39 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
   <chapter id="caching">
    <title>Caching</title>
    <para>
@@ -359,7 +359,7 @@
 $smarty = new Smarty;
 $smarty->caching = true;
 
-function remaining_seconds($params, &amp;$smarty) {
+function remaining_seconds($params, &$smarty) {
     $remain = $params['endtime'] - time();
     if ($remain >=0)
         return $remain . " second(s)";
@@ -400,7 +400,7 @@
 $smarty = new Smarty;
 $smarty->caching = true;
 
-function smarty_block_dynamic($param, $content, &amp;$smarty) {
+function smarty_block_dynamic($param, $content, &$smarty) {
     return $content;
 }
 $smarty->register_block('dynamic', 'smarty_block_dynamic', false);
@@ -448,4 +448,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/programmers/plugins.xml?r1=1.2&r2=1.3&ty=u
Index: smarty/docs/en/programmers/plugins.xml
diff -u smarty/docs/en/programmers/plugins.xml:1.2 smarty/docs/en/programmers/plugins.xml:1.3
--- smarty/docs/en/programmers/plugins.xml:1.2	Sun Mar 28 20:49:20 2004
+++ smarty/docs/en/programmers/plugins.xml	Sun Mar 28 21:03:39 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
  <chapter id="plugins">
   <title>Extending Smarty With Plugins</title>
   <para>
@@ -182,7 +182,7 @@
  * Purpose:  outputs a random magic answer
  * -------------------------------------------------------------
  */
-function smarty_function_eightball($params, &amp;$smarty)
+function smarty_function_eightball($params, &$smarty)
 {
     $answers = array('Yes',
                      'No',
@@ -221,7 +221,7 @@
  * Purpose:  assign a value to a template variable
  * -------------------------------------------------------------
  */
-function smarty_function_assign($params, &amp;$smarty)
+function smarty_function_assign($params, &$smarty)
 {
     if (empty($params['var'])) {
         $smarty->trigger_error("assign: missing 'var' parameter");
@@ -415,7 +415,7 @@
  * Purpose:  translate a block of text
  * -------------------------------------------------------------
  */
-function smarty_block_translate($params, $content, &amp;$smarty)
+function smarty_block_translate($params, $content, &$smarty)
 {
     if (isset($content)) {
         $lang = $params['lang'];
@@ -470,7 +470,7 @@
  *           the time it was compiled.
  * -------------------------------------------------------------
  */
-function smarty_compiler_tplheader($tag_arg, &amp;$smarty)
+function smarty_compiler_tplheader($tag_arg, &$smarty)
 {
     return "\necho '" . $smarty->_current_file . " compiled at " . date('Y-m-d H:M'). "';";
 }
@@ -547,7 +547,7 @@
  * Purpose:  Convert html tags to be lowercase.
  * -------------------------------------------------------------
  */
- function smarty_prefilter_pre01($source, &amp;$smarty)
+ function smarty_prefilter_pre01($source, &$smarty)
  {
      return preg_replace('!<(\w+)[^>]+>!e', 'strtolower("$1")', $source);
  }
@@ -570,7 +570,7 @@
  * Purpose:  Output code that lists all current template vars.
  * -------------------------------------------------------------
  */
- function smarty_postfilter_post01($compiled, &amp;$smarty)
+ function smarty_postfilter_post01($compiled, &$smarty)
  {
      $compiled = "<pre>\n<?php print_r(\$this->get_template_vars()); ?>\n</pre>" . $compiled;
      return $compiled;
@@ -614,7 +614,7 @@
  *           a simple protection against spambots
  * -------------------------------------------------------------
  */
- function smarty_outputfilter_protect_email($output, &amp;$smarty)
+ function smarty_outputfilter_protect_email($output, &$smarty)
  {
      return preg_replace('!(\S+)@([a-zA-Z0-9\.\-]+\.([a-zA-Z]{2,3}|[0-9]{1,3}))!',
                          '$1%40$2', $output);
@@ -716,7 +716,7 @@
  * Purpose:  Fetches templates from a database
  * -------------------------------------------------------------
  */
-function smarty_resource_db_source($tpl_name, &amp;$tpl_source, &amp;$smarty)
+function smarty_resource_db_source($tpl_name, &$tpl_source, &$smarty)
 {
     // do database call here to fetch your template,
     // populating $tpl_source
@@ -732,7 +732,7 @@
     }
 }
 
-function smarty_resource_db_timestamp($tpl_name, &amp;$tpl_timestamp, &amp;$smarty)
+function smarty_resource_db_timestamp($tpl_name, &$tpl_timestamp, &$smarty)
 {
     // do database call here to populate $tpl_timestamp.
     $sql = new SQL;
@@ -747,13 +747,13 @@
     }
 }
 
-function smarty_resource_db_secure($tpl_name, &amp;$smarty)
+function smarty_resource_db_secure($tpl_name, &$smarty)
 {
     // assume all templates are secure
     return true;
 }
 
-function smarty_resource_db_trusted($tpl_name, &amp;$smarty)
+function smarty_resource_db_trusted($tpl_name, &$smarty)
 {
     // not used for templates
 }
@@ -799,7 +799,7 @@
  * Purpose:  Inserts current date/time according to format
  * -------------------------------------------------------------
  */
-function smarty_insert_time($params, &amp;$smarty)
+function smarty_insert_time($params, &$smarty)
 {
     if (empty($params['format'])) {
         $smarty->trigger_error("insert time: missing 'format' parameter");
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.