Gallery: 主题:参考:区块:修订间差异
来自站长百科
Firebrance(讨论 | 贡献) (→Usage) |
Firebrance(讨论 | 贡献) (→区块) |
||
(未显示同一用户的2个中间版本) | |||
第1行: | 第1行: | ||
模块提供的区块能够放置到Gallery布局中的任意位置。想想[http://en.wikipedia.org/wiki/Lego 乐高(Lego)]砖吧,通过任意布置区块,你可以创建自己的布局样式。 | |||
==用法== | ==用法== | ||
第7行: | 第7行: | ||
* 使用中的'''g->block'''例子可以在Gallery附带的模板源代码中找到,例如在[http://svn.sourceforge.net/viewcvs.cgi/gallery/trunk/gallery2/themes/floatrix/templates/album.tpl?annotate=13913#l9 Floatrix外观主题]中 | * 使用中的'''g->block'''例子可以在Gallery附带的模板源代码中找到,例如在[http://svn.sourceforge.net/viewcvs.cgi/gallery/trunk/gallery2/themes/floatrix/templates/album.tpl?annotate=13913#l9 Floatrix外观主题]中 | ||
== | ==区块== | ||
* '''albumselect.AlbumSelect''' | * '''albumselect.AlbumSelect''' | ||
** | ** 在选择框中显示相册列表 | ||
* '''albumselect.AlbumTree''' | * '''albumselect.AlbumTree''' | ||
** | ** 在动态树型结构中显示相册列表 | ||
* '''cart.ShowCart''' | * '''cart.ShowCart''' | ||
** | ** 带有cart内容摘要信息的区块,以及一个链接供查看cart之用 | ||
* '''comment.ViewComments''' [item=..] [show=..] | * '''comment.ViewComments''' [item=..] [show=..] | ||
** | ** 显示特定项目指定数量的最新评论的区块 | ||
** | ** 项目默认为$theme.item;显示默认为3 | ||
* '''comment.AddComment''' [item=..] | * '''comment.AddComment''' [item=..] | ||
** | ** 显示添加评论表单的区块 | ||
** Item defaults to $theme.item | ** Item defaults to $theme.item | ||
* '''core.BreadCrumb''' [separator=..] | * '''core.BreadCrumb''' [separator=..] | ||
** | ** 显示上级相册的链接 | ||
** | ** 数据必须事先通过loadCommonTemplateData的'parents'键被载入 | ||
** | ** 可选的分隔字串被置于各相册名称之间 | ||
* '''core.EmergencyEditItemLink''' [permissions=..] [checkBlocks=..] | * '''core.EmergencyEditItemLink''' [permissions=..] [checkBlocks=..] | ||
** | ** 如core.ItemLinks区块在特定区块列表中没有被找到的话,则会显示"编辑(Edit)"链接,用户可以编辑当前项目 | ||
** | ** 权限默认为$theme.permissions | ||
** | ** 旧的checkSidebarBlocks/checkAlbumBlocks/checkPhotoBlocks参量被弃用;取而代之地使用类似checkBlocks="sidebar,album"的参量 | ||
* '''core.GuestPreview''' | * '''core.GuestPreview''' | ||
** | ** 显示给已注册用户区块以选择游客预览模式 | ||
* '''core.ItemInfo''' [item=..] [showDate=true] [showOwner=true] [showSize=true] [showViewCount=true] [showSummaries=true] | * '''core.ItemInfo''' [item=..] [showDate=true] [showOwner=true] [showSize=true] [showViewCount=true] [showSummaries=true] | ||
** | ** 用以显示给定项目特定数据的区块 | ||
** | ** showSummaries显示所有可用的项目摘要信息,如项目关键词,评论计数以及评分界面等。 | ||
* '''core.ItemLinks''' [item=..] [links=..] [useDropdown=..] [lowercase=..] | * '''core.ItemLinks''' [item=..] [links=..] [useDropdown=..] [lowercase=..] | ||
** | ** 项目默认为$theme.item;链接默认为$theme.itemLinks(通过loadCommonTemplateData载入) | ||
** | ** 如useDropdown=true那么就在一个选择列表中显示多个链接<br> 如果为false或仅有一个链接则显示所有的链接 | ||
** | ** 添加lowercase=true参量来讲所有链接文本转换为小写 | ||
* '''core.LanguageSelector''' | * '''core.LanguageSelector''' | ||
** | ** 显示可以语言选择列表以供用户修改语言 | ||
* '''core.LoginBlock''' | * '''core.LoginBlock''' | ||
** | ** 如果用户为游客身份则显示登入表单 | ||
* '''core.NavigationLinks''' [navigationLinks=..] | * '''core.NavigationLinks''' [navigationLinks=..] | ||
** | ** 稍前位置的链接(返回相片等) | ||
** ''' | ** '''注:''' 在Gallery2.3中被移除了。该模块仅存于Gallery 2.0到2.2版本中。 | ||
* '''core.Navigator''' [navigator=..] [reverseOrder=..] [prefix=..] [suffix=..] [currentPage=..] [totalPages=..] [currentItem=..] [totalItems=..] | * '''core.Navigator''' [navigator=..] [reverseOrder=..] [prefix=..] [suffix=..] [currentPage=..] [totalPages=..] [currentItem=..] [totalItems=..] | ||
** | **为loadCommonTemplateData使用itemNavigator或pageNavigator键,并传送navigator=$theme.navigator | ||
** | ** 设置reverseOrder=true来交换下一个/上一个以及第一个/前一个部分的次序(如css浮点被用于显示中则很有用) | ||
** Prefix = | ** Prefix = text置于第一个/前一个链接之前;Suffix = text置于下一个/上一个链接之后 | ||
** | ** 包括currentPage/totalPages在导航链接中添加x/y页(Page x of y)(常自$theme.currentPage和$theme.totalPages取值)。 | ||
** | ** 包括currentItem/totalItems 在导航链接中添加x/y(x of y )(可使用core.LoadPeers callback来取值)。 | ||
* '''core.Pager''' | * '''core.Pager''' | ||
** | ** 具有当前页数及至其他页面链接的区块 | ||
** | ** 数据必须已通过loadCommonTemplateData的'jumpRange'键被载入 | ||
* '''core.PeerList''' [item=..] [windowSize=..] | * '''core.PeerList''' [item=..] [windowSize=..] | ||
** | ** 某些peer项目的链接;项目默认为$theme.item而windowSize默认为7 | ||
* '''core.PhotoSizes''' | * '''core.PhotoSizes''' | ||
** | ** 显示图片尺寸及查看各尺寸链接的区块 | ||
** | **数据必须已通过loadCommonTemplateData的'imageViews'键被载入 | ||
* '''core.SystemLink''' [linkId=..] | * '''core.SystemLink''' [linkId=..] | ||
** | ** 如给定的linkId通过loadCommonTemplateData的'systemLinks'键被载入的话,则显示对应的链接 | ||
* '''core.SystemLinks''' [order=..] [othersAt=..] [separator=..] | * '''core.SystemLinks''' [order=..] [othersAt=..] [separator=..] | ||
** | ** 显示所有系统链接;数据必须已通过loadCommonTemplateData的'systemLinks'键被载入 | ||
** | ** Order为由空格隔开的已知链接id的列表以给出需要显示的order链接 | ||
** | ** OthersAt为"order"值中未被给出的所有链接的位置(其中1 = 第一个) | ||
** | ** 分隔符为各链接之后所包括的字串 | ||
* '''core.ThemeSettingsForm''' [formId=..] [message=..] | * '''core.ThemeSettingsForm''' [formId=..] [message=..] | ||
* '''customfield.CustomFields''' [item=..] | * '''customfield.CustomFields''' [item=..] | ||
** | ** 为给定项目显示'细节(detail)'自定义字段(默认为$theme.item) | ||
* '''exif.ExifInfo''' [item=..] | * '''exif.ExifInfo''' [item=..] | ||
** | **为给定项目显示带有控制以选择摘要或是详细视图的EXIF数据(默认为$theme.item) | ||
* '''imageblock.ImageBlock''' [parameters..] | * '''imageblock.ImageBlock''' [parameters..] | ||
** | ** 图片区块(Image block);见站点管理(Site Admin) -> 图片区块(Image Block)来获取可用参量列表(如使用blocks= 取代g2_blocks=) | ||
** | ** 举例:{g->block type="imageblock.ImageBlock" blocks="randomAlbum|randomImage" showDate=0 showOwner=1 showViews=1 showTitle=1 showHeading=0 useDefaults=0} | ||
** | ** 如果你希望覆盖站点管理(Site Admin) -> 图片区块(Image Block)中设定的站点默认的话,那么就需要useDefaults=0 | ||
** repeatBlock=.. | ** repeatBlock=.. 将会重复给定区块参量相应的次数(例如,blocks=recentImage|recentImage与blocks=recentImage repeatBlock=2的效果是一样的) | ||
* '''imageframe.ImageFrame''' (container) [frame=..] [width=..] [height=..] [maxSize=..] | * '''imageframe.ImageFrame''' (container) [frame=..] [width=..] [height=..] [maxSize=..] | ||
** | ** 在该容器中对内容周围的指定边框类型进行渲染 | ||
** | ** 内容中的图片在其类别属性中应具有%CLASS%以及%ID% 作为其id | ||
** | ** ImageFrame的定义必须经使用imageframe的模块/外观主题的imageframe->init()呼叫被载入过了 | ||
** | ** 提供宽/高来生成固定尺寸的imageframe (大多浏览器都可兼容)。可选地添加maxSize参量来调整给定规格尺寸以符合要求(见g->image)。 | ||
** | ** 忽略宽/高以生成根据自身内容动态调整尺寸的imageframe,这在页面读取后内容尺寸改变(通过javascript)时仍如此。然而,此类imageframe在Opera或Safari浏览器中可能无法正确地进行渲染。 | ||
* '''keyalbum.KeywordLinks''' [forItem=..] [item=..] [onlyPublic=..] [showCloud=..] [maxCloudFontEnlargement=..] | * '''keyalbum.KeywordLinks''' [forItem=..] [item=..] [onlyPublic=..] [showCloud=..] [maxCloudFontEnlargement=..] | ||
** | ** 显示关键词相册(Keyword Albums)的链接 | ||
** | ** 如forItem为true(默认为true)则显示给定项目关键词的链接简化列表(项目默认为$theme.item) | ||
** | ** 如forItem为false则载入所有关键词(onlyPublic默认为true;载入公共项目或所有项目的关键词)并显示一选择列表或关键词云(keyword cloud)(showCloud默认为false) | ||
** | ** maxCloudFontEnlargement为最常见关键词字体尺寸的像素值,默认为5 | ||
* '''members.MembersSummary''' | * '''members.MembersSummary''' | ||
** | ** 具有成员数及成员列表链接的区块(如用户可进行访问的话) | ||
* '''quotas.QuotasSummary''' | * '''quotas.QuotasSummary''' | ||
** | ** 显示当前用户的磁盘用量及分区 | ||
* '''rating.Rating''' [item=..] | * '''rating.Rating''' [item=..] | ||
** | ** 为给定项目显示评分界面(默认为$theme.item) | ||
* '''rss.RssBlock''' | * '''rss.RssBlock''' | ||
** | ** 显示RSS feed的链接 | ||
* '''search.SearchBlock''' [showAdvancedLink=..] | * '''search.SearchBlock''' [showAdvancedLink=..] | ||
** | ** 带有供搜索Gallery之用的文本输入的区块 | ||
** | ** 除非特别指定,均显示高级搜索链接(showAdvancedLink默认为true) | ||
==模板位置== | |||
各区块的模板都位于一标准位置中,我们以''cart.ShowCart''为例。模板位于: | |||
modules/''cart''/templates/blocks/''ShowCart''.tpl | modules/''cart''/templates/blocks/''ShowCart''.tpl | ||
如果你发现有参量可能存在但未被记录的话,请查看模板来确定该参量实际是否存在于模板中,如存在的话,就可以在载入区块时使用它了。 | |||
== | == Block参量== | ||
* | * 需要字段:description,type,default | ||
* | * 可选字段:overrides | ||
* | * 被允许的类型:boolean,choice,text | ||
=== | === Text参量=== | ||
* | *允许值:所有文本 | ||
* | * 举例(文本在此用作任意数字的容器): | ||
<pre> | <pre> | ||
'sizeLimit' => array( | 'sizeLimit' => array( | ||
'description' => $gallery->i18n(' | 'description' => $gallery->i18n('关键词的最大数量(为空的话则表示无限制)'), | ||
'type' => 'text', | 'type' => 'text', | ||
'default' => ''), | 'default' => ''), | ||
</pre> | </pre> | ||
=== | === Boolean参量=== | ||
* | *允许值: 'true', 'false' | ||
* | *举例: | ||
<pre> | <pre> | ||
'onlyPublic' => array( | 'onlyPublic' => array( | ||
'description' => $gallery->i18n(' | 'description' => $gallery->i18n('仅来自公共项目的关键词'), | ||
'type' => 'boolean', | 'type' => 'boolean', | ||
'default' => 'true'), | 'default' => 'true'), | ||
</pre> | </pre> | ||
=== | === Choice参量=== | ||
* | * 允许值:所有文本 | ||
* | * 举例: | ||
<pre> | <pre> | ||
'show' => array( | 'show' => array( | ||
'description' => $gallery->i18n(' | 'description' => $gallery->i18n('评论数量'), | ||
'type' => 'choice', | 'type' => 'choice', | ||
'default' => '2', | 'default' => '2', | ||
'choices' => array( | 'choices' => array( | ||
'1' => $gallery->i18n(' | '1' => $gallery->i18n('1条评论'), | ||
'2' => $gallery->i18n(' | '2' => $gallery->i18n('2条评论'), | ||
'5' => $gallery->i18n(' | '5' => $gallery->i18n('5条评论'), | ||
'10' => $gallery->i18n(' | '10' => $gallery->i18n('10条评论'), | ||
'100' => $gallery->i18n(' | '100' => $gallery->i18n('100条评论'))))), | ||
</pre> | </pre> | ||
注:Choice的数组键为被传送到区块的数值。数组值作为外观主题设定中的一个choice以文本形式显示给用户(比如在''站点管理(Site Admin)'' -> ''外观主题(Themes)''中)。 | |||
=== Overrides === | === Overrides === | ||
* | * 一个参量可以覆盖其他的参量。如果覆盖是特定的,那么被列出的参量默认会变灰(即不可用)。被覆盖的参量仅当主参量为'false'时才可被编辑(unchecked checkfield)。 | ||
* Example: | * Example: | ||
<pre> | <pre> | ||
'forItem' => array( | 'forItem' => array( | ||
'description' => | 'description' => | ||
$gallery->i18n(' | $gallery->i18n('当前项目的关键词(uncheck以显示所有关键词)'), | ||
'type' => 'boolean', | 'type' => 'boolean', | ||
'default' => 'true', | 'default' => 'true', | ||
'overrides' => array('onlyPublic', 'sizeLimit')), | 'overrides' => array('onlyPublic', 'sizeLimit')), | ||
'onlyPublic' => array( | 'onlyPublic' => array( | ||
'description' => $gallery->i18n(' | 'description' => $gallery->i18n('仅来自公共项目的关键词'), | ||
'type' => 'boolean', | 'type' => 'boolean', | ||
'default' => 'true'), | 'default' => 'true'), | ||
'sizeLimit' => array( | 'sizeLimit' => array( | ||
'description' => $gallery->i18n(' | 'description' => $gallery->i18n('关键词的最大数量(为空的话则表示无限制)'), | ||
'type' => 'text', | 'type' => 'text', | ||
'default' => ''), | 'default' => ''), | ||
</pre> | </pre> | ||
注:在此例中,用户需要点击"forItem"复选框以启用其他的参量字段。 | |||
== | == 新区块的创建== | ||
参看[[Gallery:How_To_Create_Blocks|如何创建区块]] | |||
[[Category:Gallery 2:Development]] | [[Category:Gallery 2:Development]] |
2008年11月4日 (二) 17:01的最新版本
模块提供的区块能够放置到Gallery布局中的任意位置。想想乐高(Lego)砖吧,通过任意布置区块,你可以创建自己的布局样式。
用法[ ]
用法:{g->block type=blockType [block-specific parameters]}
- g->block在模板中插入Gallery区块。这与通过站点管理界面所配置的相册,相片一类的区块相似
- 使用中的g->block例子可以在Gallery附带的模板源代码中找到,例如在Floatrix外观主题中
区块[ ]
- albumselect.AlbumSelect
- 在选择框中显示相册列表
- albumselect.AlbumTree
- 在动态树型结构中显示相册列表
- cart.ShowCart
- 带有cart内容摘要信息的区块,以及一个链接供查看cart之用
- comment.ViewComments [item=..] [show=..]
- 显示特定项目指定数量的最新评论的区块
- 项目默认为$theme.item;显示默认为3
- comment.AddComment [item=..]
- 显示添加评论表单的区块
- Item defaults to $theme.item
- core.BreadCrumb [separator=..]
- 显示上级相册的链接
- 数据必须事先通过loadCommonTemplateData的'parents'键被载入
- 可选的分隔字串被置于各相册名称之间
- core.EmergencyEditItemLink [permissions=..] [checkBlocks=..]
- 如core.ItemLinks区块在特定区块列表中没有被找到的话,则会显示"编辑(Edit)"链接,用户可以编辑当前项目
- 权限默认为$theme.permissions
- 旧的checkSidebarBlocks/checkAlbumBlocks/checkPhotoBlocks参量被弃用;取而代之地使用类似checkBlocks="sidebar,album"的参量
- core.GuestPreview
- 显示给已注册用户区块以选择游客预览模式
- core.ItemInfo [item=..] [showDate=true] [showOwner=true] [showSize=true] [showViewCount=true] [showSummaries=true]
- 用以显示给定项目特定数据的区块
- showSummaries显示所有可用的项目摘要信息,如项目关键词,评论计数以及评分界面等。
- core.ItemLinks [item=..] [links=..] [useDropdown=..] [lowercase=..]
- 项目默认为$theme.item;链接默认为$theme.itemLinks(通过loadCommonTemplateData载入)
- 如useDropdown=true那么就在一个选择列表中显示多个链接
如果为false或仅有一个链接则显示所有的链接 - 添加lowercase=true参量来讲所有链接文本转换为小写
- core.LanguageSelector
- 显示可以语言选择列表以供用户修改语言
- core.LoginBlock
- 如果用户为游客身份则显示登入表单
- core.NavigationLinks [navigationLinks=..]
- 稍前位置的链接(返回相片等)
- 注: 在Gallery2.3中被移除了。该模块仅存于Gallery 2.0到2.2版本中。
- core.Navigator [navigator=..] [reverseOrder=..] [prefix=..] [suffix=..] [currentPage=..] [totalPages=..] [currentItem=..] [totalItems=..]
- 为loadCommonTemplateData使用itemNavigator或pageNavigator键,并传送navigator=$theme.navigator
- 设置reverseOrder=true来交换下一个/上一个以及第一个/前一个部分的次序(如css浮点被用于显示中则很有用)
- Prefix = text置于第一个/前一个链接之前;Suffix = text置于下一个/上一个链接之后
- 包括currentPage/totalPages在导航链接中添加x/y页(Page x of y)(常自$theme.currentPage和$theme.totalPages取值)。
- 包括currentItem/totalItems 在导航链接中添加x/y(x of y )(可使用core.LoadPeers callback来取值)。
- core.Pager
- 具有当前页数及至其他页面链接的区块
- 数据必须已通过loadCommonTemplateData的'jumpRange'键被载入
- core.PeerList [item=..] [windowSize=..]
- 某些peer项目的链接;项目默认为$theme.item而windowSize默认为7
- core.PhotoSizes
- 显示图片尺寸及查看各尺寸链接的区块
- 数据必须已通过loadCommonTemplateData的'imageViews'键被载入
- core.SystemLink [linkId=..]
- 如给定的linkId通过loadCommonTemplateData的'systemLinks'键被载入的话,则显示对应的链接
- core.SystemLinks [order=..] [othersAt=..] [separator=..]
- 显示所有系统链接;数据必须已通过loadCommonTemplateData的'systemLinks'键被载入
- Order为由空格隔开的已知链接id的列表以给出需要显示的order链接
- OthersAt为"order"值中未被给出的所有链接的位置(其中1 = 第一个)
- 分隔符为各链接之后所包括的字串
- core.ThemeSettingsForm [formId=..] [message=..]
- customfield.CustomFields [item=..]
- 为给定项目显示'细节(detail)'自定义字段(默认为$theme.item)
- exif.ExifInfo [item=..]
- 为给定项目显示带有控制以选择摘要或是详细视图的EXIF数据(默认为$theme.item)
- imageblock.ImageBlock [parameters..]
- 图片区块(Image block);见站点管理(Site Admin) -> 图片区块(Image Block)来获取可用参量列表(如使用blocks= 取代g2_blocks=)
- 举例:{g->block type="imageblock.ImageBlock" blocks="randomAlbum|randomImage" showDate=0 showOwner=1 showViews=1 showTitle=1 showHeading=0 useDefaults=0}
- 如果你希望覆盖站点管理(Site Admin) -> 图片区块(Image Block)中设定的站点默认的话,那么就需要useDefaults=0
- repeatBlock=.. 将会重复给定区块参量相应的次数(例如,blocks=recentImage|recentImage与blocks=recentImage repeatBlock=2的效果是一样的)
- imageframe.ImageFrame (container) [frame=..] [width=..] [height=..] [maxSize=..]
- 在该容器中对内容周围的指定边框类型进行渲染
- 内容中的图片在其类别属性中应具有%CLASS%以及%ID% 作为其id
- ImageFrame的定义必须经使用imageframe的模块/外观主题的imageframe->init()呼叫被载入过了
- 提供宽/高来生成固定尺寸的imageframe (大多浏览器都可兼容)。可选地添加maxSize参量来调整给定规格尺寸以符合要求(见g->image)。
- 忽略宽/高以生成根据自身内容动态调整尺寸的imageframe,这在页面读取后内容尺寸改变(通过javascript)时仍如此。然而,此类imageframe在Opera或Safari浏览器中可能无法正确地进行渲染。
- keyalbum.KeywordLinks [forItem=..] [item=..] [onlyPublic=..] [showCloud=..] [maxCloudFontEnlargement=..]
- 显示关键词相册(Keyword Albums)的链接
- 如forItem为true(默认为true)则显示给定项目关键词的链接简化列表(项目默认为$theme.item)
- 如forItem为false则载入所有关键词(onlyPublic默认为true;载入公共项目或所有项目的关键词)并显示一选择列表或关键词云(keyword cloud)(showCloud默认为false)
- maxCloudFontEnlargement为最常见关键词字体尺寸的像素值,默认为5
- members.MembersSummary
- 具有成员数及成员列表链接的区块(如用户可进行访问的话)
- quotas.QuotasSummary
- 显示当前用户的磁盘用量及分区
- rating.Rating [item=..]
- 为给定项目显示评分界面(默认为$theme.item)
- rss.RssBlock
- 显示RSS feed的链接
- search.SearchBlock [showAdvancedLink=..]
- 带有供搜索Gallery之用的文本输入的区块
- 除非特别指定,均显示高级搜索链接(showAdvancedLink默认为true)
模板位置[ ]
各区块的模板都位于一标准位置中,我们以cart.ShowCart为例。模板位于:
modules/cart/templates/blocks/ShowCart.tpl
如果你发现有参量可能存在但未被记录的话,请查看模板来确定该参量实际是否存在于模板中,如存在的话,就可以在载入区块时使用它了。
Block参量[ ]
- 需要字段:description,type,default
- 可选字段:overrides
- 被允许的类型:boolean,choice,text
Text参量[ ]
- 允许值:所有文本
- 举例(文本在此用作任意数字的容器):
'sizeLimit' => array( 'description' => $gallery->i18n('关键词的最大数量(为空的话则表示无限制)'), 'type' => 'text', 'default' => ''),
Boolean参量[ ]
- 允许值: 'true', 'false'
- 举例:
'onlyPublic' => array( 'description' => $gallery->i18n('仅来自公共项目的关键词'), 'type' => 'boolean', 'default' => 'true'),
Choice参量[ ]
- 允许值:所有文本
- 举例:
'show' => array( 'description' => $gallery->i18n('评论数量'), 'type' => 'choice', 'default' => '2', 'choices' => array( '1' => $gallery->i18n('1条评论'), '2' => $gallery->i18n('2条评论'), '5' => $gallery->i18n('5条评论'), '10' => $gallery->i18n('10条评论'), '100' => $gallery->i18n('100条评论'))))),
注:Choice的数组键为被传送到区块的数值。数组值作为外观主题设定中的一个choice以文本形式显示给用户(比如在站点管理(Site Admin) -> 外观主题(Themes)中)。
Overrides[ ]
- 一个参量可以覆盖其他的参量。如果覆盖是特定的,那么被列出的参量默认会变灰(即不可用)。被覆盖的参量仅当主参量为'false'时才可被编辑(unchecked checkfield)。
- Example:
'forItem' => array( 'description' => $gallery->i18n('当前项目的关键词(uncheck以显示所有关键词)'), 'type' => 'boolean', 'default' => 'true', 'overrides' => array('onlyPublic', 'sizeLimit')), 'onlyPublic' => array( 'description' => $gallery->i18n('仅来自公共项目的关键词'), 'type' => 'boolean', 'default' => 'true'), 'sizeLimit' => array( 'description' => $gallery->i18n('关键词的最大数量(为空的话则表示无限制)'), 'type' => 'text', 'default' => ''),
注:在此例中,用户需要点击"forItem"复选框以启用其他的参量字段。
新区块的创建[ ]
参看如何创建区块