mirror of
				https://github.com/smarty-php/smarty.git
				synced 2025-11-03 22:01:36 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			80 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			80 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
<?xml version="1.0" encoding="iso-8859-1"?>
 | 
						|
<!-- $Revision$ -->
 | 
						|
     <sect1 id="variable.plugins.dir">
 | 
						|
      <title>$plugins_dir</title>
 | 
						|
      <para>
 | 
						|
       This is the directory or directories where Smarty will look for the
 | 
						|
       plugins that it needs. Default is
 | 
						|
       <filename class="directory">plugins/</filename> under the
 | 
						|
       <link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>.
 | 
						|
        If you supply a relative path, Smarty will first look under the
 | 
						|
       <link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>, then
 | 
						|
       relative to the current working directory, then relative to the PHP
 | 
						|
       include_path. If <parameter>$plugins_dir</parameter>
 | 
						|
        is an array of directories, Smarty will
 | 
						|
       search for your plugin in each plugin directory
 | 
						|
       <emphasis role="bold">in the order they are given</emphasis>.
 | 
						|
      </para>
 | 
						|
      <note>
 | 
						|
         <title>Technical Note</title>
 | 
						|
         <para>
 | 
						|
          For best performance, do not setup your <parameter>$plugins_dir</parameter>
 | 
						|
          to have to use the PHP include path. Use an absolute pathname,
 | 
						|
          or a path relative  to <constant>SMARTY_DIR</constant> or the current
 | 
						|
           working directory.
 | 
						|
          </para>
 | 
						|
        </note>
 | 
						|
 | 
						|
      <example>
 | 
						|
      <title>Appending a local plugin dir</title>
 | 
						|
      <programlisting role="php">
 | 
						|
<![CDATA[
 | 
						|
<?php
 | 
						|
 | 
						|
$smarty->plugins_dir[] = 'includes/my_smarty_plugins';
 | 
						|
 | 
						|
?>
 | 
						|
 | 
						|
]]>
 | 
						|
    </programlisting>
 | 
						|
    </example>
 | 
						|
      <example>
 | 
						|
      <title>Multiple $plugins_dir</title>
 | 
						|
      <programlisting role="php">
 | 
						|
<![CDATA[
 | 
						|
<?php
 | 
						|
 | 
						|
$smarty->plugins_dir = array(
 | 
						|
                       'plugins', // the default under SMARTY_DIR
 | 
						|
                       '/path/to/shared/plugins',
 | 
						|
                       '../../includes/my/plugins'
 | 
						|
                       );
 | 
						|
 | 
						|
?>
 | 
						|
 | 
						|
]]>
 | 
						|
    </programlisting>
 | 
						|
    </example>
 | 
						|
 | 
						|
</sect1>
 | 
						|
<!-- Keep this comment at the end of the file
 | 
						|
Local variables:
 | 
						|
mode: sgml
 | 
						|
sgml-omittag:t
 | 
						|
sgml-shorttag:t
 | 
						|
sgml-minimize-attributes:nil
 | 
						|
sgml-always-quote-attributes:t
 | 
						|
sgml-indent-step:1
 | 
						|
sgml-indent-data:t
 | 
						|
indent-tabs-mode:nil
 | 
						|
sgml-parent-document:nil
 | 
						|
sgml-default-dtd-file:"../../../../manual.ced"
 | 
						|
sgml-exposed-tags:nil
 | 
						|
sgml-local-catalogs:nil
 | 
						|
sgml-local-ecat-files:nil
 | 
						|
End:
 | 
						|
vim600: syn=xml fen fdm=syntax fdl=2 si
 | 
						|
vim: et tw=78 syn=sgml
 | 
						|
vi: ts=1 sw=1
 | 
						|
-->
 |