Keyword

How to move Rate this item stars to top?

  • Sara Samimian
  • Sara Samimian's Avatar Topic Author
  • Offline
  • New Member
More
10 years 2 months ago - 10 years 2 months ago #125324 by Sara Samimian
How to move Rate this item stars to top? was created by Sara Samimian
I want to move "Rate this itam and vote stars" from button to top of an article after article tittle.
Which php has to change and how?
Regards,
Sara

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

More
10 years 2 months ago #125325 by Geoffroy
Replied by Geoffroy on topic Re: How to move Rate this item stars to top?
in the com_k2/templates/.../item.php

you have the Item Rating block that you can move anywhere. That is when you override k2 template with your own.

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

  • Sara Samimian
  • Sara Samimian's Avatar Topic Author
  • Offline
  • New Member
More
10 years 2 months ago - 10 years 2 months ago #125326 by Sara Samimian
Replied by Sara Samimian on topic Re: How to move Rate this item stars to top?
You mean all this code has to meve?
But where?
I did it already, but it's going behind the title(inback goound)!

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

More
10 years 2 months ago #125327 by Geoffroy
Replied by Geoffroy on topic Re: How to move Rate this item stars to top?
Well you can check you css to see if there is some position that could help, or add a
<div class="clr"></div> before and after the code.

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

  • Sara Samimian
  • Sara Samimian's Avatar Topic Author
  • Offline
  • New Member
More
10 years 2 months ago - 10 years 2 months ago #125328 by Sara Samimian
Replied by Sara Samimian on topic Re: How to move Rate this item stars to top?
Can any one do it for me please,
This is my item.php code:
Log in  or Create an account to join the conversation.

More
10 years 2 months ago #125329 by Lefteris
Replied by Lefteris on topic Re: How to move Rate this item stars to top?
@sarah

The code that generates the rating system is the following:
	<?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="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_1_STAR_OUT_OF_5'); ?>" class="one-star">1</a></li>
				<li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_2_STARS_OUT_OF_5'); ?>" class="two-stars">2</a></li>
				<li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_3_STARS_OUT_OF_5'); ?>" class="three-stars">3</a></li>
				<li><a href="#" data-id="<?php echo $this->item->id; ?>" title="<?php echo JText::_('K2_4_STARS_OUT_OF_5'); ?>" class="four-stars">4</a></li>
				<li><a href="#" data-id="<?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>
	<?php endif; ?>

You can move it wherever you want inside 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.