2017 © Pedro Peláez
 

silverstripe-module silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

image

sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  • Thursday, October 20, 2016
  • by sheadawson
  • Repository
  • 6 Watchers
  • 20 Stars
  • 2,442 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 13 Forks
  • 1 Open issues
  • 12 Versions
  • 15 % Grown

The README.md

silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type, (*1)

Requirements

Silverstripe 4 and 5, (*2)

Installation

composer require sheadawson/silverstripe-rateable 2.0.x@stable, (*3)

Apply the Rateable DataExtension to the Objects you want to rate. ie. in mysite/_config/config.yml, (*4)

Page:
  extensions:
    - SheaDawson\Rateable\Extensions\Rateable

Then in your templates you can use $RateableUI, when in the context of your rateable object to render the star rating UI. If you have multiple instances of the same DataObject + RateableUI on one page, you can pass in a unique identifier string to $RateableUI, ie. $RateableUI('footer')., (*5)

Run dev/build?flush=all, (*6)

Sorting objects by rating

$pages = Page::get();
$sortedPages = singleton('RateableService')->sortByRating($pages);

Disabling by default on some page types

If you have added this extension to the Page class, it's enabled by default on all pages. But on some page types this might be annoying, e.g. ErrorPage or some holders. You can disable $RateableUI by default on this pages by adding this to your config.yml:, (*7)

ErrorPage:
  defaults: 
    EnableRatings: 0

You can still enable it on some pages of this type by hand in the "Settings" section., (*8)

The Versions

20/10 2016

2.0.x-dev

2.0.9999999.9999999-dev http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

20/10 2016

dev-master

9999999-dev http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

20/10 2016

2.0.0

2.0.0.0 http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

20/04 2016

1.1.x-dev

1.1.9999999.9999999-dev http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

20/04 2016

1.1.4

1.1.4.0 http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

15/09 2015

1.1.3

1.1.3.0 http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

08/09 2015

1.1.2

1.1.2.0 http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

02/09 2015

1.1.1

1.1.1.0 http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

28/08 2015

1.1.0

1.1.0.0 http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

10/08 2015

1.0.x-dev

1.0.9999999.9999999-dev http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

10/08 2015

1.0.1

1.0.1.0 http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating

03/08 2015

1.0.0

1.0.0.0 http://github.com/sheadawson/silverstripe-rateable

An extension that adds a star rating system + UI to any DataObject type.

  Sources   Download

The Requires

 

by Shea Dawson

silverstripe rating