mirror of
https://github.com/smarty-php/smarty.git
synced 2026-05-03 19:30:49 +02:00
Fixed several typos and grammar errors (#821)
This commit is contained in:
@@ -29,7 +29,7 @@ determined by your needs, but use the first method whenever possible to
|
||||
keep template syntax to a minimum.
|
||||
|
||||
If security is enabled, no private methods or functions can be accessed
|
||||
(beginningwith \'\_\'). If a method and property of the same name exist,
|
||||
(beginning with \'\_\'). If a method and property of the same name exist,
|
||||
the method will be used.
|
||||
|
||||
You can restrict the methods and properties that can be accessed by
|
||||
|
||||
@@ -2,7 +2,7 @@ Security {#advanced.features.security}
|
||||
========
|
||||
|
||||
Security is good for situations when you have untrusted parties editing
|
||||
the templates eg via ftp, and you want to reduce the risk of system
|
||||
the templates e.g. via ftp, and you want to reduce the risk of system
|
||||
security compromises through the template language.
|
||||
|
||||
The settings of the security policy are defined by properties of an
|
||||
@@ -10,7 +10,7 @@ instance of the Smarty\_Security class. These are the possible settings:
|
||||
|
||||
- `$secure_dir` is an array of template directories that are
|
||||
considered secure. [`$template_dir`](#variable.template.dir)
|
||||
concidered secure implicitly. The default is an empty array.
|
||||
considered secure implicitly. The default is an empty array.
|
||||
|
||||
- `$trusted_dir` is an array of all directories that are considered
|
||||
trusted. Trusted directories are where you keep php scripts that are
|
||||
@@ -27,7 +27,7 @@ instance of the Smarty\_Security class. These are the possible settings:
|
||||
like authentication-tokens).
|
||||
|
||||
The expression `'#https?://.*smarty.net$#i'` would allow accessing
|
||||
the follwing URIs:
|
||||
the following URIs:
|
||||
|
||||
- `http://smarty.net/foo`
|
||||
|
||||
@@ -140,5 +140,5 @@ Smarty\_Security class or create an instance of it.
|
||||
> **Note**
|
||||
>
|
||||
> Most security policy settings are only checked when the template gets
|
||||
> compiled. For that reasion you should delete all cached and compiled
|
||||
> compiled. For that reason you should delete all cached and compiled
|
||||
> template files when you change your security settings.
|
||||
|
||||
@@ -33,7 +33,7 @@ can override all or some of the parent named block areas.
|
||||
you can define the whole template inheritance tree in the PHP script
|
||||
when you are calling [`fetch()`](#api.fetch) or
|
||||
[`display()`](#api.display) with the `extends:` template resource
|
||||
type. The later provides even more flexibillity.
|
||||
type. The later provides even more flexibility.
|
||||
|
||||
> **Note**
|
||||
>
|
||||
|
||||
@@ -8,7 +8,7 @@ Modifications done to the Smarty object will be global for all
|
||||
templates.
|
||||
|
||||
However the Smarty class variables and functions can be accessed or
|
||||
called by induvidual template objects. Modification done to a template
|
||||
called by individual template objects. Modification done to a template
|
||||
object will apply only for that template and its included subtemplates.
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ the following parameters:
|
||||
variables assigned to any of the objects in it\'s parent chain.
|
||||
|
||||
Data objects are used to create scopes for assigned variables. They can
|
||||
be used to have controll which variables are seen by which templates.
|
||||
be used to control which variables are seen by which templates.
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
@@ -9,7 +9,7 @@ string
|
||||
|
||||
disableSecurity
|
||||
|
||||
This disables securty checking on templates.
|
||||
This disables security checking on templates.
|
||||
|
||||
See also [`enableSecurity()`](#api.enable.security), and
|
||||
[Security](#advanced.features.security).
|
||||
|
||||
@@ -25,7 +25,7 @@ string
|
||||
|
||||
enableSecurity
|
||||
|
||||
This enables securty checking on templates. It uses the following
|
||||
This enables security checking on templates. It uses the following
|
||||
parameters:
|
||||
|
||||
- `securityclass` is an optional parameter. It\'s the name of the
|
||||
|
||||
@@ -16,6 +16,6 @@ given error was produced deliberately and must be ignored, or should be
|
||||
passed on to the next error handler.
|
||||
|
||||
`Smarty::unmuteExpectedErrors()` removes the current error handler.
|
||||
Please note, that if you\'ve registerd any custom error handlers after
|
||||
Please note, that if you\'ve registered any custom error handlers after
|
||||
the muteExpectedErrors() call, the unmute will not remove Smarty\'s
|
||||
muting error handler, but the one registered last.
|
||||
|
||||
@@ -18,7 +18,7 @@ not find a definition for a tag otherwise. It uses the following
|
||||
parameters:
|
||||
|
||||
If during compilation Smarty encounters tag which is not defined
|
||||
internal, registered or loacted in the plugins folder it tries to
|
||||
internal, registered or located in the plugins folder it tries to
|
||||
resolve it by calling the registered default plugin handler. The handler
|
||||
may be called several times for same undefined tag looping over valid
|
||||
plugin types.
|
||||
|
||||
@@ -10,7 +10,7 @@ void
|
||||
testInstall
|
||||
|
||||
This function verifies that all required working folders of the Smarty
|
||||
installation can be accessed. It does output a corresponding protocoll.
|
||||
installation can be accessed. It does output a corresponding protocol.
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
\$compile\_id {#variable.compile.id}
|
||||
=============
|
||||
|
||||
Persistant compile identifier. As an alternative to passing the same
|
||||
Persistent compile identifier. As an alternative to passing the same
|
||||
`$compile_id` to each and every function call, you can set this
|
||||
`$compile_id` and it will be used implicitly thereafter.
|
||||
|
||||
@@ -10,7 +10,7 @@ post-filters](#plugins.prefilters.postfilters) you must use a unique
|
||||
`$compile_id` to keep the compiled template files separated.
|
||||
|
||||
For example a [prefilter](#plugins.prefilters.postfilters) that
|
||||
localizes your templates (that is: translates language dependend parts)
|
||||
localizes your templates (that is: translates language dependent parts)
|
||||
at compile time, then you could use the current language as
|
||||
`$compile_id` and you will get a set of compiled templates for each
|
||||
language you use.
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
==================
|
||||
|
||||
This is maximum time in seconds a cache lock is valid to avoid dead
|
||||
locks. The deafult value is 10 seconds.
|
||||
locks. The default value is 10 seconds.
|
||||
|
||||
See also [`$cache_locking`](#variable.cache.locking)
|
||||
|
||||
@@ -10,7 +10,7 @@ environments do not allow PHP processes to create directories, so this
|
||||
must be disabled which is the default.
|
||||
|
||||
Sub directories are more efficient, so use them if you can.
|
||||
Theoretically you get much better perfomance on a filesystem with 10
|
||||
Theoretically you get much better performance on a filesystem with 10
|
||||
directories each having 100 files, than with 1 directory having 1000
|
||||
files. This was certainly the case with Solaris 7 (UFS)\... with newer
|
||||
filesystems such as ext3 and especially reiserfs, the difference is
|
||||
|
||||
@@ -25,10 +25,10 @@ like.
|
||||
- You CANNOT remove a specified template name under multiple cache
|
||||
groups such as `'/a/b/*/foo.tpl'`, the cache grouping works
|
||||
left-to-right ONLY. You will need to group your templates under a
|
||||
single cache group heirarchy to be able to clear them as a group.
|
||||
single cache group hierarchy to be able to clear them as a group.
|
||||
|
||||
Cache grouping should not be confused with your template directory
|
||||
heirarchy, the cache grouping has no knowledge of how your templates are
|
||||
hierarchy, the cache grouping has no knowledge of how your templates are
|
||||
structured. So for example, if you have a template structure like
|
||||
`themes/blue/index.tpl` and you want to be able to clear all the cache
|
||||
files for the "blue" theme, you will need to create a cache group
|
||||
|
||||
@@ -15,7 +15,7 @@ Smarty recognizes `UTF-8` as the internal charset if
|
||||
> `ISO-8859-1` has been PHP\'s default internal charset since the
|
||||
> beginning. Unicode has been evolving since 1991. Since then it has
|
||||
> become the one charset to conquer them all, as it is capable of
|
||||
> encoding most of the known characters even accross different character
|
||||
> encoding most of the known characters even across different character
|
||||
> systems (latin, cyrillic, japanese, ...). `UTF-8` is unicode\'s most
|
||||
> used encoding, as it allows referencing the thousands of character
|
||||
> with the smallest size overhead possible.
|
||||
|
||||
@@ -3,20 +3,20 @@ Extends Template Resources {#resources.extends}
|
||||
|
||||
The `extends:` resource is used to define child/parent relationships for
|
||||
template inheritance from the PHP script. For details see section of
|
||||
[Template Interitance](#advanced.features.template.inheritance).
|
||||
[Template Inheritance](#advanced.features.template.inheritance).
|
||||
|
||||
As of Smarty 3.1 the `extends:` resource may use any available [template
|
||||
resource](#resources), including `string:` and `eval:`. When [templates
|
||||
from strings](#resources.string) are used, make sure they are properly
|
||||
(url or base64) encoded. Is an `eval:` resource found within an
|
||||
inheritance chain, its \"don\'t save a compile file\" property is
|
||||
superseeded by the `extends:` resource. The templates within an
|
||||
superseded by the `extends:` resource. The templates within an
|
||||
inheritance chain are not compiled separately, though. Only a single
|
||||
compiled template will be generated.
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> Use this when inheritance is required programatically. When inheriting
|
||||
> Use this when inheritance is required programmatically. When inheriting
|
||||
> within PHP, it is not obvious from the child template what inheritance
|
||||
> took place. If you have a choice, it is normally more flexible and
|
||||
> intuitive to handle inheritance chains from within the templates.
|
||||
|
||||
@@ -47,7 +47,7 @@ Templates from a specific \$template\_dir {#templates.from.specified.template.di
|
||||
Smarty 3.1 introduced the bracket-syntax for specifying an element from
|
||||
[`$template_dir`](#variable.template.dir). This allows websites
|
||||
employing multiple sets of templates better control over which template
|
||||
to acces.
|
||||
to access.
|
||||
|
||||
The bracket-syntax can be used from anywhere you can specify the `file:`
|
||||
resource type.
|
||||
|
||||
Reference in New Issue
Block a user