Keyword

K2 translation don't work

  • Casper
  • Casper's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 2 months ago - 11 years 2 months ago #116304 by Casper
K2 translation don't work was created by Casper
Hi there,

I have some issues with the K2 translations of the facebook like button as shown in the attachment.
I downloaded and installed the dutch version but it still doesn't shows the dutch translation but still the english text. What do I need to do?

Also, how to set the rating of articles only for registered members? Currently you cannot rate at all, so its not working:
www.mybeautyreview.com/mybeautyreview.com/index.php/blog/test/item/3-testing-3#

Thanks in advance
Attachments:

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
11 years 2 months ago #116305 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: K2 translation don't work
The FB button code is generated by Facebook and not K2, you need to change the language code to your own language. Edit item.php file and look for the facebook button code. Change the en_US value to your language nl_NL
docs.joomla.org/JFactory/getUser

And use it to wrap the K2 rating system.

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 2 months ago #116306 by Casper
Replied by Casper on topic Re: K2 translation don't work
Thanks, the facebook translation worked out great.

Only thing is that I am kind of newbee with CSS, so could you please explain further what is wrong with the ratings and how to set only for registered?

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
11 years 2 months ago #116307 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: K2 translation don't work
i couldn't see whats wrong with your rating system, you links points to easy blog category.

The way i see, you can hide the k2 rating system for non-registered users user the example code on joomla documentation.

You can see a sample on how to show items to registered users only here - getk2.org/community/New-to-K2-Ask-here-first/178670-SOLVED-how-attachment-file-to-give-privilege#178698

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 2 months ago #116308 by Casper
Replied by Casper on topic Re: K2 translation don't work
Sorry the correct link is: www.mybeautyreview.com/mybeautyreview.com/index.php/haarverzorging/droogshampoo/item/3-testing-3

When you try to vote nothing happens, also when logged in.

Furthermore, I want that gast can see the ability for rating and the amount of stars the product received so far. But when you want to vote you should login first (registered)

Should I modify this section in com_k2 --> templates --> default --> item.php?

<?php endif; ?>

<?php if($this->item->params->get('itemRating')): ?>
<!-- Item Rating -->
<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 $this->item->id; ?>" style="width:<?php echo $this->item->votingPercentage; ?>%;"></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a></li>
<li><a href="#" rel="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_5_STARS_OUT_OF_5'); ?>" class="five-stars">5</a></li>
</ul>
<div id="itemRatingLog<?php echo $this->item->id; ?>" class="itemRatingLog"><?php echo $this->item->numOfvotes; ?></div>
<div class="clr"></div>
</div>
<div class="clr"></div>
</div>

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
11 years 2 months ago #116309 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: K2 translation don't work
There is a jQuery is not defined error on the page. I think it's because the k2.js is loaded before jQuery. Try to disable other jQuery and use default jQuery that comes with k2 jQuery library handling. It's at the K2->Parameters->Layout & Views

You should make use of template override - see here - getk2.org/documentation/tutorials/item/174-templating-with-k2-and-the-concepts-of-sub-templates

then edit the item.php inside your templates/templatename/html/com_k2/templates/subtemplatename/item.php

Yes, thats the code block for the rating system. I'm afraid you can just set it to hide for public and display for registered users. Or just display a text saying, "Rating for registered users only"

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 2 months ago - 11 years 2 months ago #116310 by Casper
Replied by Casper on topic Re: K2 translation don't work
Ok thanks, I set the 'Jquery library handling' to load v1.3.2 (local copy) (do not know which one is the default anymore since I set it earlier 'do not load the jquery library handling')
Rating works fine now. Don't know if it still shows JQUERY errors?

For tamplate override: I just added the k2_com map in my /templates/YOURJOOMLATEMPLATE/html/com_k2/ and created the files in it by just create a new file and copying the codes into them. Does this work as well?

What code do I need to add in order to show it to only registered?
Something with this link you shared: getk2.org/community/New-to-K2-Ask-here-first/178670-SOLVED-how-attachment-file-to-give-privilege#178698

Found this thread: getk2.org/community/New-to-K2-Ask-here-first/150760-Changing-the-content-rating-from-public-to-register#180805

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

  • Casper
  • Casper's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 1 month ago #116311 by Casper
Replied by Casper on topic Re: K2 translation don't work
anyone who knows how to imply the code on the thread I provided in my last post?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 1 month ago #116312 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: K2 translation don't work
You need to override item.php

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
11 years 1 month ago #116313 by Casper
Replied by Casper on topic Re: K2 translation don't work
yeah ok but is this code still up to date since it is more than 2 years ago?

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


Powered by Kunena Forum