Keyword

num of votes label

  • Cristiano Cucco
  • Cristiano Cucco's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #83020 by Cristiano Cucco
num of votes label was created by Cristiano Cucco
Hi,I found that is impossible to change the label with the information of num of votes.In fact in K2ModelItem the function getVotesNum doesn't return a number but a string...The only way it is to modiyf the model but it would be preferrable to act in the overridden templates.Anyway what I did is:/components/com_k2/models/item.php (line 503)function getVotesNum($itemID=NULL) {..........        if ($rating_count != 1) {            $result=JText::sprintf('%d votes', $rating_count);        }        else {            $result=JText::_('1 vote');        }..........}This way it is possible to modify the label through joomla language INI filesCristiano

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

  • Cristiano Cucco
  • Cristiano Cucco's Avatar Topic Author
  • Offline
  • New Member
More
14 years 6 months ago #83021 by Cristiano Cucco
Replied by Cristiano Cucco on topic num of votes label
By the way...it would be even better to modify the getVotesNum function in order to return an integer

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


Powered by Kunena Forum