Keyword

K2 translation don't work

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
11 years 1 month ago #116324 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: K2 translation don't work
Casper,

You need to replace the k2 rating code block with the code snippet i provided, if you have 2 rating codes, it will show both. Create a template override and replace the existing rating code with the one i provided.

K2 Rocks \m/

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

  • Casper
  • Casper's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 4 weeks ago #116325 by Casper
Replied by Casper on topic Re: K2 translation don't work
Hi Kannan,

I did what you told me: I added the snippet that you provided. Afterwards it shows the voting stars at the bottom of the page as you can see here: mybeautyreview.com/mybeautyreview.com/index.php/component/k2/item/24-art-deco-blusher

But still it is not saying that you first should log in for being able to vote.

When I delete the original code block for rating the page will not load and keeps giving a white screen? Even error report is not showing.

I attached the download link to both item.php and category_item.php so if you might have a look at them and please help me. There are still two rating blocks, the original on the place where it originally is placed and the snappet that you provided on the bottom of both documents.

www.dropbox.com/s/gpo1rtd55j5xg4d/item.php

www.dropbox.com/s/021t620tky3c391/category_item.php

Thanks in advance

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

  • Casper
  • Casper's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago #116326 by Casper
Replied by Casper on topic Re: K2 translation don't work
no one?

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

  • Casper
  • Casper's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago #116327 by Casper
Replied by Casper on topic Re: K2 translation don't work
Anyone please!

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #116328 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 translation don't work
The white screen means you accidentally deleted something you shouldn't have and caused a PHP error.

The message (Log in om te kunnen beoordelen.) is hardcoded in your template and cannot be translated.

You need to edit your template and use a language string in order to be translatable eg:
<?php echo JText::_('LOG_IN_OM_TE_KUNNEN_BEOORDELEN'); ?></span>
and then edit the appropriate language file or use Joomla!'s language overriding functionality

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

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

  • Casper
  • Casper's Avatar Topic Author
  • Offline
  • Junior Member
More
10 years 11 months ago - 10 years 11 months ago #116329 by Casper
Replied by Casper on topic Re: K2 translation don't work
Hi Krikor,

thank you for your reply! I figured how to change translation and to modify the text block so that you first need to be logged in before you can rate.
What I am now figuring out is how to delete the original rating and replace it with the one where you should be logged in first.
What also would be very nice is to show the amount of stars that is rated so far to everyone/public, but when you want to rate you should log in and the text appears saying e.g. 'you should be logged in order to rate'. Is this possible?

Somehow strange that K2 didn't add this option as something standard...Anyhow, help would be very appreciated!:)

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 11 months ago #116330 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 translation don't work
The only way this is possible I think is be overriding k2.js, removing the rating part.
Hint: the function starting with $K2('.itemRatingForm a').click(function(event){ ..

Check whether a user is logged in, in your template and include that script accordingly.

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

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


Powered by Kunena Forum