Keyword

Question on K2 Content Module

  • German Levi
  • German Levi's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 2 months ago #151085 by German Levi
Question on K2 Content Module was created by German Levi
Good day. I use the K2 Content module to display the content sorted by rating. However, in the settings there is no option to show the rating of the materials themselves. I have overridden the template and made changes to the code. However, the ranking is just shown blank. After the vote he's already displayed, the current rating. How to make the rating appear? And is it possible to do so indicated the position of the rating, i.e. 1,2,3,4 and so on

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #151106 by Krikor Boghossian
Replied by Krikor Boghossian on topic Question on K2 Content Module
Hello,
What code did you use?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • German Levi
  • German Levi's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 2 months ago - 8 years 2 months ago #151109 by German Levi
Replied by German Levi on topic Question on K2 Content Module
Hello, Krikor!
I am use this code
<div class="itemRatingBlock">
		<span><?php echo JText::_('K2_RATE_THIS_ITEM'); ?></span>
		<div class="itemRatingForm">
			<ul class="itemRatingList">
				<li class="itemCurrentRating" id="itemCurrentRating<?php echo $item->id; ?>" style="width:<?php echo $item->votingPercentage; ?>%;"></li>
				<li><a href="#" data-id="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a></li>
				<li><a href="#" data-id="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a></li>
				<li><a href="#" data-id="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a></li>
				<li><a href="#" data-id="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a></li>
				<li><a href="#" data-id="<?php echo $item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a></li>
			</ul>
			<div id="itemRatingLog<?php echo $item->id; ?>" class="itemRatingLog"><?php echo $item->numOfvotes; ?></div>
			<div class="clr"></div>
		</div>
	</div>
Last edit: 8 years 2 months ago by German Levi.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #151188 by Krikor Boghossian
Replied by Krikor Boghossian on topic Question on K2 Content Module
I will work in a custom solution and let you know.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • German Levi
  • German Levi's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 2 months ago #151190 by German Levi
Replied by German Levi on topic Question on K2 Content Module
Thanks, Krikor!
Good Luck!

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


Powered by Kunena Forum