cvs: smarty /docs designers.sgml programmers.sgml

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1060264791@cvsserver>
messju		Thu Aug  7 09:59:51 2003 EDT

  Modified files:              
    /smarty/docs	designers.sgml programmers.sgml 
  Log:
  added docs for php-functions as modifiers
  
Index: smarty/docs/designers.sgml
diff -u smarty/docs/designers.sgml:1.72 smarty/docs/designers.sgml:1.73
--- smarty/docs/designers.sgml:1.72	Mon Aug  4 07:29:09 2003
+++ smarty/docs/designers.sgml	Thu Aug  7 09:59:51 2003
@@ -490,6 +490,27 @@
       <literal>{$articleTitle|@count}</literal> (this will print out the number of
       elements in the $articleTitle array.)
      </para>
+     <para>
+      Modifiers can be autoloaded from your <link
+      linkend="variable.plugins.dir">$plugins_dir</link> (also see:
+      <link linkend="plugins.naming.conventions">Naming
+      Conventions</link>) or can be registered explicitely (see: <link
+      linkend="api.register.modifier">register_modifier</link>). Additionally
+      all php-functions can be used as modifiers implicitely. (The
+      <literal>@count</literal>-example above actually uses php's
+      count-function and not a smarty-modifier). Using php-functions
+      as modifiers has two little pitfalls: First: Sometimes the order
+      of the function-parameters is not the desirable one
+      (<literal>{"%2.f"|sprintf:$float}</literal> actually works, but
+      asks for the more intuitive <literal>{For example:
+      $float|string_format:"%2.f"}</literal> that is provided by the
+      Smarty distribution). Second: with <link
+      linkend="variable.security">$security</link> turned on all
+      php-functions that are to be used as modifiers have to be
+      declared trusted in the <link
+      linkend="variable.security.settings">
+      $security_settings['MODIFIER_FUNCS']</link>-array.
+     </para>
 
       <sect1 id="language.modifier.capitalize">
        <title>capitalize</title>
Index: smarty/docs/programmers.sgml
diff -u smarty/docs/programmers.sgml:1.38 smarty/docs/programmers.sgml:1.39
--- smarty/docs/programmers.sgml:1.38	Thu Aug  7 06:50:46 2003
+++ smarty/docs/programmers.sgml	Thu Aug  7 09:59:51 2003
@@ -457,7 +457,6 @@
      </sect1>
      <sect1 id="variable.request.use.auto.globals">
       <title>$request_use_auto_globals</title>
-
       <para>
 	   Specifies if Smarty should use php's $HTTP_*_VARS[]
 	   ($request_use_auto_globals=false which is the default value) or
@@ -467,7 +466,6 @@
 	   linkend="variable.request.vars.order">variable.request.vars.order
 	   </link> has no effect but php's configuration value
 	   <literal>gpc_order</literal> is used.
-
       </para>
      </sect1>
      <sect1 id="variable.compile.id">
@@ -2495,9 +2493,10 @@
     depends on the order in which they are registered or loaded.
    </para>
    <para>
-    There is only one plugins directory (for performance reasons). To
-    install a plugin, simply place it in the directory and Smarty will use
-    it automatically.
+    The <link linkend="variable.plugins.dir">plugins directory</link>
+    can be a string containing a path or an array containing multiple
+    paths. To install a plugin, simply place it in one of the
+    directories and Smarty will use it automatically.
    </para>
   </sect1>
 



-- 
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.