favorites:author_rank and start_on parametr
Posted: 28 January 2008 12:21 PM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  37
Joined  2007-09-29

Hi all!

I would like to make authors rating per week.

I use

<?php
global $LOC;
$current_time $LOC->decode_date('%Y-%m-%d %g:%i %A'$LOC->now 604800);
?>

in the top of the page and tag

{exp:favorites:author_rank limit="15" start_on="<?php echo $current_time; ?>"}

but it doesn’t work.

I wish to show top week authors. Is it possible to do, may be exist another ways?

Profile
 
 
Posted: 30 January 2008 07:14 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3256
Joined  2006-10-18

Hmmm, shouldn’t the {current_time} variable work in this case (along with the formating)? smile

 Signature 
Profile
 
 
Posted: 30 January 2008 09:59 AM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  37
Joined  2007-09-29

You mean {current_time="%Y-%m-%d %g:%i %A” - 604800} ??
I need top authors per week

Profile
 
 
Posted: 30 January 2008 10:24 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3256
Joined  2006-10-18

Sorry about that.... I missed the problem altogether LOL

I’m curious of what happens when you test this by hardcoding the date/time:

start_on="2008-01-23 12:18 PM"

I also just want to make sure you’re aware that it sorts by EE Weblog Entry ID date/time, NOT the date/time the Favorite was added (in case this is a factor).

 Signature 
Profile
 
 
Posted: 30 January 2008 10:48 AM   [ Ignore ]   [ # 4 ]
Jr. Member
RankRank
Total Posts:  37
Joined  2007-09-29

for example, I use

[b]Authors rating[/b]<br>
{exp:favorites:author_rank limit="15"}
{rank}
{screen_name} ({count})<br>
{/exp:favorites:author_rank}

And I get this

Authors rating<br>
1. John (added by 45 users)
2. David (added by 37 users)
3. Mark (added by 26 users)
....

But it rating for the all time. If we have author, who have a lot of posts - therefore we have a lider for the all time site existence

So, how can I view Authors ratings per week, may be results will be

Authors rating<br>
1. Mark (added by 15 users)
2. David (added by 5 users)
3. Purgen (added by 4 users)
....

Profile
 
 
Posted: 30 January 2008 01:24 PM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3256
Joined  2006-10-18

Like I said, it only plays off of the Weblog Entry Date, not the date it was added.... which might be one problem.

The other problem is that I’m stupid and though you were referring to the Favorites Entries loop, which it works for.
The start_on Parameter does not yet exist for the Favorites:Author Rank loop.

I will submit it as a feature request though wink

 Signature 
Profile
 
 
Posted: 28 September 2008 08:59 PM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3256
Joined  2006-10-18

We’ve now added favorites_start_on="” and favorites_stop_before="” parameters to Favorite:Entries, Favorite:Rank, and Favorite:Author Rank in Favorites 2.5.0

 Signature 
Profile