Benjamin Kroll
|
Wednesday 22 December 2010 11:05:29 am
Hi everyone,
I'm curious to find out if someone has created a contentobject with an ezstarrating attribute from PHP before. I've been looking through the forums as well as the ezstarrating extension classes for a little bit now, but wanted to make sure I'm not reinventing the wheel here.
I'm going the usual route of:
- create object (return new object)
- update via $data_map[ $key ]->fromString( $value );
- store via $data_map[ $key ]->store();
- execute content publish
I've tried simply passing in an integer of the star rating (0-5) as well as a few other combinations, but so far, no dice.
If anyone has done this before or has a hunch as to what kind of format in need to pass this in with I'd much appreciate a quick reply.
Thanks, Ben
|
Marco Rogers
|
Wednesday 22 December 2010 6:22:38 pm
Benjamin, check out the rating is saved in the ajax function when you click the stars. You can use this method. https://github.com/ezsystems/ezstarrating/blob/master/packages/ezstarrating_extension/ezextension/ezstarrating/classes/ezsrserverfunctions.php#L75
|