Gallery: 模块:customfield:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: =Custom Fields Module= Ability to define and display additional data for albums and items. ==Description== Add your own attributes (e.g. people, location, price, etc.) to albums and dat...)
 
 
(未显示同一用户的2个中间版本)
第1行: 第1行:
=Custom Fields Module=
=自定义字段(Custom Fields)模块=
Ability to define and display additional data for albums and items.
可以定义和显示额外的相册和项目数据。


==Description==
==描述==
Add your own attributes (e.g. people, location, price, etc.) to albums and data items (images, videos, etc). All Gallery 2 items already have fields for ''title'', ''summary'', ''description'', ''keywords'', ''origination date'', ''name'' (folder / file name), ... But if that is not enough, you can add your own attibutes too. E.g. add the Custom Field ''Location'' to your albums and assign a value for that field to all your albums such that visitors of your website can see where these images were taken.
添加你自己的属性至相册和数据项目。所有的Gallery2想已具有''title''''summary''''description''''keywords''''origination date''''name''(文件夹/文件名)字段了。但如嫌不够的话,你也可以添加自己的属性。例如向你的相册添加自定义字段''Location''并为该字段分配一个数值到所有的相册,这样一来,你网站的访问者就能知道这些图片的来历了。


==Features==
==特点==
* Add multiple Custom Fields to albums / items independently
* 单独地向项目/相册添加多个自定义字段。
* Set site-wide default Custom Fields and you can override them for each album
* 设置站点范围的默认自定义字段而且你可以为各相册套用。
* Show the Custom Fields next to each thumbnail in the album view and / or show them as a block in the sidebar, next to the album or in the photo page.
* 在相册视图中各缩略图旁边显示自定义字段并/或将它们作为区块显示在边栏中,相册旁边或相片页面中。
* Search module can search against custom fields (all together, no search yet against a particular field).
* Search模块可以针对自定义字段进行一并搜索,而不能针对单个特殊字段。


==Usage==
==用法==
* Download the module from the download page if necessary. The minimal and typical package of G2 don't include this module.
* 如有必要的话,从下载页面进行模块下载。最小化和典型的G2整合包不包括此模块。
* Install and activate the module in ''site admin'' -> ''plugins''
* ''站点管理(site admin)'' -> ''插件(plugins)''中安装并激活该模块。
* '''Configure which fields should be available'''  
* '''配置可用字段'''  
** Set some default Custom Fields in ''site admin'' -> ''custom fields''
** ''站点管理(site admin)'' -> ''自定义字段(custom fields)''中进行一些默认字段的设定
** Override these defaults in Custom Fields tab for any album (browse to an album, click ''Edit Album'')
** 将这些默认自定义字段在标签中套用给各相册(访问某相册,点击''编辑相册(Edit Album)''
* '''Assign Custom Field values to your albums and items'''
* '''为你的相册和项目分派自定义字段值'''
** Browse to an album or item and click on ''Edit Album'' / ''Edit Photo'' / ''Edit Movie'' depending on what item it is and then click on the ''Custom Fields'' tab. There you can assign values. An example: If you have a Custom Field for ''Location'' you can now add the value ''Washington'' and the visitors of your site will finally see ''Location: Washington'' next to the photo.
** 浏览某个相册或项目并点击''编辑相册(Edit Album)'' / ''编辑相片(Edit Photo)'' / ''编辑视频(Edit Movie)'',这取决于项目本身,接着点击''自定义字段(Custom Fields)''标签。在此你可以进行数值的指派。举例:如果有''Location''的自定义字段,那么现在你就可以添加值''Washington'',然后你站点的访问者就可以看到相片边上的''Location: Washington''
* '''Define what should be shown where'''
* '''定义显示的内容和位置'''
** Fields selected for summary display are shown next to thumbnails.
** 为摘要显示所选取的字段显示在缩略图旁边。
** Fields selected for detail display are included in a block that is made available to themes.
** 为细节显示所选取得字段被包括在外观主题可用的某区块中。
** In ''site admin'' -> ''themes'' -> ''matrix'' (or your active theme) you can define whether you want to show the Custom Field block in the sidebar or / and on album pages / photo pages.
** ''站点管理(site admin)'' -> ''外观主题(themes)'' -> ''matrix''(或你自己的活动外观主题)中,你可以定义是否在边栏中或/和相册页面/相片页面上显示自定义字段。


==Requested Features==
==被请求的特点==
- Ability to edit custom fields on "Edit Captions" page for an album so that multiple photos within an album can be edited without clicking through to each one.
- 可以在"Edit Captions"页面中为某相册编辑自定义字段,如此一来,某相册中的相片不靠挨个的点击就可进行编辑了。


- It's great that one can limit the entry field by creating a dropdown. Now I'd like to add this to the advanced search function. So one can easily filter out all files with these specific atributes. Would this be possible? I dont's know if I should add this request here or at the search module of maybe you guys could work together on this? See also:
- 如果能够通过创建一个下拉列表来限制入口字段的话就好了。我希望能将此特点添加到高级搜索功能之中。这样用户就可以轻松地过滤出带有这些特定属性的文件了。这有可能实现吗?我不知是否该将此请求发表到这里还是发表到search模块的页面上,或许你们能够写作完成此事?另见:
http://sourceforge.net/tracker/index.php?func=detail&aid=1522736&group_id=7130&atid=357130
http://sourceforge.net/tracker/index.php?func=detail&aid=1522736&group_id=7130&atid=357130


- Aligning information of custom fields. Now the information follows the custom field name and you can not present information like in tables.
- 自定义字段的对齐信息。现在信息是跟随自定义字段名称的,而你无法在(比如)表格中呈现信息。


- If the value of a custom field is a URL, make value a hyperlink. Example: If custom field is called 'More Information' and the value of the custom field is 'http://www.alink.com/page.html' then make the text value a hyperlink. An extra option could specify whether to open links in the same or a different window.
- 如果某自定义字段的值为URL,就使其为一个超链接。举例,如果自定义字段名为'More Information',其值为'http://www.alink.com/page.html' 的话,就使文本值为一个超链接。一个额外选项可定义是否在同一个或不同的窗口中打开链接。


- Optionally switch off the "Custom Fields" header or replace it with some other text.
- 可选地关闭"自定义字段"的header或将其替换为其他文本。


==Customization==
==自定义==
- [http://gallery.menalto.com/node/50546 increase custom fields length to be more than 255 characters]
- [http://gallery.menalto.com/node/50546 将自定义字段长度增至多于255个字符]


==Bugs==
==Bug==
Currently there are no known issues for this module.
目前尚无有关该模块的已知问题。


[[Category:Gallery 2:Modules]]
[[Category:Gallery 2:Modules]]

2008年9月12日 (五) 11:21的最新版本

自定义字段(Custom Fields)模块[ ]

可以定义和显示额外的相册和项目数据。

描述[ ]

添加你自己的属性至相册和数据项目。所有的Gallery2想已具有titlesummarydescriptionkeywordsorigination datename(文件夹/文件名)字段了。但如嫌不够的话,你也可以添加自己的属性。例如向你的相册添加自定义字段Location并为该字段分配一个数值到所有的相册,这样一来,你网站的访问者就能知道这些图片的来历了。

特点[ ]

  • 单独地向项目/相册添加多个自定义字段。
  • 设置站点范围的默认自定义字段而且你可以为各相册套用。
  • 在相册视图中各缩略图旁边显示自定义字段并/或将它们作为区块显示在边栏中,相册旁边或相片页面中。
  • Search模块可以针对自定义字段进行一并搜索,而不能针对单个特殊字段。

用法[ ]

  • 如有必要的话,从下载页面进行模块下载。最小化和典型的G2整合包不包括此模块。
  • 站点管理(site admin) -> 插件(plugins)中安装并激活该模块。
  • 配置可用字段
    • 站点管理(site admin) -> 自定义字段(custom fields)中进行一些默认字段的设定
    • 将这些默认自定义字段在标签中套用给各相册(访问某相册,点击编辑相册(Edit Album)
  • 为你的相册和项目分派自定义字段值
    • 浏览某个相册或项目并点击编辑相册(Edit Album) / 编辑相片(Edit Photo) / 编辑视频(Edit Movie),这取决于项目本身,接着点击自定义字段(Custom Fields)标签。在此你可以进行数值的指派。举例:如果有Location的自定义字段,那么现在你就可以添加值Washington,然后你站点的访问者就可以看到相片边上的Location: Washington
  • 定义显示的内容和位置
    • 为摘要显示所选取的字段显示在缩略图旁边。
    • 为细节显示所选取得字段被包括在外观主题可用的某区块中。
    • 站点管理(site admin) -> 外观主题(themes) -> matrix(或你自己的活动外观主题)中,你可以定义是否在边栏中或/和相册页面/相片页面上显示自定义字段。

被请求的特点[ ]

- 可以在"Edit Captions"页面中为某相册编辑自定义字段,如此一来,某相册中的相片不靠挨个的点击就可进行编辑了。

- 如果能够通过创建一个下拉列表来限制入口字段的话就好了。我希望能将此特点添加到高级搜索功能之中。这样用户就可以轻松地过滤出带有这些特定属性的文件了。这有可能实现吗?我不知是否该将此请求发表到这里还是发表到search模块的页面上,或许你们能够写作完成此事?另见: http://sourceforge.net/tracker/index.php?func=detail&aid=1522736&group_id=7130&atid=357130

- 自定义字段的对齐信息。现在信息是跟随自定义字段名称的,而你无法在(比如)表格中呈现信息。

- 如果某自定义字段的值为URL,就使其为一个超链接。举例,如果自定义字段名为'More Information',其值为'http://www.alink.com/page.html' 的话,就使文本值为一个超链接。一个额外选项可定义是否在同一个或不同的窗口中打开链接。

- 可选地关闭"自定义字段"的header或将其替换为其他文本。

自定义[ ]

- 将自定义字段长度增至多于255个字符

Bug[ ]

目前尚无有关该模块的已知问题。