update .che to .cache

This commit is contained in:
mohrt
2001-02-01 20:08:04 +00:00
parent 72ca37bd83
commit 7976e25b7a
4 changed files with 25 additions and 18 deletions

3
FAQ
View File

@@ -68,9 +68,6 @@ Q: Smarty doesn't work.
A: You must be using PHP 4.0.4pl1 or later to fix all known problems A: You must be using PHP 4.0.4pl1 or later to fix all known problems
Smarty has with PHP. Read the BUGS file for more info. Smarty has with PHP. Read the BUGS file for more info.
Q: Smarty is recompiling my templates on every invocation.
A: This is a bug that was fixed in 1.0a, grab the latest tarball.
Q: I get the following error when running Smarty: Q: I get the following error when running Smarty:
Warning: Wrong parameter count for preg_replace() in Warning: Wrong parameter count for preg_replace() in
Smarty.class.php on line 371 Smarty.class.php on line 371

View File

@@ -266,7 +266,7 @@ class Smarty
while($curr_file = readdir($this->cache_dir)) { while($curr_file = readdir($this->cache_dir)) {
if ($curr_file == '.' || $curr_file == '..') if ($curr_file == '.' || $curr_file == '..')
continue; continue;
if(substr($curr_file,-4) == '.che') if(substr($curr_file,-4) == '.cache')
unlink($curr_file); unlink($curr_file);
} }
} }

View File

@@ -115,8 +115,8 @@
<listitem><para>It is possible to embed PHP code right in your template files, <listitem><para>It is possible to embed PHP code right in your template files,
although this may not be needed (nor recommended) although this may not be needed (nor recommended)
since the engine is so customizable.</para></listitem> since the engine is so customizable.</para></listitem>
</itemizedlist>
<listitem><para>Built-in caching support (new in 1.3.0)</para></listitem> <listitem><para>Built-in caching support (new in 1.3.0)</para></listitem>
</itemizedlist>
</sect1> </sect1>
<sect1> <sect1>
<title>How Smarty works</title> <title>How Smarty works</title>
@@ -888,8 +888,7 @@ Intro = """This is a value that spans more
run into the situation where it is impossible to pass data to a template run into the situation where it is impossible to pass data to a template
before the template is executed because there is info in the template before the template is executed because there is info in the template
needed to aquire the data, kind of a catch 22. The insert tag is a way needed to aquire the data, kind of a catch 22. The insert tag is a way
to callback a function in PHP during runtime of the template. (This is much to callback a function in PHP during runtime of the template.
like the functionality of Server Side Includes in a static html page.)
</para> </para>
<para> <para>
Let's say you have a template with a banner slot at the top of the page. The Let's say you have a template with a banner slot at the top of the page. The
@@ -922,21 +921,26 @@ Intro = """This is a value that spans more
and display the returned results in place of the insert tag. and display the returned results in place of the insert tag.
</para> </para>
<para> <para>
A note on caching: If you have caching turned on, insert tags will A note on caching: If you have <link
not be cached. They will run dynamically every time the page is linkend="setting.caching">caching</link> turned on, insert tags
created. This works good for things like banners, polls, live will not be cached. They will run dynamically every time the page
weather, user feedback areas, etc. is created, even within cached pages. This works good for things
like banners, polls, live weather, search results, user feedback
areas, etc.
</para> </para>
</sect2> </sect2>
<sect2> <sect2>
<title>if,elseif,else</title> <title>if,elseif,else</title>
<para> <para>
if statements in Smarty have much the same flexibility as php if statements, if statements in Smarty have much the same flexibility as php if
with a few added features for the template engine. statements, with a few added features for the template engine.
Every if must be paired with /if. else and elseif are also permitted. Every <emphasis>if</emphasis> must be paired with an
"eq", "ne","neq", "gt", "lt", "lte", "le", "gte" "ge","is even","is odd", <emphasis>/if</emphasis>. <emphasis>else</emphasis> and
"is not even","is not odd","not","mod","div by","even by","odd by","==","!=",">", <emphasis>elseif</emphasis> are also permitted. "eq", "ne","neq",
"<","<=",">=" are all valid conditional qualifiers. "gt", "lt", "lte", "le", "gte" "ge","is even","is odd", "is not
even","is not odd","not","mod","div by","even by","odd
by","==","!=",">", "<","<=",">=" are all valid conditional
qualifiers.
</para> </para>
<example> <example>
<title>if statements</title> <title>if statements</title>
@@ -955,6 +959,12 @@ Intro = """This is a value that spans more
... ...
{/if} {/if}
{* same as above *}
{if $name == "Fred" || $name == "Wilma"}
...
{/if}
{* parenthesis are allowed *} {* parenthesis are allowed *}
{if ( $amount < 0 or $amount > 1000 ) and $volume >= #minVolAmt#} {if ( $amount < 0 or $amount > 1000 ) and $volume >= #minVolAmt#}
... ...

View File

@@ -266,7 +266,7 @@ class Smarty
while($curr_file = readdir($this->cache_dir)) { while($curr_file = readdir($this->cache_dir)) {
if ($curr_file == '.' || $curr_file == '..') if ($curr_file == '.' || $curr_file == '..')
continue; continue;
if(substr($curr_file,-4) == '.che') if(substr($curr_file,-4) == '.cache')
unlink($curr_file); unlink($curr_file);
} }
} }