Gallery: 模块:评价(rating):修订间差异

来自站长百科
跳转至: 导航、​ 搜索
无编辑摘要
第1行: 第1行:
== Introduction ==
== 介绍 ==
The Gallery2 rating module was added in Gallery 2.1.
Gallery2评价/评分(rating)模块是在Gallery2.1中添加进来的。
It was written by [http://seiler.us Don Seiler (rizzo)], with much help from valiant, mindless and bharat.
其编写者是[http://seiler.us Don Seiler (rizzo)],以及valiant,mindless和bharat的大力协助。


== Features ==
== 特点 ==


Gallery 2.2 adds a dynamic album view to show highly rated items from across the Gallery.  Configure the theme, theme settings and sort order for this view in Site Admin.
Gallery 2.2添加了一个动态相册视图用以显示Gallery中获得较高评价的项目。在站点管理中可为此视图配置外观主题,外观主题设定以及分类次序。


=== User Interface ===
=== 用户界面 ===


The Gallery2 rating module uses a 5-star interface for both user selection and average rating display.  The default theme will use gold stars to represent the user's choice, and red outlines of stars to indicate the current average rating for that item.
Gallery2评价模块使用一个5星界面,该界面用于用户评分的选取以及平均评分的显示。默认的外观主题使用金色的星星来代表用户的选择,而带红色边框的星星则用于表示该项目的当前平均分。


The module was designed with themability in mind, so theme developers should have some flexibility in changing images and can also make use of a horizontal bar to display the average.  The bar is hidden by default.
该模块具有外观主题可定制性。因此外观主题开发者应该能修改图片而且可以使用水平评分条。该评分条默认是隐藏的。


==== AJAX ====
==== AJAX ====


The star UI uses the latest in internet technology buzzwords, AJAX!  What this means for the average user is that submitting a rating and updating of the rating display will happen without the page reloading.  Javascript and behind-the-scenes HTTP calls will do the work and update the page.
星形UI使用的是最新的internet科技中的流行词,那就是AJAX!对于一般用户来说,这意味着无需进行页面重载入就可以提交评分以及评分显示的更新。Javascript以及后台HTTP呼叫将做此项工作并更新页面。


=== Permissions ===
=== 权限 ===


The Gallery2 rating module makes full use of Gallery2's permissions system, and so a site admin can restrict adding and even viewing of item ratings to certain groups of users.  A quick example would be to let Everyone view ratings, but only allow Registered Users to add ratings.
Gallery2的rating模块充分利用了Gallery2的权限系统,因此某站点管理员可以限制特定用户组用户对项目评分的添加甚至查看。最简单的例子就是让所有人查看评价,但仅允许已注册用户添加评分。


=== Sorting ===
=== 分类排序 ===


You will be able to sort items in an album by rating (both ascending and descending) if you wish to.
你能够通过评分(同时包括升序和降序)来对某相册中的项目进行分类排序。


==== Vote Skew Protections ====
==== 投票偏移保护====


We are very aware of the possiblity of dastardly devils seeking to skew vote results in every manner of way, and the Gallery2 rating module does make efforts to curb this.  Basically it only allows one vote per user per item.  The trick comes into play when you allow anonymous users (Everyone) to cast votes.  We will track the session ID and remote identifier information to do our best to identify unique visitors.  We will add more safeguards as we are made aware of them in an effort to provide a fair rating system.
We are very aware of the possiblity of dastardly devils seeking to skew vote results in every manner of way, and the Gallery2 rating module does make efforts to curb this.  Basically it only allows one vote per user per item.  The trick comes into play when you allow anonymous users (Everyone) to cast votes.  We will track the session ID and remote identifier information to do our best to identify unique visitors.  We will add more safeguards as we are made aware of them in an effort to provide a fair rating system.


== Screenshots ==
== 截图==
''Will post when I can take some.''
''有的时候我会发上来的。''


== Usage ==
== 用法 ==


To enable rating you need to both enable the rating module '''and turn on rating for a given album''' under the Album Properties (Edit Album->Album tab).
要启用评分的话,你需要同时启用rating模块'''并为相册属性(编辑相册->相册)下的某个给定相册开启rating'''


Define the permissions (optionally for each album/item) by browsing to an album and clicking Edit Permission and adding/removing the ''add ratings'', ''view ratings'' permission to specific user(s) or  groups.
定义权限(可以为各相册/项目进行定义):浏览某个相册,点击编辑权限并添加或移除特定用户或组的''添加评分(add ratings)''''查看评分(view ratings)''权限。


Add the ratings interface where you would like by selecting the ratings ''Block'' under the Edit Album->Theme tab ''blocks to add to the sidebar/album page/photo page''
通过选择编辑相册->外观主题下的评价''区块''来向便利/相册页面/相片页面添加评分界面。


== Customizations ==
== 自定义==
You can customize the look of the rating interface by adjusting the CSS, the templates and the images.
通过调整CSS,模板以及图片你可以自定义评分界面的呈现方式。


To adjust the CSS, open your themes/*/theme.css and add
要调整CSS的话,打开themes/*/theme.css并添加
   .giRatingUI img {}
   .giRatingUI img {}
   .giRatingUnit {}
   .giRatingUnit {}
第55行: 第55行:
   .giRatingFullUserYes {}
   .giRatingFullUserYes {}
   .giRatingAverage {}
   .giRatingAverage {}
of course you can set any CSS in between the {}. Also, you can change following CSS clases:
当然你可以在{}中设定任何的CSS。你ihai可以修改一下的CSS类别:
   .giRatingUI {
   .giRatingUI {
       margin: 10px auto; /* Required to center default rating module star images */
       margin: 10px auto; /* 为默认评分模块星形图像的居中所必须*/
   }
   }
   #gsThumbMatrix .giRatingAverageContainer {
   #gsThumbMatrix .giRatingAverageContainer {
第63行: 第63行:
   }
   }


== Bugs and Feature Requests ==
== Bug及特点请求 ==


All bugs and featuer requests in the Gallery 2.1 module should be filed with Gallery's sourceforge [http://sourceforge.net/tracker/?group_id=7130&atid=107130 bug] and [http://sourceforge.net/tracker/?group_id=7130&atid=357130 feature request] trackers, respectively.
所有Gallery2.1模块中的bug和特点请求都应分别地归档到Gallery的sourceforge [http://sourceforge.net/tracker/?group_id=7130&atid=107130 bug]以及 [http://sourceforge.net/tracker/?group_id=7130&atid=357130 特点请求]跟踪中。


Any bugs with the gallery-contrib module should just be noted to Don Seiler by emailing don [at] seiler [dot] us.  No new features will be accepted before the 2.1 release.
有关gallery-contrib模块的任何bug都应通过电子邮件告知Don Seiler,don [at] seiler [dot] us。2.1之前的版本不接受新特点请求。


=== Tasks ===
=== 任务 ===
This module is an effort satisfy [http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=106402&group_id=7130&group_project_id=14056 Task #106402].  There is also a [http://gallery.menalto.com/node/34758 forum thread] on the subject.
该模块为一effort satisfy的[http://sourceforge.net/pm/task.php?func=detailtask&project_task_id=106402&group_id=7130&group_project_id=14056 Task #106402]。;另有有关该主题的 [http://gallery.menalto.com/node/34758 论坛帖子]


* Remove rating specific CSS from theme.css and the css that needs to be there should be generalized, there should not be rating specific CSS in theme.css (we can't have a monolithic CSS file for our modular application)
* Remove rating specific CSS from theme.css and the css that needs to be there should be generalized, there should not be rating specific CSS in theme.css (we can't have a monolithic CSS file for our modular application)


=== Feature Requests ===
=== 特点请求 ===
'''Change/erase ratings:''' [http://gallery.menalto.com/node/78129 Modify Rating enhancement]
'''Change/erase ratings:''' [http://gallery.menalto.com/node/78129 Modify Rating enhancement]



2008年9月1日 (一) 15:48的版本

介绍

Gallery2评价/评分(rating)模块是在Gallery2.1中添加进来的。 其编写者是Don Seiler (rizzo),以及valiant,mindless和bharat的大力协助。

特点

Gallery 2.2添加了一个动态相册视图用以显示Gallery中获得较高评价的项目。在站点管理中可为此视图配置外观主题,外观主题设定以及分类次序。

用户界面

Gallery2评价模块使用一个5星界面,该界面用于用户评分的选取以及平均评分的显示。默认的外观主题使用金色的星星来代表用户的选择,而带红色边框的星星则用于表示该项目的当前平均分。

该模块具有外观主题可定制性。因此外观主题开发者应该能修改图片而且可以使用水平评分条。该评分条默认是隐藏的。

AJAX

星形UI使用的是最新的internet科技中的流行词,那就是AJAX!对于一般用户来说,这意味着无需进行页面重载入就可以提交评分以及评分显示的更新。Javascript以及后台HTTP呼叫将做此项工作并更新页面。

权限

Gallery2的rating模块充分利用了Gallery2的权限系统,因此某站点管理员可以限制特定用户组用户对项目评分的添加甚至查看。最简单的例子就是让所有人查看评价,但仅允许已注册用户添加评分。

分类排序

你能够通过评分(同时包括升序和降序)来对某相册中的项目进行分类排序。

投票偏移保护

We are very aware of the possiblity of dastardly devils seeking to skew vote results in every manner of way, and the Gallery2 rating module does make efforts to curb this. Basically it only allows one vote per user per item. The trick comes into play when you allow anonymous users (Everyone) to cast votes. We will track the session ID and remote identifier information to do our best to identify unique visitors. We will add more safeguards as we are made aware of them in an effort to provide a fair rating system.

截图

有的时候我会发上来的。

用法

要启用评分的话,你需要同时启用rating模块并为相册属性(编辑相册->相册)下的某个给定相册开启rating

定义权限(可以为各相册/项目进行定义):浏览某个相册,点击编辑权限并添加或移除特定用户或组的添加评分(add ratings)查看评分(view ratings)权限。

通过选择编辑相册->外观主题下的评价区块来向便利/相册页面/相片页面添加评分界面。

自定义

通过调整CSS,模板以及图片你可以自定义评分界面的呈现方式。

要调整CSS的话,打开themes/*/theme.css并添加

 .giRatingUI img {}
 .giRatingUnit {}
 .giRatingHidden {}
 .giRatingVotes {}
 .giRatingEmpty {}
 .giRatingEmptyUserYes {}
 .giRatingHalfUserNo {}
 .giRatingHalfUserYes {}
 .giRatingFullUserNo {}
 .giRatingFullUserYes {}
 .giRatingAverage {}

当然你可以在{}中设定任何的CSS。你ihai可以修改一下的CSS类别:

 .giRatingUI {
     margin: 10px auto; /* 为默认评分模块星形图像的居中所必须*/
 }
 #gsThumbMatrix .giRatingAverageContainer {
     margin: auto;
 }

Bug及特点请求

所有Gallery2.1模块中的bug和特点请求都应分别地归档到Gallery的sourceforge bug以及 特点请求跟踪中。

有关gallery-contrib模块的任何bug都应通过电子邮件告知Don Seiler,don [at] seiler [dot] us。2.1之前的版本不接受新特点请求。

任务

该模块为一effort satisfy的Task #106402。;另有有关该主题的 论坛帖子

  • Remove rating specific CSS from theme.css and the css that needs to be there should be generalized, there should not be rating specific CSS in theme.css (we can't have a monolithic CSS file for our modular application)

特点请求

Change/erase ratings: Modify Rating enhancement

These should be added to the Gallery2 RFE tracker. --Rizzo 13:07, 16 December 2005 (PST)

I'm putting these in a priority order, and grouping what I see as dupes or related.

  1. Enable iconpack developers to include alternate stars that can be used in place of default stars --thumb 19:07, 22 November 2005 (PST)
  2. A block on the photo page or in the sidebar could have more than 1 line, so we could have 1 line to show your rating and 1 line to show the average
    • I think this is a theme issue. If we do things right then the theme can define it, but it would still be the same for item summaries vs blocks, since they use the same template.
  3. A top x rated items block
    • keep your pr0n site requests off here. or email them with a paypal donation ;) --Rizzo 08:32, 11 November 2005 (PST)
  4. Add other voting / rating styles, not just 5 stars. Maybe drop dwon / radio votes too, with user defined text...
  5. Enable voting option as an overlay of image blocks
  6. combine with the dynamic_view module in order to get a "top-of-album/subalbum" selection based on viewer's votes