| 148 |
lars |
1 |
Extending Smarty With Plugins {#plugins}
|
|
|
2 |
=============================
|
|
|
3 |
|
|
|
4 |
## Table of contents
|
|
|
5 |
|
|
|
6 |
- [How Plugins Work](./plugins/plugins-howto.md)
|
|
|
7 |
- [Naming Conventions](./plugins/plugins-naming-conventions.md)
|
|
|
8 |
- [Writing Plugins](./plugins/plugins-writing.md)
|
|
|
9 |
- [Template Functions](./plugins/plugins-functions.md)
|
|
|
10 |
- [Modifiers](./plugins/plugins-modifiers.md)
|
|
|
11 |
- [Block Functions](./plugins/plugins-block-functions.md)
|
|
|
12 |
- [Compiler Functions](./plugins/plugins-compiler-functions.md)
|
|
|
13 |
- [Prefilters/Postfilters](./plugins/plugins-prefilters-postfilters.md)
|
|
|
14 |
- [Output Filters](./plugins/plugins-outputfilters.md)
|
|
|
15 |
- [Resources](./plugins/plugins-resources.md)
|
|
|
16 |
- [Inserts](./plugins/plugins-inserts.md)
|
|
|
17 |
|
|
|
18 |
Version 2.0 introduced the plugin architecture that is used for almost
|
|
|
19 |
all the customizable functionality of Smarty. This includes:
|
|
|
20 |
|
|
|
21 |
- functions
|
|
|
22 |
|
|
|
23 |
- modifiers
|
|
|
24 |
|
|
|
25 |
- block functions
|
|
|
26 |
|
|
|
27 |
- compiler functions
|
|
|
28 |
|
|
|
29 |
- prefilters
|
|
|
30 |
|
|
|
31 |
- postfilters
|
|
|
32 |
|
|
|
33 |
- outputfilters
|
|
|
34 |
|
|
|
35 |
- resources
|
|
|
36 |
|
|
|
37 |
- inserts
|
|
|
38 |
|
|
|
39 |
With the exception of resources, backwards compatibility with the old
|
|
|
40 |
way of registering handler functions via register\_\* API is preserved.
|
|
|
41 |
If you did not use the API but instead modified the class variables
|
|
|
42 |
`$custom_funcs`, `$custom_mods`, and other ones directly, then you will
|
|
|
43 |
need to adjust your scripts to either use the API or convert your custom
|
|
|
44 |
functionality into plugins.
|