| Smarty - the compiling PHP template engine Smarty - php 模板编译引擎 |
||
|---|---|---|
| 上一篇教材 宏博CMS网站内容管理系统 收集整理 | Chapter 8. Custom Functions[第八章.自定义函数] | 下一篇教材 |
| Attribute Name | Type | Required | Default | Description |
|---|---|---|---|---|
| prefix | string | No | Time_ | what to prefix the var name with |
| time | timestamp | No | current time | what date/time to use |
| display_hours | boolean | No | true | whether or not to display hours |
| display_minutes | boolean | No | true | whether or not to display minutes |
| display_seconds | boolean | No | true | whether or not to display seconds |
| display_meridian | boolean | No | true | whether or not to display meridian (am/pm) |
| use_24_hours | boolean | No | true | whether or not to use 24 hour clock |
| minute_interval | integer | No | 1 | number interval in minute dropdown |
| second_interval | integer | No | 1 | number interval in second dropdown |
| field_array | string | No | n/a | outputs values to array of this name |
| all_extra | string | No | null | adds extra attributes to select/input tags if given |
| hour_extra | string | No | null | adds extra attributes to select/input tags if given |
| minute_extra | string | No | null | adds extra attributes to select/input tags if given |
| second_extra | string | No | null | adds extra attributes to select/input tags if given |
| meridian_extra | string | No | null | adds extra attributes to select/input tags if given |
| 属性 | 类型 | 是否必须 | 缺省值 | 描述 |
|---|---|---|---|---|
| prefix | string | No | Time_ | 变量名称前缀 |
| time | timestamp | No | UNIX时间戳或年-月-日 | 使用时间类型(data/time) |
| display_hours | boolean | No | true | 是否显示小时 |
| display_minutes | boolean | No | true | 是否显示分钟 |
| display_seconds | boolean | No | true | 是否显示秒 |
| display_meridian | boolean | No | true | 是否显示正午界(上午/下午) |
| use_24_hours | boolean | No | true | 是否使用24小时制 |
| minute_interval | integer | No | 1 | 分钟下拉列表的间隔 |
| second_interval | integer | No | 1 | 秒钟下拉列表的间隔 |
| field_array | string | No | n/a | 输出值到该值指定的数组 |
| all_extra | string | No | null | 如果给定,为标签添加附加属性 |
| hour_extra | string | No | null | 如果给定,为标签添加附加属性 |
| minute_extra | string | No | null | 如果给定,为标签添加附加属性 |
| second_extra | string | No | null | 如果给定,为标签添加附加属性 |
| meridian_extra | string | No | null | 如果给定,为标签添加附加属性 |
html_select_time is a custom function that creates time dropdowns for you. It can display any or all of hour, minute, second and meridian.
自定义函数 html_select_time 用于创建时间下拉菜单. 它可以显示任意时分秒.
| 上一篇教材 宏博CMS网站内容管理系统 收集整理 | Smarty中文手册的主目录 | 下一篇教材 |
| html_select_date | 上一篇教材 | html_table |