Keyword

Update item numeric rating

  • Krikor Boghossian
  • Krikor Boghossian's Avatar Topic Author
  • Offline
  • Platinum Member
More
9 years 8 months ago #146838 by Krikor Boghossian
Update item numeric rating was created by Krikor Boghossian
Hello,

You need to update the rating script (AJAX) as well. The script is located in the k2.js file. You should unset that script and load your own version.
$K2.ajax({
			url: K2SitePath+"index.php?option=com_k2&view=item&task=vote&format=raw&user_rating=" + rating + "&itemID=" + itemID,
			...

You need to update the custom HTML part when the AJAX call is successful.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar Topic Author
  • Offline
  • Platinum Member
More
9 years 7 months ago #147386 by Krikor Boghossian
Replied by Krikor Boghossian on topic Update item numeric rating
Sorry about the late reply,

you need to insert an div or span element with a unique id.
Then you can check the item's json feed (by applying the ?format=json ) and write the voting total in this element using the html() or text() jquery function.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar Topic Author
  • Offline
  • Platinum Member
More
9 years 7 months ago #147864 by Krikor Boghossian
Replied by Krikor Boghossian on topic Update item numeric rating
Sorry for the late reply but this more of a custom implementation.
I can provide instructions and guidlines, debug code and help you but I cannot write scripts or implement extra functionality

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


Powered by Kunena Forum