List ratings by date
Posted: 06 May 2008 06:59 AM   [ Ignore ]
Newbie
Rank
Total Posts:  14
Joined  2008-04-24

Hi all...quick question before I purchase this module.  I want a really simple rating module (this one sounds great because it gives me the option of advanced rating as well!!).  For the most part it looks great....anyone (anonymous) can vote for an entry only once (allow duplicates off!).  The voting is really really simple...it is voted for or not (ie. not a star rating).

One of the ways my client wants to display the entries is simply by total ratings.  Easy with this module.  A no brainer.

The other way they want to display is by votes in the past 30, 60 or 90 days.  This is the bit I am unsure of.  Here is the scenario....

An entry has been voted on 10 times.  Except all the votes were from 85 days ago....therefore in total this entry has 10 votes, but in the last 30 days, or the last 60 days it has received 0 votes.  A second entry has 8 votes, but received them all in the last 30 days.  When displaying a list based on ratings over all time (10 votes), the first entry comes first, followed by the second entry (8 votes).  If someone wants to see a list of highest votes over the past 30 days they would get a list with the second entry first (8 votes) followed by the first entry (0 votes).

Does this make sense?  Can this be achieved with this module?  Any advice?  Am I going to need a lot of coffee?  Why is the sky blue?  Why am I still working at midnight?

Thanks in advance.

Profile
 
 
Posted: 06 May 2008 07:12 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Everything you list should be possible.... except one issue…

There’s currently no way to limit by timeframe… ohh

I will submit this as a feature request though wink

 Signature 
Profile
 
 
Posted: 06 May 2008 03:01 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  14
Joined  2008-04-24

Thanks Pie Man.  I figured as much.  Still it gives me all the other functionality that I need, and I might be able to ‘enhance’ my version of the module to suit my needs. Cheers for the quick response. grin

Profile
 
 
Posted: 29 August 2008 11:06 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

agun,

This feature has been added in the release of Rating 2.2.0, now available for download. smile

It consists of using timeframe_start="30 days ago” timeframe_end="60 days ago” parameters.
There are some further variables available as well. Please bear with me, as I wil need to get around to the Documentation update within the next couple days smile

To get you started, here’s an example code:

<div>
{exp:rating:rankings form_name="review" limit="50" orderby="timeframe_avg|rating" sort="desc|desc" paginate="bottom" timeframe_end="60 days ago"}
<ul><li>{title}<ul>
{exp:rating:stats entry_id="{entry_id}" theme="default" precision="1" thousands="," fractions="." timeframe_start="3 days ago"}
<li>Overall Rating: {stars_overall_avg}</li>
<
li>Timeframe Rating: {stars_timeframe_avg}</li>
<
li>Overall Average: {overall_avg}</li>
<
li>Count within timeframe: {timeframe_count}</li>
<
li>Average rating w/in timeframe: {timeframe_avg}</li>
<
li>Rating sum w/in timeframe: {timeframe_sum}</li>
<
li>Total Ratings: {overall_count}</li>
{/exp:rating:stats}
<li><ul>{exp:rating:entries entry_id="{entry_id}" timeframe_start="3 days ago"}<li>{rating_name} / {rating_date format="%Y-%m-%d"} / {rating_date format="%h:%i%a"}</li>{/exp:rating:entries}</ul></li></ul></ul>
{paginate}
<div class="paginate">
<
span class="pagecount">Page {current_page} of {total_pages} pages</span>  {pagination_links}
</div>
{/paginate}
{
/exp:rating:rankings}
</div>

 Signature 
Profile
 
 
Posted: 29 August 2008 03:13 PM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  14
Joined  2008-04-24

Hi Pie Man...thanks so much for adding this to the Rating module!!  In the meantime, I had created a little bit of code to extend the Rating module to do this, but I would MUCH rather have it built in.  I will download it and give it a go.

Thanks very much for letting me know about the update.  You guys rock.

grin

Profile
 
 
Posted: 29 August 2008 03:18 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

agun,

I’ll let you in on a secret… the developer on this went over the top LOL

You can use this date formatting: http://www.gnu.org/software/tar/manual/html_node/Date-input-formats.html

You can also use only 1 of the parameters too if you wish smile

 Signature 
Profile
 
 
Posted: 29 August 2008 03:19 PM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  14
Joined  2008-04-24

very cool.  again...you guys ROCK!

I am one very happy EE and Solspace customer.

Profile