Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Content Editor Discussions

Forum for content editors and CMS users.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Rating System in Backend/Frontend


Go to End
Reply

14 Posts   3489 Views

Avatar
Elender78

30 November 2009 at 9:49pm (Last edited: 4 December 2009 10:28am), Community Member, 22 Posts

Hello everybody,

currently i'm working on a product-website. Therefore i want to integrate a rating system in the backend. The Authors should be able to add their rating of the Game in the backend, users should be able to rate the game on the frontend. Both ratings should be displayed with a star-rating. Can anybody give me some clues how to accomplish this?

Thanks,

M

P.S: i am no great php-crack and new to silverstripe... please turn on the "slow and unseasone-mode" for me. Thanks. ;-)

Avatar
Willr

30 November 2009 at 10:27pm Forum Moderator, 5511 Posts

There is a unreleased rating module - http://open.silverstripe.org/browser/modules/rating/trunk which would be a good start.

Download the module from http://open.silverstripe.com/changeset/latest/modules/rating/trunk?old_path=/&filename=/modules/rating/trunk&format=zip and install that as per any module (http://doc.silverstripe.org/doku.php?id=installing-modules)

Not much documentation on the rating module as it is unreleased but if you have a read of the README file in the module download it explains briefly what you need to do.

See how far you get with that and if you have questions feel free to ask :D

Avatar
Elender78

1 December 2009 at 3:22am Community Member, 22 Posts

Thanks for the links. I will try it and report.

Avatar
lanks

2 December 2009 at 7:08pm (Last edited: 2 December 2009 7:09pm), Community Member, 61 Posts

Really interested in this module. It says they need to add javascript to the interface, do you think it would be possible to use the JS from the rating field in the formfieldsextra module? http://www.silverstripe.org/formfieldsextra-module/

Avatar
Elender78

4 December 2009 at 10:27am Community Member, 22 Posts

this module seems not to work. i've installed it in a fresh silverstripe (2.3.3) with the blogmodule. i followed the instructions and now only think i've got ist a website error when i try to open a BlogEntryPage.

The other one from lanks didn't work either. Here i'm not sure how to insert it in my site.

Any Ideas?

G

Avatar
Willr

4 December 2009 at 10:37am Forum Moderator, 5511 Posts

website error when i try to open a BlogEntryPage.

Put the site in devmode and post the actual error. Could be a number of things

Avatar
Elender78

4 December 2009 at 7:44pm Community Member, 22 Posts

Hello Willr,

here is my error-report:

[User Error] Uncaught Exception: Object->__call(): the method 'notyetrated' does not exist on 'RatingControllerDecorator'
GET /test_area1/new-blogentry/

Line 551 in {}public_html/test_area1/sapphire/core/Object.php
Source

542             case isset($config['function']) :
543                return $config['function']($this, $arguments);
544             
545             default :
546                throw new Exception (
547                   "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config, true)
548                );
549          }
550       } else {
551          throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'");
552       }
553    }
554    
555    // -----------------------------------------------------------------------------------------------------------------
556    
557    /**

Trace

* Object->__call(NotYetRated,Array)
* RatingControllerDecorator->NotYetRated(77.186.95.172)
Line 24 of RatingControllerDecorator.php
* RatingControllerDecorator->RatingForm()
* call_user_func_array(Array,Array)
Line 525 of Object.php
* Object->__call(RatingForm,Array)
* BlogEntry_Controller->RatingForm()
* call_user_func_array(Array,Array)
Line 408 of ViewableData.php
* ViewableData->XML_val(RatingForm,,1)
Line 983 of ViewableData.php
* ViewableData_Customised->XML_val(RatingForm,,1)
Line 192 of .cache.home.u0080278174.{}public_html.test_area1.themes.pixelgreen.templates.Page.ss
* include(/tmp/silverstripe-cache-home-u0080278174-public_html-test_area1/.cache.{}.public_html.test_area1.themes.pixelgreen.templates.Page.ss)
Line 354 of SSViewer.php
* SSViewer->process(BlogEntry_Controller)
Line 175 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 29 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/new-blogentry/)
Line 118 of main.php

Avatar
lanks

13 December 2009 at 8:31pm Community Member, 61 Posts

I'm getting the same error when trying to use this with 2.3.4, did you find out how to fix?

Go to Top