zh:devel:configuration
差别
这里会显示出您选择的修订版和当前版本之间的差别。
后一修订版 | 前一修订版 | ||
zh:devel:configuration [2017-07-20 05:37] – 创建 223.74.133.140 | zh:devel:configuration [2017-07-20 07:41] (当前版本) – [表] 223.74.133.140 | ||
---|---|---|---|
行 34: | 行 34: | ||
---- | ---- | ||
===== 配置元数据 ===== | ===== 配置元数据 ===== | ||
- | For every setting in '' | + | 对于每一个在 |
<code php> | <code php> | ||
$meta[< | $meta[< | ||
</ | </ | ||
- | If no parameter is required for a setting class (see below), it's simply: | + | 如果一个设置类不需要参数(参见下面),那么它就是简单的: |
<code php> | <code php> | ||
行 45: | 行 45: | ||
</ | </ | ||
- | Examples: | + | 例子: |
<code php> | <code php> | ||
行 51: | 行 51: | ||
$meta[' | $meta[' | ||
$meta[' | $meta[' | ||
- | $meta[' | + | $meta[' |
$meta[' | $meta[' | ||
$meta[' | $meta[' | ||
行 58: | 行 58: | ||
==== 类 ==== | ==== 类 ==== | ||
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
==== 参数 ==== | ==== 参数 ==== | ||
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
- | ^ '' | + | ^ '' |
行 94: | 行 93: | ||
=== '' | === '' | ||
- | Let's say initially a plugin uses the syntax: | + | 假设最初插件使用的语法: |
<code php> | <code php> | ||
- | this means the multicheckbox will show four choices plus a string input. | + | 这意味着多复选框将显示四个选项和一个字符串输入。 |
- | Let's suppose also that the user inserts one or more extra values not in '' | + | 假设用户插入一个或多个额外的值,而不是在 |
- | In the next release of the plugin the author' | + | 在插件的下一个版本中,作者的插件决定在没有额外的字符串的情况下使用多复选框,但是为了向后兼容,采用: |
- | <code php> | + | <code php> |
+ | $meta[' | ||
+ | </ | ||
- | which means: | + | 这意味着: |
- | * if the user has inserted comma separated values, they will be printed in the extra string; | + | * 如果用户插入逗号分隔值,则将在额外的字符串中打印; |
- | * otherwise the extra string won't show. | + | * 否则不会显示额外的字符串。 |
- | Note also that if the user inserts comma separated values which already exist (or some of them) in '' | + | 还请注意, |
- | * they are already ticked, then the extra string will be removed and nothing else; | + | * 它们已经被勾选,然后额外的字符串将被删除,其他的都没有; |
- | * they are not already ticked, then the extra string will be removed and the relative value will be ticked. | + | * 它们还没有被勾选,然后额外的字符串将被删除,相对的值将被勾选。 |
\\ | \\ | ||
行 118: | 行 119: | ||
===== 访问设置 ===== | ===== 访问设置 ===== | ||
====核心设置==== | ====核心设置==== | ||
- | Inside | + | 在[[xref> |
- | You can access the core settings anywhere by using the '' | + | 你可以在任何地方访问核心设置通过使用 |
<code php> | <code php> | ||
行 126: | 行 127: | ||
====插件设置==== | ====插件设置==== | ||
- | You can access settings in [[plugins]] | + | 你可以访问设置在 |
- | In your plugin class you use: | + | 在你的插件类中,你使用: |
<code php> | <code php> | ||
$keyvalue = $this-> | $keyvalue = $this-> | ||
行 133: | 行 134: | ||
==== 模板设置==== | ==== 模板设置==== | ||
- | In [[templates]] | + | 在 [[templates|模板]] 你可以使用 |
<code php> | <code php> | ||
$nicetoknow = tpl_getConf(' | $nicetoknow = tpl_getConf(' | ||
行 141: | 行 142: | ||
---- | ---- | ||
===== 标签在配置管理器 ===== | ===== 标签在配置管理器 ===== | ||
- | For every setting in '' | + | 对于'' |
- | You can also create a '' | + | 您还可以创建一个 |
- | Again, this also applies to templates | + | 同样,这也适用于模板 |
zh/devel/configuration.1500521855.txt.gz · 最后更改: 2017-07-20 05:37 由 223.74.133.140