Path

ez projects / ezstarrating / forum / general / sortby feature ?


SortBy feature ?

You need to be logged in to post messages in the forums. New users may register here.

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Friday 16 October 2009 5:09:14 pm

Hi

Thanks for your cool extension. It would be great to have a sort by rating_average feature for fetch functions :)
Up

Carlos Revillo

Member since:
31 January 2007

Posts: 53

Friday 16 October 2009 11:32:03 pm

hi. this is already done
check http://svn.projects.ez.no/ezstarr...rrating/classes/ezsrratingfilter.php

you can use an extended_attribute_filter for this..

Twitter: @crevillo
Skype ID: crevillo1976
http://www.tantacom.com
eZ Diff Squad member

Up

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Sunday 18 October 2009 4:32:56 pm

Oh Thanks ! I didn't catch this one :)
Up

André R

Member since:
20 August 2005

Posts: 171

Friday 22 January 2010 2:45:15 pm

You also have a fetch_by_starrating template operator (and fetch_starrating_data + fetch_starrating_stats) that lets you do this with lots of other options as well. For instance combine it with other extended attribute filters like the one in ezgmaplocation.. ;)

Doc is currently inline in ezsrRatingObject::fetchNodeByRating (classes/ezsrratingobject.php)

--
ar

Up

Jérôme Vieilledent

Member since:
09 January 2008

Posts: 98

Friday 22 January 2010 3:39:42 pm

Thanks André !
Up

*- pike

Member since:
04 March 2006

Posts: 1

Tuesday 27 August 2013 12:20:06 pm

The template operator seems to miss a function_definition ... ? How would you call that ?

I got the extended attribute filter working .. just posting an example for future reference. what the filter does is not filter, but add a field that allows 'rating' in the sort_by parameter.




$posts  = fetch( 'content', 'list', hash(


        'parent_node_id', $node.node_id,


        'sort_by',      array(


                array('rating', false()),


                array('modified_subnode', false()),


                array( 'node_id', false() )


        ),


        'extended_attribute_filter', hash( 

                'id', 'ezsrRatingFilter',


                'params', hash( 'incl_not_rated', true())


        )


))




$2c,
*-pike

---------------
The class eZContentObjectTreeNode does.

Up

You need to be logged in to post messages in the forums. New users may register here.