StarsPackage

a generic rating package

Created by: xing, Last modification: 30 Jun 2008 (09:31 UTC) by Kozuch
{r2}
Stars is a simple rating package that allows you to rate content.

What can it do?

StarsPackage allows you registered users to rate the content on your homepage. Rating can be controlled on a per content type basis. This means that you can allow users to rate only specific content types. e.g.: wiki pages and articles but nothing else or only images in fisheye and comments or ...

Possible settings

Several settings are available in the Stars package which include:
  • Specify the number of stars that you want to use for ratings. can be as many as 100 if you wish to do so.
  • Specify number of ratings required before the results are shown.
  • You need to be logged in to be able to rate. This is needed to keep a log of all the ratings in the past (see below).
  • Optionally use ajax to update stars after rating.
  • Icon dimensions can be set, making it ridiculously easy to use your own icon without having to manually adjust a singe value in the css (see below).
  • Rating calculations can be weighted according to user importance. You can specify how important the following are to you:
    • User age: How long a user has been a member of your site - relative to the age of your site.
    • Permission weight: This calculation takes the number of permissions a user has into account.
    • Activity weight: Activity is calculated by the number of content a user has created or contributed to.
Obviously you can opt to not use weighting at all and all users will be considered the same.

When you change any of these settings, you have the option to recalculate all the ratings on your site to make the changes fair.

All values are normalised to 100 regardless of your settings. This means that all of the above calculations can be done on the fly using the history and returning an accurate value. This also means that someone might want to develop a package that ties in with StarsPackage and uses the ratings to trigger something.

Changing Stars Icon

It is easy to use your own icon for stars. Here i will describe the steps needed to use your own icon without replacing the original:
  1. Copy the sample icon from stars/icons/stars_small.gif to themes/force/stars/stars.gif (please note that the icon was renamed from stars_small.gif to stars.gif).
  2. Go to the stars admin panel (/kernel/admin/index.php?page=stars) and enter the following icon sizes: width:10 and height:10.
  3. You're already done!
Placing the icon in themes/force will override all themes in bitweaver. This is recommended since the icon settings are used system wide as well. If you prefer, you can place the icon in your custom themes: themes/styles/<custom_theme>/stars/stars.gif

Future?

After some time and testing of the weighting (karma) calculations, we can add a feature by which badly rated content can be hidden or even removed from the site. This is done quite easily using our setup, but we first need to get the package tested for a while to evaluate the weighting algorithm.

Current karma user weighting calculations


<?php
round
log$age $permission $activity) )
// where the following is true:
$age = ( age of user ) / ( age of site ) * ( age weight preference )
$permission = ( number of user permissions ) / ( total number of permissions ) * ( permission weight preference )
$activity = ( number of content created by user ) / ( total content count ) * ( activity weight preference )
?>


  1. $activity might be changed to take the history into account as well.
  2. perhaps add a permission for rating if wanted.
</custom_theme>

Comments

excellent. See also Karma and Mojo

by mlpvolt, 17 Apr 2006 (18:48 UTC)
I've been looking for a good feature like this for a long time.

Ultimate wiki CMS describes a karma and mojo system. Karma tracks historic contributions of users, mojo tracks more recent activity.

Mojo is important because it is a contest anyone can join. Karma is a "legends" game. You need both in groupware to encourage positive community.


Re: excellent. See also Karma and Mojo

by laetzer, 20 Apr 2007 (19:29 UTC)
after you placed your customized stars.gif in themes/styles/yourstyle/icons/stars/ to see the changes you might have to clean your icon cache in Administration -> Kernel -> System Cache

How to change the star icon

by sylvie, 11 May 2006 (20:28 UTC)
If you want to change the icons in your style you have to put the new stars.gif in
themes/styles/your_styles/icons/stars/
This .gif must contains 3 stars in a single column. The first star is the non-rated one, the second is when over, and the third is the rated. The width of the .gif must be the width you give in Liberty->Stars->width. The height must be 3 times the height you give in Liberty->Stars->height

To display the stars in a page

by sylvie, 11 May 2006 (22:21 UTC)
In the tpl
include file="bitpackage:liberty/services_inc.tpl" serviceLocation='body' serviceHash=$gContent->mInfo

Super bit.User friendly

by realname, 08 Jun 2006 (15:25 UTC)
Hey... could be great if one ' grand sachem who knows everything because he had made it ' could explain to simple mortals how to run this?
I've heard you want people to use and praticipate 2 Bitweaver Projet... but everybody runs out when they see how clear is the water.

star for guests?

by Amy, 20 Nov 2007 (23:37 UTC)
How do I allow guests to use the stars?
  Page 1 of 1  1