Edit template .itemRatingForm events of K2

GK User
Tue Jun 09, 2015 7:43 pm
Good morning, I'm using a template from one based on .events k2 is one that comes standard with the template, and e i tried adding this appears to me as IMG.3 I would join the IMG. 1 and the IMG. 2 that appeared as the IMG.3 that and have modified with photoshop.
Can someone help me out? I have the web on localhost. :( I do not know how to do it.
Image
Image
Image
User avatar
Senior Boarder

GK User
Wed Jun 10, 2015 6:02 am
1. You need to have site posted somewhere online
2. I completely don't understand what the issue
User avatar
Moderator

GK User
Fri Jul 03, 2015 10:05 pm
User avatar
Senior Boarder

GK User
Mon Jul 06, 2015 11:16 am
Could you please explain the issue more clearly?
User avatar
Moderator

GK User
Mon Jul 06, 2015 1:21 pm
In the direction given you and the stars appear in the bottom . I want to put as and since I with photoshop , below the image of the article.
But I did not get to do it correctly.

I want to appear as the image is .
http://i.gyazo.com/c1c929f0c8bf5413e25d9ae1e4bdfa09.png
User avatar
Senior Boarder

GK User
Mon Jul 06, 2015 6:29 pm
You want to move article rating to sidebar (under the "Aspencat" logo)?
User avatar
Moderator

GK User
Tue Jul 07, 2015 1:20 pm
Yes.
User avatar
Senior Boarder

GK User
Sat Jul 11, 2015 6:38 am
If you open this file:
components/com_k2/templates/default/item.php
you will find out that this section:
Code: Select all
   <?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; ?>

generates the rating module. You would need to move it "sidebar":
Code: Select all
     <?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?>
     <!-- Item Image -->
     <div class="itemImageBlock">
        <span class="itemImage">
           <a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
              <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
           </a>
        </span>

        <?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
        <!-- Image caption -->
        <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
        <?php endif; ?>

        <?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
        <!-- Image credits -->
        <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
        <?php endif; ?>

        <div class="clr"></div>
     </div>
     <?php endif; ?>

Which is in same file - the final code of "sidebar" would look this way:
Code: Select all
     <!-- Item Image -->
     <div class="itemImageBlock">
        <span class="itemImage">
           <a class="modal" rel="{handler: 'image'}" href="<?php echo $this->item->imageXLarge; ?>" title="<?php echo JText::_('K2_CLICK_TO_PREVIEW_IMAGE'); ?>">
              <img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
           </a>
        </span>

        <?php if($this->item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
        <!-- Image caption -->
        <span class="itemImageCaption"><?php echo $this->item->image_caption; ?></span>
        <?php endif; ?>

        <?php if($this->item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
        <!-- Image credits -->
        <span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
        <?php endif; ?>

        <div class="clr"></div>
           <?php if($this->item->params->get('catItemRating')): ?>
         <!-- Item Rating -->
         <div class="catItemRatingBlock">
            <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; ?>
     </div>
     <?php endif; ?>

but it might require a little bit of css work.
User avatar
Moderator

GK User
Tue Jul 21, 2015 1:47 pm
Thank you very much. I was getting almost in code prior to this post the problem is putting him after a </ div> and I skipped error.


thank you very much
User avatar
Senior Boarder


cron