mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-08 16:21:39 +01:00
added Japanese translation files.
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.autoload.filters">
|
||||
<title>$autoload_filters</title>
|
||||
<para>
|
||||
全てのテンプレートの呼出し時に適用したいフィルタがある場合、
|
||||
この変数を用いて指定する事で、Smarty はそれらを自動的に読み込みます。
|
||||
これは、配列のキーがフィルタの種類、値がフィルタの名前を格納した連想配列です。
|
||||
たとえば次のようになります。
|
||||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$smarty->autoload_filters = array('pre' => array('trim', 'stamp'),
|
||||
'output' => array('convert'));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<link linkend="api.register.outputfilter"><varname>register_outputfilter()</varname></link>、
|
||||
<link linkend="api.register.prefilter"><varname>register_prefilter()</varname></link>、
|
||||
<link linkend="api.register.postfilter"><varname>register_postfilter()</varname></link>
|
||||
および
|
||||
<link linkend="api.load.filter"><varname>load_filter()</varname></link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
69
docs/ja/programmers/api-variables/variable-cache-dir.xml
Normal file
69
docs/ja/programmers/api-variables/variable-cache-dir.xml
Normal file
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.6 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.cache.dir">
|
||||
<title>$cache_dir</title>
|
||||
<para>
|
||||
テンプレートのキャッシュが格納されるディレクトリです。デフォルトは
|
||||
<filename class="directory">./cache</filename> で、
|
||||
これは実行中のPHPスクリプトが置かれた場所にある
|
||||
<filename class="directory">cache/</filename> ディレクトリを探す事を意味します。
|
||||
<emphasis role="bold">このディレクトリは web サーバが書き込み可能でなくてはなりません</emphasis>。
|
||||
詳細は <link linkend="installing.smarty.basic">インストールについての説明</link>
|
||||
を参照してください。
|
||||
</para>
|
||||
<para>
|
||||
この設定を使わずに、キャッシュファイルを操作するための
|
||||
<link linkend="section.template.cache.handler.func">
|
||||
自作のキャッシュハンドラ</link>
|
||||
関数を使う事もできます。詳細は
|
||||
<link linkend="variable.use.sub.dirs"><parameter>$use_sub_dirs</parameter></link>
|
||||
も参照してください。
|
||||
</para>
|
||||
<note>
|
||||
<title>テクニカルノート</title>
|
||||
<para>
|
||||
この設定は、相対パス又は絶対パスである必要があります。
|
||||
include_path はファイル書き込み時には使用されません。
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<title>テクニカルノート</title>
|
||||
<para>
|
||||
このディレクトリをwebサーバのドキュメントルート下に置く事は推奨しません。
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
<link linkend="variable.caching"><parameter>$caching</parameter></link>、
|
||||
<link linkend="variable.use.sub.dirs"><parameter>$use_sub_dirs</parameter></link>、
|
||||
<link linkend="variable.cache.lifetime"><parameter>$cache_lifetime</parameter></link>、
|
||||
<link linkend="variable.cache.handler.func"><parameter>$cache_handler_func</parameter></link>、
|
||||
<link linkend="variable.cache.modified.check"><parameter>$cache_modified_check</parameter></link>
|
||||
および
|
||||
<link linkend="caching">キャッシュの項目</link> も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.cache.handler.func">
|
||||
<title>$cache_handler_func</title>
|
||||
<para>
|
||||
<link linkend="variable.cache.dir"><parameter>$cache_dir</parameter></link>.
|
||||
用いる組み込みメソッドを使用する代わりに、
|
||||
キャッシュファイルを操作するために定義された関数の名前を指定します。
|
||||
詳細は、
|
||||
<link linkend="section.template.cache.handler.func">cache
|
||||
キャッシュハンドラ関数</link> の項を参照して下さい。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.cache.lifetime">
|
||||
<title>$cache_lifetime</title>
|
||||
<para>
|
||||
テンプレートのキャッシュの期限(単位:秒)です。これが切れるとキャッシュは再生成されます。
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<parameter>$cache_lifetime</parameter> を使用するためには、
|
||||
<parameter>$caching</parameter> を有効に (1 あるいは 2 のいずれかに) する必要があります。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
この値を -1 にすると、キャッシュを無期限で有効とします。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
この値を 0 にすると、キャッシュを常に再生成します
|
||||
(これはテスト時にのみ有用です。
|
||||
キャッシュを無効にするためには、より効率的な方法として <link
|
||||
linkend="variable.caching"><parameter>$caching</parameter></link> = 0
|
||||
があります)。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
各テンプレートごとに有効期限を独自に設定したい場合は
|
||||
<link linkend="variable.caching">
|
||||
<parameter>$caching</parameter></link> = 2
|
||||
とします。そして
|
||||
<link linkend="api.display"><varname>display()</varname>
|
||||
</link> あるいは <link linkend="api.fetch"><varname>fetch()</varname></link>
|
||||
を呼び出す前に
|
||||
<parameter>$cache_lifetime</parameter> に値を設定してください。
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>
|
||||
<link linkend="variable.force.compile">
|
||||
<parameter>$force_compile</parameter></link>
|
||||
が有効の場合、キャッシュファイルは毎回再生成されるので事実上キャッシュは無効になります。
|
||||
<link linkend="api.clear.all.cache"><varname>clear_all_cache()</varname></link>
|
||||
関数で全てのキャッシュを、<link
|
||||
linkend="api.clear.cache"><varname>clear_cache()</varname></link>
|
||||
関数で特定のキャッシュファイル (グループ) をクリアする事が出来ます。
|
||||
</para>
|
||||
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.cache.modified.check">
|
||||
<title>$cache_modified_check</title>
|
||||
<para>
|
||||
&true; の場合、Smarty はクライアントから送信された If-Modified-Since
|
||||
ヘッダを尊重します。キャッシュファイルのタイムスタンプが最後に訪れた時から変わっていなければ、
|
||||
コンテンツの代わりに <literal>'304: Not Modified'</literal> レスポンスが返されます。
|
||||
これは、キャッシュされた内容に
|
||||
<link linkend="language.function.insert"><varname>{insert}</varname></link>
|
||||
タグが含まれない場合にのみ機能します。
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<link linkend="variable.caching"><parameter>$caching</parameter></link>、
|
||||
<link linkend="variable.cache.lifetime"><parameter>$cache_lifetime</parameter></link>、
|
||||
<link linkend="variable.cache.handler.func"><parameter>$cache_handler_func</parameter></link>
|
||||
および
|
||||
<link linkend="caching">キャッシュの項</link> も参照してください。
|
||||
</para>
|
||||
|
||||
</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
|
||||
-->
|
||||
83
docs/ja/programmers/api-variables/variable-caching.xml
Normal file
83
docs/ja/programmers/api-variables/variable-caching.xml
Normal file
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.6 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.caching">
|
||||
<title>$caching</title>
|
||||
<para>
|
||||
テンプレートの出力を <link linkend="variable.cache.dir">
|
||||
<parameter>$cache_dir</parameter></link> にキャッシュするかどうかを設定します。
|
||||
デフォルトは 0 で、これは無効を意味します。
|
||||
テンプレートが何度も同じコンテンツを生成するような場合は、
|
||||
<parameter>$caching</parameter> を有効にするほうがよいでしょう。
|
||||
これにより、パフォーマンスが向上します。
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<link linkend="caching.multiple.caches">複数の</link>
|
||||
キャッシュをひとつのテンプレートファイルに持たせることもできます。
|
||||
</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
値として 1 または 2 を指定すると、キャッシュを有効にします。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
1 は、Smarty にそのキャッシュが期限切れかどうかを調べるために、 現在の時間と
|
||||
<link linkend="variable.cache.lifetime"><parameter>$cache_lifetime</parameter></link>
|
||||
の値を比較するように指示します。
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
2 は、Smarty にそのキャッシュが生成された時点の時間と
|
||||
<link linkend="variable.cache.lifetime"><parameter>$cache_lifetime</parameter></link>
|
||||
の値を比較するように指示します。このようにキャッシュの期限を制御するために、
|
||||
テンプレートを <link linkend="api.fetch">取得</link> する直前に
|
||||
<link linkend="variable.cache.lifetime"> <parameter>$cache_lifetime</parameter></link>
|
||||
をセットする事ができます。詳細は、
|
||||
<link linkend="api.is.cached"><varname>is_cached()</varname></link>
|
||||
の項を参照して下さい。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
<link linkend="variable.compile.check"><parameter>$compile_check</parameter></link>
|
||||
が有効な場合、キャッシュに含まれるテンプレートや設定ファイルが変更されていると、
|
||||
キャッシュが再生成されます。
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<link linkend="variable.force.compile">
|
||||
<parameter>$force_compile</parameter></link>
|
||||
が有効ならばキャッシュは常に再生成されます。
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
<para>
|
||||
<link linkend="variable.cache.dir"><parameter>$cache_dir</parameter></link>、
|
||||
<link linkend="variable.cache.lifetime"><parameter>$cache_lifetime</parameter></link>、
|
||||
<link linkend="variable.cache.handler.func"><parameter>$cache_handler_func</parameter></link>、
|
||||
<link linkend="variable.cache.modified.check"><parameter>$cache_modified_check</parameter></link>、
|
||||
<link linkend="api.is.cached"><varname>is_cached()</varname></link>
|
||||
および
|
||||
<link linkend="caching">キャッシュの項</link> も参照してください。
|
||||
</para>
|
||||
|
||||
</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
|
||||
-->
|
||||
50
docs/ja/programmers/api-variables/variable-compile-check.xml
Normal file
50
docs/ja/programmers/api-variables/variable-compile-check.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.compile.check">
|
||||
<title>$compile_check</title>
|
||||
<para>
|
||||
SmartyはPHPアプリケーションの各リクエスト時に、
|
||||
現在のテンプレートが最後に訪れた時から変更されている(タイムスタンプが異なる)
|
||||
かどうかを検査します。もし変更されているならば、
|
||||
そのテンプレートを再コンパイルします。
|
||||
そのテンプレートが一度もコンパイルされていなかった場合は、
|
||||
この設定に関係なくコンパイルを行います。この変数のデフォルトは &true; です。
|
||||
</para>
|
||||
<para>
|
||||
テンプレートが変更される予定がないアプリケーションがいったん稼動に入れば、
|
||||
もはや compile_checkの ステップは必要ありません。
|
||||
最大限のパフォーマンスを向上させるために、必ず
|
||||
<parameter>$compile_check</parameter> を &false; に設定して下さい。
|
||||
また、この設定を &false; に変更した後にテンプレートファイルが変更された場合、
|
||||
そのテンプレートが再コンパイルされる事は「ない」ので変更は反映されない事に注意してください。
|
||||
<link linkend="variable.caching"><parameter>$caching</parameter></link> と
|
||||
<parameter>$compile_check</parameter> が共に有効ならば、
|
||||
テンプレートファイルが更新されるとキャッシュファイルが再生成されます
|
||||
詳細は、<link linkend="variable.force.compile">
|
||||
<parameter>$force_compile</parameter></link> および <link
|
||||
linkend="api.clear.compiled.tpl"><varname>clear_compiled_tpl()</varname>
|
||||
</link> を参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
57
docs/ja/programmers/api-variables/variable-compile-dir.xml
Normal file
57
docs/ja/programmers/api-variables/variable-compile-dir.xml
Normal file
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.compile.dir">
|
||||
<title>$compile_dir</title>
|
||||
<para>
|
||||
コンパイルされたテンプレートが置かれるディレクトリです。デフォルトは
|
||||
<filename class="directory">./templates_c</filename> で、
|
||||
これは実行中の PHP スクリプトが置かれた場所にある
|
||||
<filename class="directory">templates_c/</filename> ディレクトリを探すことを意味します。
|
||||
<emphasis role="bold">このディレクトリは web サーバが書き込み可能でなければなりません
|
||||
</emphasis>。詳細は
|
||||
<link linkend="installing.smarty.basic">インストール</link>
|
||||
の説明を参照してください。
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<title>テクニカルノート</title>
|
||||
<para>
|
||||
この設定は相対パス又は絶対パスである必要があります。
|
||||
include_path はファイル書き込み時には使用されません。
|
||||
</para>
|
||||
</note>
|
||||
<note>
|
||||
<title>テクニカルノート</title>
|
||||
<para>
|
||||
このディレクトリをwebサーバのドキュメントルート下に置く事は推奨されません。
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
<link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>
|
||||
および
|
||||
<link linkend="variable.use.sub.dirs"><parameter>$use_sub_dirs</parameter></link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
65
docs/ja/programmers/api-variables/variable-compile-id.xml
Normal file
65
docs/ja/programmers/api-variables/variable-compile-id.xml
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.7 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.compile.id">
|
||||
<title>$compile_id</title>
|
||||
<para>
|
||||
コンパイルファイルを識別するための id です。すべての関数呼び出しで毎回
|
||||
<parameter>$compile_id</parameter> を渡すかわりに
|
||||
<parameter>$compile_id</parameter> を指定すると、その後は暗黙のうちにこれを使用します。
|
||||
</para>
|
||||
<para>
|
||||
<parameter>$compile_id</parameter> を使用すると、同一の
|
||||
<link linkend="variable.compile.dir"><parameter>$compile_dir</parameter></link>
|
||||
を別々の <link linkend="variable.template.dir">
|
||||
<parameter>$template_dirs</parameter></link> で使用できないという制限を回避できます。
|
||||
異なる <parameter>$compile_id</parameter> をそれぞれの
|
||||
<link linkend="variable.template.dir"><parameter>$template_dir</parameter>
|
||||
</link> で指定すると、Smarty はコンパイルしたテンプレートを
|
||||
<parameter>$compile_id</parameter> で区別します。
|
||||
</para>
|
||||
<para>
|
||||
例として、コンパイル時刻でテンプレートをローカライズ (言語依存のパーツを翻訳)
|
||||
する <link linkend="plugins.prefilters.postfilters">prefilter</link>
|
||||
を用いる場合、<parameter>$compile_id</parameter>
|
||||
に現在の言語を使用することで、各言語についてのコンパイルしたテンプレートのセットを得ることができます。
|
||||
</para>
|
||||
<para>
|
||||
別の例としては、複数のドメイン/複数のバーチャルホスト
|
||||
をまたがって同じコンパイルディレクトリを使用する場合があります。
|
||||
</para>
|
||||
<example>
|
||||
<title>バーチャルホスト環境での $compile_id</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty->compile_id = $_SERVER['SERVER_NAME'];
|
||||
$smarty->compile_dir = '/path/to/shared_compile_dir';
|
||||
|
||||
?>
|
||||
]]>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.compiler.class">
|
||||
<title>$compiler_class</title>
|
||||
<para>
|
||||
Smarty がテンプレートをコンパイルするために使用するコンパイラクラスの名前を指定します。
|
||||
デフォルトは 'Smarty_Compiler' です。
|
||||
これは上級ユーザのために用意されています。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.config.booleanize">
|
||||
<title>$config_booleanize</title>
|
||||
<para>
|
||||
&true; の場合、<link linkend="config.files">設定ファイル</link>
|
||||
の <literal>on/true/yes</literal>
|
||||
や <literal>off/false/no</literal> といった値が自動的に
|
||||
boolean 値に変換されます。これにより、テンプレートで
|
||||
<literal>{if #foobar#}...{/if}</literal> のように使用できるようになります。foobar が
|
||||
<literal>on</literal>、<literal>true</literal> あるいは <literal>yes</literal>
|
||||
である場合に <varname>{if}</varname> ステートメントを実行します。
|
||||
デフォルトは &true; です。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
42
docs/ja/programmers/api-variables/variable-config-dir.xml
Normal file
42
docs/ja/programmers/api-variables/variable-config-dir.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.config.dir">
|
||||
<title>$config_dir</title>
|
||||
<para>
|
||||
テンプレートから読み込むための
|
||||
<link linkend="config.files">設定ファイル</link>
|
||||
を置くディレクトリです。デフォルトは
|
||||
<filename class="directory">./configs</filename>
|
||||
で、実行中の PHP スクリプトが置かれた場所にある
|
||||
<filename class="directory">configs/</filename>
|
||||
ディレクトリを探すことを意味します。
|
||||
</para>
|
||||
<note>
|
||||
<title>テクニカルノート</title>
|
||||
<para>
|
||||
このディレクトリをwebサーバのドキュメントルート下に置く事は推奨されません。
|
||||
</para>
|
||||
</note>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.config.fix.newlines">
|
||||
<title>$config_fix_newlines</title>
|
||||
<para>
|
||||
&true; の場合、mac や dos の改行コード (<literal>'\r'</literal> や
|
||||
<literal>'\r\n'</literal>) が設定ファイルにあると、パース時にそれを
|
||||
<literal>'\n'</literal> に変換します。
|
||||
デフォルトは is &true; です。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.config.overwrite">
|
||||
<title>$config_overwrite</title>
|
||||
<para>
|
||||
&true; の場合、
|
||||
<link linkend="config.files">設定ファイル</link>
|
||||
から読み込んだ変数は互いに上書きされます (デフォルトは &true;)。
|
||||
&false; の場合、変数は配列にプッシュされます。
|
||||
これは各要素を複数回リストするような、
|
||||
設定ファイルのデータの配列を格納したい場合に役立ちます。
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>設定ファイル変数の配列</title>
|
||||
<para>
|
||||
この例では <parameter>$config_overwrite</parameter> = &false; とし、
|
||||
<link linkend="language.function.cycle"><varname>{cycle}</varname></link>
|
||||
でテーブルの行の色を 赤/緑/青 と切り替えています。
|
||||
</para>
|
||||
<para>設定ファイル</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
# row colors
|
||||
rowColors = #FF0000
|
||||
rowColors = #00FF00
|
||||
rowColors = #0000FF
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
<link linkend="language.function.section">
|
||||
<varname>{section}</varname></link> ループを使用したテンプレート
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<table>
|
||||
{section name=r loop=$rows}
|
||||
<tr bgcolor="{cycle values=#rowColors#}">
|
||||
<td> ....何かの内容.... </td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
<link linkend="language.function.config.load"><varname>{config_load}</varname></link>、
|
||||
<link linkend="api.get.config.vars"><varname>get_config_vars()</varname></link>、
|
||||
<link linkend="api.clear.config"><varname>clear_config()</varname></link>、
|
||||
<link linkend="api.config.load"><varname>config_load()</varname></link>
|
||||
および <link linkend="config.files">config files section</link>
|
||||
も参照してください。
|
||||
</para>
|
||||
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.config.read.hidden">
|
||||
<title>$config_read_hidden</title>
|
||||
<para>
|
||||
&true; の場合、<link linkend="config.files">設定ファイル</link>
|
||||
のhiddenセクション(セクション名がピリオドで始まるもの)
|
||||
をテンプレートから読み込むことができます。
|
||||
通常はこれを &false; のままにしておきます。
|
||||
そうすると、設定ファイルにデータベースパラメータのような注意が必要なデータを格納しても、
|
||||
テンプレートがそれらのデータを読み出してしまう心配はありません。デフォルトは &false; です。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
39
docs/ja/programmers/api-variables/variable-debug-tpl.xml
Normal file
39
docs/ja/programmers/api-variables/variable-debug-tpl.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.debug.tpl">
|
||||
<title>$debug_tpl</title>
|
||||
<para>
|
||||
これは、デバッギングコンソールに使用するテンプレートファイルの名前です。
|
||||
デフォルトは <filename>debug.tpl</filename> という名前で、
|
||||
<link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>
|
||||
に位置します。
|
||||
</para>
|
||||
<para>
|
||||
<link linkend="variable.debugging"><parameter>$debugging</parameter></link>
|
||||
および
|
||||
<link linkend="chapter.debugging.console">デバッギングコンソール</link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.debugging.ctrl">
|
||||
<title>$debugging_ctrl</title>
|
||||
<para>
|
||||
デバッギングコンソールを有効にするための $debugging に代わる方法です。
|
||||
<literal>NONE</literal> は、これを無効にする事を意味します。
|
||||
<literal>URL</literal> は、<literal>QUERY_STRING</literal> の中にキーワード
|
||||
<literal>SMARTY_DEBUG</literal> が含まれていた時に
|
||||
デバッギングコンソールが有効になる事を意味します。
|
||||
<link linkend="variable.debugging">
|
||||
<parameter>$debugging</parameter></link> が &true;
|
||||
の場合は、この設定は無視されます。
|
||||
</para>
|
||||
<example>
|
||||
<title>localhost での $debugging_ctrl</title>
|
||||
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
// localhost 上で実行した場合にのみ、
|
||||
// http://localhost/script.php?foo=bar&SMARTY_DEBUG
|
||||
// でデバッグコンソールを表示します
|
||||
$smarty->debugging = false; // デフォルト
|
||||
$smarty->debugging_ctrl = ($_SERVER['SERVER_NAME'] == 'localhost') ? 'URL' : 'NONE';
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
<link linkend="chapter.debugging.console">デバッギングコンソール</link>
|
||||
および
|
||||
<link linkend="variable.debugging"><parameter>$debugging</parameter></link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
49
docs/ja/programmers/api-variables/variable-debugging.xml
Normal file
49
docs/ja/programmers/api-variables/variable-debugging.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.6 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.debugging">
|
||||
<title>$debugging</title>
|
||||
<para>
|
||||
<link
|
||||
linkend="chapter.debugging.console">デバッギングコンソール</link>
|
||||
を有効にします。このコンソールは、現在のスクリプトにおける
|
||||
<link linkend="language.function.include">インクルードされた</link>
|
||||
テンプレートや PHP から <link linkend="api.assign">割り当てられた</link> 変数、
|
||||
<link linkend="language.config.variables">設定ファイルの変数</link>
|
||||
といった情報を javascript のポップアップウィンドウで通知します。
|
||||
<link linkend="language.function.assign"><varname>{assign}</varname>
|
||||
</link> 関数によってテンプレート内で割り当てられた変数は表示されません。
|
||||
</para>
|
||||
<para>このコンソールは、url から
|
||||
<link linkend="variable.debugging.ctrl">
|
||||
<parameter>$debugging_ctrl</parameter></link>
|
||||
を用いることで有効にすることもできます。
|
||||
</para>
|
||||
<para>
|
||||
<link linkend="language.function.debug"><varname>{debug}</varname></link>、
|
||||
<link linkend="variable.debug.tpl"><parameter>$debug_tpl</parameter></link>、
|
||||
および <link linkend="variable.debugging.ctrl"><parameter>$debugging_ctrl</parameter></link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.default.modifiers">
|
||||
<title>$default_modifiers</title>
|
||||
<para>
|
||||
テンプレート内のすべての変数に暗黙に適用される修飾子が格納された配列です。
|
||||
例えば、 デフォルトですべての変数にHTMLエスケープ処理を施したい場合は、
|
||||
<literal>array('escape:"htmlall"')</literal> となります。
|
||||
この影響を受けない変数にするには、{$var|smarty:nodefaults}
|
||||
のように <literal>nodefaults</literal> 修飾子をパラメータに持つ
|
||||
<literal>smarty</literal> 修飾子を指定します。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.2 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.default.resource.type">
|
||||
<title>$default_resource_type</title>
|
||||
<para>
|
||||
これは、暗黙に使用されるリソースの種類を指定します。
|
||||
デフォルトの値は <literal>file</literal> で、
|
||||
これは <literal>$smarty->display('index.tpl')</literal> と
|
||||
<literal>$smarty->display('file:index.tpl')</literal>
|
||||
とが意味的に同じになる、ということです。
|
||||
詳細は、<link linkend="template.resources">リソース</link>
|
||||
の項を参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.default.template.handler.func">
|
||||
<title>$default_template_handler_func</title>
|
||||
<para>
|
||||
リソースからのテンプレートの取得に失敗した場合に、この関数をコールします。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.error.reporting">
|
||||
<title>$error_reporting</title>
|
||||
<para>
|
||||
この値に null でない値がセットされると、その値は
|
||||
<link linkend="api.display"><varname>display()</varname></link> と
|
||||
<link linkend="api.fetch"><varname>fetch()</varname></link> の内側で
|
||||
PHP の <ulink url="&url.php-manual;error_reporting"><varname>error_reporting</varname></ulink>
|
||||
レベルとして使用されます。<link
|
||||
linkend="chapter.debugging.console"><parameter>デバッグ</parameter></link>
|
||||
が有効のときはこの値は無視され、エラーレベルには全く触れられません。
|
||||
</para>
|
||||
<para>
|
||||
<link linkend="api.trigger.error"><varname>trigger_error()</varname></link>、
|
||||
<link linkend="chapter.debugging.console">デバッギングコンソール</link>
|
||||
および
|
||||
<link linkend="troubleshooting">トラブルシューティング</link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
37
docs/ja/programmers/api-variables/variable-force-compile.xml
Normal file
37
docs/ja/programmers/api-variables/variable-force-compile.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.force.compile">
|
||||
<title>$force_compile</title>
|
||||
<para>
|
||||
テンプレートが呼び出される毎に強制的にコンパイル(再コンパイル)を行います。
|
||||
この設定は、<link linkend="variable.compile.check">
|
||||
<parameter>$compile_check</parameter></link> をオーバーライドします。
|
||||
デフォルトの設定では無効になっています。開発や
|
||||
<link linkend="chapter.debugging.console">デバッグ</link> の際に便利ですが、
|
||||
決して運用環境で使用してはいけません。
|
||||
<link linkend="variable.caching"><parameter>$caching</parameter></link>
|
||||
が有効の場合はキャッシュファイルは毎回再生成されます。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.left.delimiter">
|
||||
<title>$left_delimiter</title>
|
||||
<para>
|
||||
これは、テンプレート言語の開始を表すデリミタです。
|
||||
デフォルトは <literal>{</literal> です。
|
||||
</para>
|
||||
<para>
|
||||
<link linkend="variable.right.delimiter"><parameter>$right_delimiter</parameter></link>
|
||||
および
|
||||
<link linkend="language.escaping">Smarty の構文解析を回避</link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
62
docs/ja/programmers/api-variables/variable-php-handling.xml
Normal file
62
docs/ja/programmers/api-variables/variable-php-handling.xml
Normal file
@@ -0,0 +1,62 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.php.handling">
|
||||
<title>$php_handling</title>
|
||||
<para>
|
||||
テンプレートに埋め込まれた PHP コードの扱いを設定します。
|
||||
これには4つの設定があり、デフォルトは
|
||||
<constant>SMARTY_PHP_PASSTHRU</constant> です。
|
||||
テンプレート内の <link linkend="language.function.php">
|
||||
<varname>{php}{/php}</varname></link>
|
||||
タグで囲まれたPHPコードには影響を及ぼさない事に注意して下さい。
|
||||
</para>
|
||||
|
||||
|
||||
<itemizedlist>
|
||||
<listitem><para>
|
||||
<constant>SMARTY_PHP_PASSTHRU</constant> - PHPコードを実行せずにそのまま出力します。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
<constant>SMARTY_PHP_QUOTE</constant> - PHPコードをHTMLエンティティとして表示します。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
<constant>SMARTY_PHP_REMOVE</constant> - PHPコードをテンプレートから除去します。
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>
|
||||
<constant>SMARTY_PHP_ALLOW</constant> - PHPコードを実行します。
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
テンプレート内にPHPコードを埋め込む事は、とにかく避けるべきです。 代わりに、
|
||||
<link linkend="plugins.functions">カスタム関数</link> または
|
||||
<link linkend="plugins.modifiers">修飾子</link> を使用します。
|
||||
</para>
|
||||
</note>
|
||||
</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
|
||||
-->
|
||||
80
docs/ja/programmers/api-variables/variable-plugins-dir.xml
Normal file
80
docs/ja/programmers/api-variables/variable-plugins-dir.xml
Normal file
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.7 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.plugins.dir">
|
||||
<title>$plugins_dir</title>
|
||||
<para>
|
||||
Smartyが必要とするプラグインを置くディレクトリです。デフォルトは
|
||||
<link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>
|
||||
直下の <filename class="directory">plugins/</filename> です。
|
||||
相対パスが指定された場合は、まず最初に
|
||||
<link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>
|
||||
直下を見ます。そこで見つからなかった場合は、
|
||||
次にカレントディレクトリ、PHPのinclude_pathの順で見ていきます。
|
||||
<parameter>$plugins_dir</parameter>
|
||||
がディレクトリ名の配列であった場合、Smarty
|
||||
は各プラグインディレクトリを
|
||||
<emphasis role="bold">与えられた順に</emphasis> 検索します。
|
||||
</para>
|
||||
<note>
|
||||
<title>テクニカルノート</title>
|
||||
<para>
|
||||
パフォーマンスを確保するため、<parameter>$plugins_dir</parameter>
|
||||
には PHP のインクルードパスを使用しないでください。絶対パスを使用するか、
|
||||
<constant>SMARTY_DIR</constant> あるいはカレントディレクトリからの相対パスを使用してください。
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<example>
|
||||
<title>ローカルのプラグインディレクトリの追加</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty->plugins_dir[] = 'includes/my_smarty_plugins';
|
||||
|
||||
?>
|
||||
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<example>
|
||||
<title>複数の $plugins_dir</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$smarty->plugins_dir = array(
|
||||
'plugins', // デフォルトは 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
|
||||
-->
|
||||
@@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.request.use.auto.globals">
|
||||
<title>$request_use_auto_globals</title>
|
||||
<para>
|
||||
Smarty が、PHP の <literal>$HTTP_*_VARS[]</literal>
|
||||
を使用するのか (&false; の場合) あるいは <literal>$_*[]</literal>
|
||||
を使用するのか (&true; の場合) を指定します。デフォルトでは
|
||||
<literal>$_*[]</literal> を使用します。これは、テンプレートで
|
||||
<link linkend="language.variables.smarty">
|
||||
<literal>{$smarty.request.*}, {$smarty.get.*}</literal></link>
|
||||
などを使用する際に影響します。
|
||||
</para>
|
||||
<note>
|
||||
<title>注意</title>
|
||||
<para>
|
||||
<literal>$request_use_auto_globals を true</literal>
|
||||
に設定すると
|
||||
<link linkend="variable.request.vars.order">
|
||||
<parameter>$request_vars_order</parameter></link>
|
||||
はこうかを及ぼさず、PHP の設定値
|
||||
<literal>gpc_order</literal> を使用します。
|
||||
</para>
|
||||
</note>
|
||||
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.request.vars.order">
|
||||
<title>$request_vars_order</title>
|
||||
<para>
|
||||
リクエスト変数が登録される順番です。php.iniのvariables_orderの設定と同様です。
|
||||
</para>
|
||||
<para>
|
||||
<link linkend="language.variables.smarty"><parameter>$smarty.request</parameter></link>
|
||||
および
|
||||
<link linkend="variable.request.use.auto.globals"><parameter>$request_use_auto_globals</parameter></link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.4 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.right.delimiter">
|
||||
<title>$right_delimiter</title>
|
||||
<para>
|
||||
これは、テンプレート言語の終端を表すデリミタです。
|
||||
デフォルトは <literal>}</literal> です。
|
||||
</para>
|
||||
<para>
|
||||
<link linkend="variable.left.delimiter"><parameter>$left_delimiter</parameter></link>
|
||||
および
|
||||
<link linkend="language.escaping">Smarty の構文解析を回避</link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
55
docs/ja/programmers/api-variables/variable-secure-dir.xml
Normal file
55
docs/ja/programmers/api-variables/variable-secure-dir.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.6 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.secure.dir">
|
||||
<title>$secure_dir</title>
|
||||
<para>
|
||||
これは、セキュアであるとみなすローカルファイルやディレクトリを格納する配列です。
|
||||
<link linkend="language.function.include"><varname>{include}</varname></link>
|
||||
および <link linkend="language.function.fetch"><varname>{fetch}</varname></link>
|
||||
は、<link linkend="variable.security"><parameter>$security</parameter></link>
|
||||
が有効な場合にこの設定を使用します。
|
||||
</para>
|
||||
|
||||
|
||||
<example>
|
||||
<title>$secure_dir の例</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$secure_dirs[] = '/path/to/site/root/templates/';
|
||||
$secure_dirs[] = '/path/to/includes/';
|
||||
$smarty->secure_dir = $secure_dirs;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<para>
|
||||
<link linkend="variable.security.settings"><parameter>$security_settings</parameter></link>
|
||||
および <link linkend="variable.trusted.dir"><parameter>$trusted_dir</parameter></link>
|
||||
も参照してください。
|
||||
</para>
|
||||
|
||||
</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
|
||||
-->
|
||||
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.5 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.security.settings">
|
||||
<title>$security_settings</title>
|
||||
<para>
|
||||
<link linkend="variable.security"><parameter>$security</parameter></link>
|
||||
が有効な場合に、これらを使用してセキュリティ設定の指定やオーバーライドを行います。
|
||||
以下のような設定があります。
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>PHP_HANDLING</constant> - boolean。&true; の場合は、セキュリティのための
|
||||
<link linkend="variable.php.handling"><parameter>$php_handling</parameter></link>
|
||||
のチェックを行いません。
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>IF_FUNCS</constant> - 配列。
|
||||
<link linkend="language.function.if"><varname>{if}</varname></link>
|
||||
ステートメントで使用できる PHP 関数の名前を指定します。
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>INCLUDE_ANY</constant> - boolean。&true; の場合は
|
||||
<link linkend="variable.secure.dir"><parameter>$secure_dir</parameter></link>
|
||||
のリストの内容にかかわらず、ファイルシステムからテンプレートを
|
||||
<link linkend="language.function.include">インクルード</link> できます。
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>PHP_TAGS</constant> - boolean。&true; の場合は、
|
||||
テンプレート内で
|
||||
<link linkend="language.function.php"><varname>{php}{/php}</varname></link>
|
||||
タグが使用できるようになります。
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>MODIFIER_FUNCS</constant> - 配列。
|
||||
変数の修飾子として使用できる PHP 関数の名前を指定します。
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<constant>ALLOW_CONSTANTS</constant> - boolean。&true; の場合は、テンプレート内で
|
||||
<link linkend="language.variables.smarty.const"><parameter>{$smarty.const.FOO}</parameter></link>
|
||||
のようにして定数を使用することができます。
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</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
|
||||
-->
|
||||
71
docs/ja/programmers/api-variables/variable-security.xml
Normal file
71
docs/ja/programmers/api-variables/variable-security.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.security">
|
||||
<title>$security</title>
|
||||
<para>
|
||||
<parameter>$security</parameter> は &true; または &false; となり、
|
||||
デフォルトは &false; です。これは、
|
||||
テンプレート言語によってシステムのセキュリティが脆弱になる危険性を減らしたい場合や、
|
||||
(例えばFTPによって) テンプレートを編集するグループにあまり信用がおけない時に最適です。
|
||||
セキュリティを有効にすると、<link linkend="variable.security.settings">
|
||||
<parameter>$security_settings</parameter></link>
|
||||
によってオーバーライドされない限りは次の規則をテンプレート言語へ適用します。
|
||||
</para>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para>If <link linkend="variable.php.handling"><parameter>$php_handling</parameter></link>
|
||||
が <constant>SMARTY_PHP_ALLOW</constant> に設定されていれば、
|
||||
それを暗黙のうちに <constant>SMARTY_PHP_PASSTHRU</constant> に変更します。
|
||||
</para></listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
PHP 関数を <link
|
||||
linkend="language.function.if"><varname>{if}</varname></link>
|
||||
ステートメント内で使用することができません。ただし
|
||||
<link linkend="variable.security.settings"><parameter>$security_settings</parameter></link>
|
||||
で指定されているものは除きます。
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
テンプレートは、
|
||||
<link linkend="variable.secure.dir"><parameter>$secure_dir</parameter></link>
|
||||
配列に格納されているディレクトリからのみ取得できます。
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
ローカルファイルは、
|
||||
<link linkend="variable.secure.dir"><parameter>$secure_dir</parameter></link>
|
||||
配列に格納されているディレクトリから
|
||||
<link linkend="language.function.fetch"><varname>{fetch}</varname></link>
|
||||
を使用することによってのみ取得できます。
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
<link linkend="language.function.php"><varname>{php}{/php}</varname></link> タグは使用できません。
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
PHP 関数を修飾子として使用することはできません。ただし
|
||||
<link linkend="variable.security.settings"><parameter>$security_settings</parameter></link>
|
||||
で指定されているものは除きます。
|
||||
</para></listitem>
|
||||
</itemizedlist>
|
||||
</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
|
||||
-->
|
||||
42
docs/ja/programmers/api-variables/variable-template-dir.xml
Normal file
42
docs/ja/programmers/api-variables/variable-template-dir.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.template.dir">
|
||||
<title>$template_dir</title>
|
||||
<para>
|
||||
これは、デフォルトのテンプレートディレクトリの名前です。
|
||||
ファイルのインクルード時にリソースの種類を指定しなかった場合は、
|
||||
このディレクトリから探します。デフォルトは
|
||||
<filename class="directory">./templates</filename> で、
|
||||
これは、実行しているスクリプトと同じ場所にある
|
||||
<filename class="directory">templates/</filename>
|
||||
ディレクトリを探すということです。
|
||||
</para>
|
||||
<note>
|
||||
<title>テクニカルノート</title>
|
||||
<para>
|
||||
このディレクトリをwebサーバのドキュメントルート下に置く事を推奨しません。
|
||||
</para>
|
||||
</note>
|
||||
</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
|
||||
-->
|
||||
36
docs/ja/programmers/api-variables/variable-trusted-dir.xml
Normal file
36
docs/ja/programmers/api-variables/variable-trusted-dir.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.3 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.trusted.dir">
|
||||
<title>$trusted_dir</title>
|
||||
<para>
|
||||
<parameter>$trusted_dir</parameter> は、
|
||||
<link linkend="variable.security"><parameter>$security</parameter></link>
|
||||
が有効な場合にのみ使用します。これは、
|
||||
信用がおけると考えられる全ディレクトリパスの配列です。
|
||||
信用がおけるディレクトリには、テンプレートから
|
||||
<link linkend="language.function.include.php"><varname>{include_php}</varname></link>
|
||||
によって直接実行される PHP スクリプトを置きます。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
72
docs/ja/programmers/api-variables/variable-use-sub-dirs.xml
Normal file
72
docs/ja/programmers/api-variables/variable-use-sub-dirs.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.7 Maintainer: takagi Status: ready -->
|
||||
<!-- CREDITS: mat-sh,daichi,joe -->
|
||||
<sect1 id="variable.use.sub.dirs">
|
||||
<title>$use_sub_dirs</title>
|
||||
<para>
|
||||
<parameter>$use_sub_dirs</parameter> を &true; に設定すると、
|
||||
Smarty は
|
||||
<link linkend="variable.compile.dir">テンプレートディレクトリ</link> と
|
||||
<link linkend="variable.cache.dir">キャッシュディレクトリ</link>
|
||||
の下にサブディレクトリを作ります。デフォルトは &false; です。
|
||||
何万ものファイルが生成される可能性のある環境では、
|
||||
ファイルシステムの速度低下を抑える助けになります。
|
||||
一方、環境次第では、ディレクトリを生成するためのPHPプロセスが許容されない事があるので、
|
||||
その場合はこの変数を無効にしなければなりません。デフォルトは無効になっています。
|
||||
</para>
|
||||
<para>
|
||||
サブディレクトリは効率がよいので、可能なら使用するとよいでしょう。
|
||||
理論的には、10のディレクトリがそれぞれ100のファイルを持っているほうが、1つのディレクトリに1000
|
||||
のファイルを持っている場合よりも良いパフォーマンスを得られます。
|
||||
少なくとも Solaris 7 (UFS) の場合には確実にそうでした……。
|
||||
ext3 や reiserfs などの最近のファイルシステムでも、そんなに違いはないでしょう。
|
||||
</para>
|
||||
|
||||
<note>
|
||||
<title>テクニカルノート</title>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>$use_sub_dirs=true</literal> は、
|
||||
<ulink url="&url.php-manual;features.safe-mode">safe_mode=On</ulink>
|
||||
の場合は動作しません。safe_mode は切り替え可能で、デフォルトは off です。
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para><literal>$use_sub_dirs=true</literal> は、Windows ではうまく動作しません。</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>Safe_mode は、PHP6 で廃止される予定です。</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</note>
|
||||
|
||||
<para>
|
||||
<link linkend="variable.compile.id"><parameter>$compile_id</parameter></link>、
|
||||
<link linkend="variable.cache.dir"><parameter>$cache_dir</parameter></link>
|
||||
および
|
||||
<link linkend="variable.compile.dir"><parameter>$compile_dir</parameter></link>
|
||||
も参照してください。
|
||||
</para>
|
||||
</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
|
||||
-->
|
||||
|
||||
Reference in New Issue
Block a user