Keyword

Rating - View "4.7/5" instead of the stars?

  • Anders Kristoffersson
  • Anders Kristoffersson's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago #101613 by Anders Kristoffersson
Rating - View "4.7/5" instead of the stars? was created by Anders Kristoffersson
As the topic says, how do i do that?

I want the rating to show ex. 4,7/5 instead of viewing the stars.

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 2 months ago #101614 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Rating - View "4.7/5" instead of the stars?
How do the visitors vote ? if your're not displaying the stars

K2 Rocks \m/

Please Log in or Create an account to join the conversation.

  • Anders Kristoffersson
  • Anders Kristoffersson's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago #101615 by Anders Kristoffersson
Replied by Anders Kristoffersson on topic Re: Rating - View "4.7/5" instead of the stars?
They vote inside of the item, there i want it to be stars. But like on the frontpage or where i "show" the items i want it to be "4.7/5".

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 2 months ago #101616 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Rating - View "4.7/5" instead of the stars?
You can do a template override and add this code in category_item.php where you want the text to appear instead of the stars.

i've taken this code from the richsnippet plugin for k2
					
K2 Rocks \m/

Please Log in or Create an account to join the conversation.

  • Anders Kristoffersson
  • Anders Kristoffersson's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 month ago - 12 years 1 month ago #101617 by Anders Kristoffersson
Replied by Anders Kristoffersson on topic Re: Rating - View "4.7/5" instead of the stars?
Thank you it works!

But if i also want it to view like this in the k2_Content module?

I put this code into helper.php in mod_k2_content, to get the rating working in that module.

$item->votingPercentage = $model->getVotesPercentage($item->id);
$item->numOfvotes = $model->getVotesNum($item->id);
$rows[] = $item;

Put it dosent seem to work with your code that you wrote now. It only works in the category_item.php

Please Log in or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 1 month ago #101618 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Rating - View "4.7/5" instead of the stars?
I've not tried this in K2 content module :)

K2 Rocks \m/

Please Log in or Create an account to join the conversation.

  • Anders Kristoffersson
  • Anders Kristoffersson's Avatar Topic Author
  • Offline
  • New Member
More
12 years 1 month ago #101619 by Anders Kristoffersson
Replied by Anders Kristoffersson on topic Re: Rating - View "4.7/5" instead of the stars?
Ok, you got any idéa on how to make it work?

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum