mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
update version in class, update docs for count_ and new vars
This commit is contained in:
4
FAQ
4
FAQ
@@ -116,3 +116,7 @@ A: There seems to be a problem with some W2k machines and exclusive file
|
||||
locking. Comment out the flock() call in _write_file to get around this,
|
||||
although be aware this could possibly cause a problem with simultaneous
|
||||
writes to a file, especially with caching turned on.
|
||||
|
||||
Q: The template goes into an infinite loop when I include included templates
|
||||
that pass local variables
|
||||
A: This was fixed in 1.3.2 (new global attribute)
|
||||
|
2
NEWS
2
NEWS
@@ -1,3 +1,5 @@
|
||||
Version 1.3.2
|
||||
-------------
|
||||
- fixed a bug that caused some nested includes to loop infinitely. (Andrei)
|
||||
- added optional HTML header to output. (Monte)
|
||||
- significantly improved config_load performance. (Andrei)
|
||||
|
2
README
2
README
@@ -2,7 +2,7 @@ NAME:
|
||||
|
||||
Smarty - the PHP compiling template engine
|
||||
|
||||
VERSION: 1.3.1pl1
|
||||
VERSION: 1.3.2
|
||||
|
||||
AUTHORS:
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
* File: Smarty.addons.php
|
||||
* Author: Monte Ohrt <monte@ispi.net>
|
||||
* Andrei Zmievski <andrei@ispi.net>
|
||||
* Version: 1.3.1pl1
|
||||
* Version: 1.3.2
|
||||
* Copyright: 2001 ispi of Lincoln, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* Author: Monte Ohrt <monte@ispi.net>
|
||||
* Andrei Zmievski <andrei@ispi.net>
|
||||
*
|
||||
* Version: 1.3.1pl1
|
||||
* Version: 1.3.2
|
||||
* Copyright: 2001 ispi of Lincoln, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -108,7 +108,7 @@ class Smarty
|
||||
);
|
||||
|
||||
|
||||
var $version = "1.3.1pl1"; // Smarty version number
|
||||
var $version = "1.3.2"; // Smarty version number
|
||||
var $show_info_header = true; // display info header at top of page output
|
||||
|
||||
// internal vars
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* Author: Monte Ohrt <monte@ispi.net>
|
||||
* Andrei Zmievski <andrei@ispi.net>
|
||||
*
|
||||
* Version: 1.3.1pl1
|
||||
* Version: 1.3.2
|
||||
* Copyright: 2001 ispi of Lincoln, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
104
docs.sgml
104
docs.sgml
@@ -425,6 +425,19 @@ chmod 700 cache
|
||||
Smarty.addons.php.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 id="setting.version">
|
||||
<title>$version</title>
|
||||
<para>
|
||||
Current version of Smarty, used in info header.
|
||||
</para>
|
||||
</sect2>
|
||||
<sect2 id="setting.show.info.header">
|
||||
<title>$show_info_header</title>
|
||||
<para>
|
||||
Shows an HTML comment at the beginning of the templates output,
|
||||
displaying smarty version and date generated. Default is true.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</chapter>
|
||||
<chapter>
|
||||
@@ -2849,12 +2862,99 @@ OUTPUT:
|
||||
<title>capitalize</title>
|
||||
<programlisting>
|
||||
|
||||
{* this displays a variable, unmodified *}
|
||||
{$articleTitle}
|
||||
{$articleTitle|capitalize}
|
||||
|
||||
OUTPUT:
|
||||
|
||||
POLICE BEGIN CAMPAIGN TO RUNDOWN JAYWALKERS
|
||||
Police begin campaign to rundown jaywalkers.
|
||||
Police Begin Campaign To Rundown Jaywalkers.
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>count_characters</title>
|
||||
<para>
|
||||
This is used to count the number of characters in a variable.
|
||||
</para>
|
||||
<example>
|
||||
<title>count_characters</title>
|
||||
<programlisting>
|
||||
|
||||
|
||||
{$articleTitle}
|
||||
{$articleTitle|count_characters}
|
||||
|
||||
OUTPUT:
|
||||
|
||||
Cold Wave Linked to Temperatures
|
||||
32
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>count_paragraphs</title>
|
||||
<para>
|
||||
This is used to count the number of paragraphs in a variable.
|
||||
</para>
|
||||
<example>
|
||||
<title>count_paragraphs</title>
|
||||
<programlisting>
|
||||
|
||||
|
||||
{$articleTitle}
|
||||
{$articleTitle|count_paragraphs}
|
||||
|
||||
OUTPUT:
|
||||
|
||||
War Dims Hope for Peace. Child's Death Ruins Couple's Holiday.
|
||||
|
||||
Man is Fatally Slain. Death Causes Loneliness, Feeling of Isolation.
|
||||
2
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>count_sentences</title>
|
||||
<para>
|
||||
This is used to count the number of sentences in a variable.
|
||||
</para>
|
||||
<example>
|
||||
<title>count_sentences</title>
|
||||
<programlisting>
|
||||
|
||||
|
||||
{$articleTitle}
|
||||
{$articleTitle|count_sentences}
|
||||
|
||||
OUTPUT:
|
||||
|
||||
Two Soviet Ships Collide - One Dies. Enraged Cow Injures Farmer with Axe.
|
||||
2
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect2>
|
||||
<sect2>
|
||||
<title>count_words</title>
|
||||
<para>
|
||||
This is used to count the number of words in a variable.
|
||||
</para>
|
||||
<example>
|
||||
<title>count_words</title>
|
||||
<programlisting>
|
||||
|
||||
|
||||
{$articleTitle}
|
||||
{$articleTitle|count_words}
|
||||
|
||||
OUTPUT:
|
||||
|
||||
Dealers Will Hear Car Talk at Noon.
|
||||
7
|
||||
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* Author: Monte Ohrt <monte@ispi.net>
|
||||
* Andrei Zmievski <andrei@ispi.net>
|
||||
*
|
||||
* Version: 1.3.1pl1
|
||||
* Version: 1.3.2
|
||||
* Copyright: 2001 ispi of Lincoln, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -108,7 +108,7 @@ class Smarty
|
||||
);
|
||||
|
||||
|
||||
var $version = "1.3.1pl1"; // Smarty version number
|
||||
var $version = "1.3.2"; // Smarty version number
|
||||
var $show_info_header = true; // display info header at top of page output
|
||||
|
||||
// internal vars
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* Author: Monte Ohrt <monte@ispi.net>
|
||||
* Andrei Zmievski <andrei@ispi.net>
|
||||
*
|
||||
* Version: 1.3.1pl1
|
||||
* Version: 1.3.2
|
||||
* Copyright: 2001 ispi of Lincoln, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
|
Reference in New Issue
Block a user