View previous ratings
Posted: 04 March 2008 02:58 PM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  33
Joined  2007-03-01

Is there a way to have a user’s previously stored rating displayed?

If I rated an entry a 5, can I show that?

Profile
 
 
Posted: 04 March 2008 03:05 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3717
Joined  2006-10-18

I would use the rating_author_id=“{member_id}“ parameter for the Rating Entries Tag

If you want to display just the most recent one, use the limit=“1” parameter.

 Signature 

Check out the new Solspace Blog!

Profile
 
 
Posted: 04 March 2008 04:03 PM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  33
Joined  2007-03-01

I’ve now got the following, but it doesn’t show up at all.
I’ve checked that the member id and entry id are indeed set.
I’m sure I’m missing something simple. Yaay!

{exp:rating:entries form_name="rating" entry_id="{entry_id}" rating_author_id="{member_id}" limit="1"}
{stars}{rating}{
/stars}
{
/exp:rating:entries}

Profile
 
 
Posted: 04 March 2008 04:10 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3717
Joined  2006-10-18

Does it work if you hardcord the Entry ID and Member ID? smile

 Signature 

Check out the new Solspace Blog!

Profile
 
 
Posted: 04 March 2008 04:22 PM   [ Ignore ]   [ # 4 ]
Jr. Member
RankRank
Total Posts:  33
Joined  2007-03-01

No it’s not showing up then either.
And in my testing entry, there definitely is one rating (by my user).

Profile
 
 
Posted: 05 March 2008 08:05 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3717
Joined  2006-10-18

Try this code: (also make sure your Form Name is correct smile
You can also remove it too if you want… let me know if it works wink

{exp:rating:entries form_name="review" entry_id="your#" rating_author_id="1" limit="1"}
Stars
: {stars}{rating}{/stars}<br />
Member ID: {member_id}<br />
Entry Title: {title}<br />
Entry ID: {entry_id}<br />
Review: {review}<br />
{/exp:rating:entries}

I’ve managed to get that to work… it still leaves a couple dilemmas yet though… but let’s at least see if this works…
Then I’ll queue up getting the {segment_#}, {entry_id}, {member_id} variables to be added to the functionality wink

entry_id=“” is actually not yet a supported feature… but it seems to work hardcoded.

 Signature 

Check out the new Solspace Blog!

Profile
 
 
Posted: 05 March 2008 08:40 AM   [ Ignore ]   [ # 6 ]
Jr. Member
RankRank
Total Posts:  33
Joined  2007-03-01

A thought. It’s inside a weblog entries tag. would that have any effect?

Trying now…

Profile
 
 
Posted: 05 March 2008 09:03 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3717
Joined  2006-10-18

Probably… try it outside smile

 Signature 

Check out the new Solspace Blog!

Profile
 
 
Posted: 05 March 2008 10:24 AM   [ Ignore ]   [ # 8 ]
Jr. Member
RankRank
Total Posts:  33
Joined  2007-03-01

Ok, I’ve removed it to an embed and pass the entry_id as an embed variable.

But the only way I can get the rating to show up, is if I hardcode the rating_author_id.
Passing {member_id} into it, doesn’t seem to work.

This code works, with a hard coded author ID.

Entry #: 16
Member #: 3

Which is correct.
Entry iD gets passed fine. Not so much for member_id.

<b>{embed:entry_num}</b> - Entry #<br />
<b>{member_id}</b> - member_id<br />

{if logged_in}
{exp
:rating:entries form_name="rating" entry_id="{embed:entry_num}" rating_author_id="3" limit="1"}
Stars
: {stars}{rating}{/stars}<br />
Member ID: {member_id}<br />
Entry Title: {title}<br />
Entry ID: {entry_id}<br />
Review: {review}<br />
{/exp:rating:entries}

Profile
 
 
Posted: 05 March 2008 10:30 AM   [ Ignore ]   [ # 9 ]
Jr. Member
RankRank
Total Posts:  33
Joined  2007-03-01

I’ve also tried setting a global variable and parsing it, but to the same result, any {variable} that i put into rating_author_id doesn’t seem to get parsed out, and therefor doesn’t show any results.

Help would be great! Thanks already pie-man!

Profile
 
 
Posted: 05 March 2008 10:34 AM   [ Ignore ]   [ # 10 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3717
Joined  2006-10-18

Correct… smile

Here’s the bad news… (as I mentioned above)... I’ve submitted this as a feature request.

Although, we have a new version of Rating Module in queue, and I suspect we’ll be able to stuff this in smile

 Signature 

Check out the new Solspace Blog!

Profile
 
 
Posted: 05 March 2008 10:45 AM   [ Ignore ]   [ # 11 ]
Jr. Member
RankRank
Total Posts:  33
Joined  2007-03-01

*pout*

Ok. Well that’s what I needed to know. Thanks for your help.

Profile
 
 
Posted: 05 March 2008 10:50 AM   [ Ignore ]   [ # 12 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3717
Joined  2006-10-18

You’re welcome…

and I apologize for the inconvenience oh oh

 Signature 

Check out the new Solspace Blog!

Profile
 
 
Posted: 05 March 2008 11:07 AM   [ Ignore ]   [ # 13 ]
Jr. Member
RankRank
Total Posts:  33
Joined  2007-03-01

That wasn’t an angry pout. Just a pout. Thanks so much! smile

Profile
 
 
Posted: 05 March 2008 11:08 AM   [ Ignore ]   [ # 14 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3717
Joined  2006-10-18

I know! :D tongue wink

I just feel bad for yah…. your frustrations are mine, and this would be frustrating for me wink

 Signature 

Check out the new Solspace Blog!

Profile
 
 
Posted: 12 April 2008 11:42 AM   [ Ignore ]   [ # 15 ]
Newbie
Rank
Total Posts:  8
Joined  2008-03-14

You can work around that by doing this, and setting your template to parse php on input:

<?php
global $SESS;
$member_id = $SESS->userdata['member_id'];
?>
{exp
:rating:entries form_name="formname" rating_author_id="<?php echo $member_id?>"}

Profile