- Posts: 15920
COMMUNITY FORUM
K2 translation don't work
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
11 years 1 month ago #116314
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: K2 translation don't work
Yes it will work.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Casper
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 24
11 years 1 month ago #116315
by Casper
Replied by Casper on topic Re: K2 translation don't work
So it doesn't matter where to put this code:
<?php$user = &JFactory::getUser();$userId = $user->get('id');?>
Just somewhere near the top of item.php and category_item.php
And add this:
<ul class="itemRatingList"> <li class="itemCurrentRating" id="itemCurrentRating... <?php if($userId != 0) : ?> <li><a href="#" rel="<?php echo $this->item->id; ?>"... <li><a href="#" rel="<?php echo $this->item->id; ?>"... <li><a href="#" rel="<?php echo $this->item->id; ?>"... <li><a href="#" rel="<?php echo $this->item->id; ?>"... <li><a href="#" rel="<?php echo $this->item->id; ?>"... <?php endif; ?></ul>
around line 200 in item.php and 73 in category_item.php.
Or do I need to delete also something?
Thanks in advance
<?php$user = &JFactory::getUser();$userId = $user->get('id');?>
Just somewhere near the top of item.php and category_item.php
And add this:
<ul class="itemRatingList"> <li class="itemCurrentRating" id="itemCurrentRating... <?php if($userId != 0) : ?> <li><a href="#" rel="<?php echo $this->item->id; ?>"... <li><a href="#" rel="<?php echo $this->item->id; ?>"... <li><a href="#" rel="<?php echo $this->item->id; ?>"... <li><a href="#" rel="<?php echo $this->item->id; ?>"... <li><a href="#" rel="<?php echo $this->item->id; ?>"... <?php endif; ?></ul>
around line 200 in item.php and 73 in category_item.php.
Or do I need to delete also something?
Thanks in advance
Please Log in or Create an account to join the conversation.
- Casper
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 24
11 years 1 month ago #116316
by Casper
Replied by Casper on topic Re: K2 translation don't work
Someone?
Please Log in or Create an account to join the conversation.
- Kannan Naidu Venugopal
- Offline
- Platinum Member
- Aham Brahmasmi
11 years 1 month ago #116317
by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: K2 translation don't work
YOu can try this ...
K2 Rocks \m/
Please Log in or Create an account to join the conversation.
- Casper
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 24
11 years 1 month ago #116318
by Casper
Replied by Casper on topic Re: K2 translation don't work
Added that code you provided somewhere on the top of item.php and category_item.php. Afterwards the pages do not load?
Please Log in or Create an account to join the conversation.
- Casper
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 24
11 years 1 month ago #116319
by Casper
Replied by Casper on topic Re: K2 translation don't work
It truly cannot be the case I am the only one who wants its visitors to only being able to vote whenever they are logged in right?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 1 month ago #116320
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: K2 translation don't work
Hello Casper,
Depending on where you wish to paste this snippet you need to be careful if $this-> or this $this->item is been used.
The code seems fine although I have not tested it (it could have a typo). You can enable error reporting (from global configuration) and see the actual error so I can assist you.
Depending on where you wish to paste this snippet you need to be careful if $this-> or this $this->item is been used.
The code seems fine although I have not tested it (it could have a typo). You can enable error reporting (from global configuration) and see the actual error so I can assist you.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Casper
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 24
11 years 1 month ago #116321
by Casper
Replied by Casper on topic Re: K2 translation don't work
Hi Krikor,
thanks for you reply. I enabled error reporting, but deleted the code because it didn't work. Are we talking about the snippet Kannan provided? And where exactly would you implement it in the item.php and category_item.php?
Thanks in advance,
Casper
thanks for you reply. I enabled error reporting, but deleted the code because it didn't work. Are we talking about the snippet Kannan provided? And where exactly would you implement it in the item.php and category_item.php?
Thanks in advance,
Casper
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 1 month ago #116322
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: K2 translation don't work
Hello Casper,
Yes that snippet. You can add it where you like since all blocks are well commented. Just make sure you don't break any if/else statement and the <?php $user = JFactory::getUser(); ?> part does not already exist.
Yes that snippet. You can add it where you like since all blocks are well commented. Just make sure you don't break any if/else statement and the <?php $user = JFactory::getUser(); ?> part does not already exist.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- Casper
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 24
11 years 1 month ago - 11 years 1 month ago #116323
by Casper
Replied by Casper on topic Re: K2 translation don't work
I added the snippet in both the item.php and category_item.php but still you can vote without signing in.
This page as example: mybeautyreview.com/mybeautyreview.com/index.php/component/k2/item/21-art-deco-blusher-color-art
It only shows on the bottom of the page the text 'please log in to rate'
This page as example: mybeautyreview.com/mybeautyreview.com/index.php/component/k2/item/21-art-deco-blusher-color-art
It only shows on the bottom of the page the text 'please log in to rate'
Please Log in or Create an account to join the conversation.