How to move from side to bottom
Ze względu na oszczędność miejsca chciałbym przenieść boczną część na dół, jak to zrobić?
http://images62.fotosik.pl/448/3670ad0e1f12c2b4.jpg
<span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
<?php endif; ?>
<?php endif; ?>
<div class="itemBody">
<?php echo $this->item->event->BeforeDisplayContent; ?> <?php echo $this->item->event->K2BeforeDisplayContent; ?>
<?php if(!empty($this->item->fulltext)): ?>
<?php if($params->get('itemIntroText')): ?>
<div class="itemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if($params->get('itemFullText')): ?>
<div class="itemFullText">
<?php echo (!empty($this->item->fulltext)) ? $this->item->fulltext : $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php echo $this->item->event->AfterDisplay; ?> <?php echo $this->item->event->K2AfterDisplay; ?>
</div>
<?php if(($params->get('itemDateModified') && intval($this->item->modified)!=0)): ?>
<div class="itemBottom">
<?php if($params->get('itemDateModified') && intval($this->item->modified) != 0 && $this->item->created != $this->item->modified): ?>
<small class="itemDateModified"> <?php echo JText::_('K2_LAST_MODIFIED_ON') . JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?> </small>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
<div class="itemExtraFields">
<h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != ''): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<?php if($extraField->type == 'header'): ?>
<h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span> <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php echo $this->item->event->AfterDisplayContent; ?> <?php echo $this->item->event->K2AfterDisplayContent; ?>
<?php
if(
$params->get('itemPrintButton') ||
$params->get('itemEmailButton') ||
$params->get('itemSocialButton') ||
$params->get('itemVideoAnchor') ||
$params->get('itemImageGalleryAnchor') ||
$params->get('itemHits') ||
$params->get('itemCategory') ||
$params->get('itemTags') ||
$params->get('itemRating')
) :
?>
<aside class="itemAsideInfo">
<ul>
<?php if($params->get('itemCategory')): ?>
<li class="itemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a> </li>
<?php endif; ?>
<?php if($params->get('itemHits')): ?>
<li class="itemHits"> <?php echo JText::_('K2_READ'); ?> <?php echo $this->item->hits; ?> <?php echo JText::_('K2_TIMES'); ?> </li>
<?php endif; ?>
<?php if($params->get('itemPrintButton') && !JRequest::getInt('print')): ?>
<li class="itemPrint"> <a rel="nofollow" href="<?php echo $this->item->printLink; ?>" onclick="window.open(this.href,'printWindow','width=900,height=600,location=no,menubar=no,resizable=yes,scrollbars=yes'); return false;"> <?php echo JText::_('K2_PRINT'); ?> </a> </li>
<?php endif; ?>
<?php if($params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
<li class="itemEmail"> <a rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=350,location=no,menubar=no,resizable=no,scrollbars=no'); return false;"> <?php echo JText::_('K2_EMAIL'); ?> </a> </li>
<?php endif; ?>
<?php if($params->get('itemSocialButton') && !is_null($params->get('socialButtonCode', NULL))): ?>
<li class="itemSocial"> <?php echo $params->get('socialButtonCode'); ?> </li>
<?php endif; ?>
<?php if($params->get('itemVideoAnchor') && !empty($this->item->video)): ?>
<li class="itemVideo"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#itemVideoAnchor"><?php echo JText::_('K2_MEDIA'); ?></a> </li>
<?php endif; ?>
<?php if($params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?>
<li class="itemGallery"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#itemImageGalleryAnchor"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a> </li>
<?php endif; ?>
</ul>
<?php if($params->get('itemRating')): ?>
<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>
</div>
<?php endif; ?>
<?php if($params->get('itemTags') && count($this->item->tags)): ?>
<div class="itemTagsBlock">
<p><?php echo JText::_('K2_TAGGED_UNDER'); ?></p>
<?php foreach ($this->item->tags as $tag): ?>
<a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?>, </a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if($params->get('itemAuthorBlock') && empty($this->item->created_by_alias)): ?>
<div class="itemAuthBlock">
<?php if($params->get('itemAuthorImage') && !empty($this->item->author->avatar)):?>
<img src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" />
<?php endif; ?>
<h4> <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a> </h4>
<?php if($params->get('itemAuthorURL') && !empty($this->item->author->profile->url)):?>
<a rel="me" href="<?php echo $this->item->author->profile->url; ?>" target="_blank" rel="nofollow"> <?php echo str_replace('http://','',$this->item->author->profile->url); ?> </a>
<?php endif; ?>
<?php if($params->get('itemAuthorEmail')):?>
<?php echo JHTML::_('Email.cloak', $this->item->author->email); ?>
<?php endif; ?>
<?php echo $this->item->event->K2UserDisplay; ?>
</div>
<?php endif; ?>
</aside>
<?php endif; ?>
<?php if(
$params->get('itemTwitterButton',1) ||
$params->get('itemFacebookButton',1) ||
$params->get('itemGooglePlusOneButton',1) ||
$params->get('itemAttachments')
): ?>
<div class="itemLinks">
article#k2Container aside.itemAsideInfo {display: none;}
article#k2Container .itemBody {margin-left: 0px !important;}
article#k2Container aside.itemAsideInfo {display: none;}
article#k2Container .itemBody {margin-left: 0px !important;}
object, iframe {
max-width: 100%;
}
#k2Container #itemListLeading div.itemContainer {width: 99.9%}
Cyberek wrote:Its quite hard thing to do.
1. In file:
templates/gk_news/html/com_k2/templates/default/item.php
You need to move itemAsideInfo block of code so it looks this way:
- Code: Select all
<span class="itemImageCredits"><?php echo $this->item->image_credits; ?></span>
<?php endif; ?>
<?php endif; ?>
<div class="itemBody">
<?php echo $this->item->event->BeforeDisplayContent; ?> <?php echo $this->item->event->K2BeforeDisplayContent; ?>
<?php if(!empty($this->item->fulltext)): ?>
<?php if($params->get('itemIntroText')): ?>
<div class="itemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if($params->get('itemFullText')): ?>
<div class="itemFullText">
<?php echo (!empty($this->item->fulltext)) ? $this->item->fulltext : $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php echo $this->item->event->AfterDisplay; ?> <?php echo $this->item->event->K2AfterDisplay; ?>
</div>
<?php if(($params->get('itemDateModified') && intval($this->item->modified)!=0)): ?>
<div class="itemBottom">
<?php if($params->get('itemDateModified') && intval($this->item->modified) != 0 && $this->item->created != $this->item->modified): ?>
<small class="itemDateModified"> <?php echo JText::_('K2_LAST_MODIFIED_ON') . JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?> </small>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
<div class="itemExtraFields">
<h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>
<ul>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != ''): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
<?php if($extraField->type == 'header'): ?>
<h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span> <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php echo $this->item->event->AfterDisplayContent; ?> <?php echo $this->item->event->K2AfterDisplayContent; ?>
<?php
if(
$params->get('itemPrintButton') ||
$params->get('itemEmailButton') ||
$params->get('itemSocialButton') ||
$params->get('itemVideoAnchor') ||
$params->get('itemImageGalleryAnchor') ||
$params->get('itemHits') ||
$params->get('itemCategory') ||
$params->get('itemTags') ||
$params->get('itemRating')
) :
?>
<aside class="itemAsideInfo">
<ul>
<?php if($params->get('itemCategory')): ?>
<li class="itemCategory"> <span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span> <a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a> </li>
<?php endif; ?>
<?php if($params->get('itemHits')): ?>
<li class="itemHits"> <?php echo JText::_('K2_READ'); ?> <?php echo $this->item->hits; ?> <?php echo JText::_('K2_TIMES'); ?> </li>
<?php endif; ?>
<?php if($params->get('itemPrintButton') && !JRequest::getInt('print')): ?>
<li class="itemPrint"> <a rel="nofollow" href="<?php echo $this->item->printLink; ?>" onclick="window.open(this.href,'printWindow','width=900,height=600,location=no,menubar=no,resizable=yes,scrollbars=yes'); return false;"> <?php echo JText::_('K2_PRINT'); ?> </a> </li>
<?php endif; ?>
<?php if($params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
<li class="itemEmail"> <a rel="nofollow" href="<?php echo $this->item->emailLink; ?>" onclick="window.open(this.href,'emailWindow','width=400,height=350,location=no,menubar=no,resizable=no,scrollbars=no'); return false;"> <?php echo JText::_('K2_EMAIL'); ?> </a> </li>
<?php endif; ?>
<?php if($params->get('itemSocialButton') && !is_null($params->get('socialButtonCode', NULL))): ?>
<li class="itemSocial"> <?php echo $params->get('socialButtonCode'); ?> </li>
<?php endif; ?>
<?php if($params->get('itemVideoAnchor') && !empty($this->item->video)): ?>
<li class="itemVideo"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#itemVideoAnchor"><?php echo JText::_('K2_MEDIA'); ?></a> </li>
<?php endif; ?>
<?php if($params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?>
<li class="itemGallery"> <a class="k2Anchor" href="<?php echo $this->item->link; ?>#itemImageGalleryAnchor"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a> </li>
<?php endif; ?>
</ul>
<?php if($params->get('itemRating')): ?>
<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>
</div>
<?php endif; ?>
<?php if($params->get('itemTags') && count($this->item->tags)): ?>
<div class="itemTagsBlock">
<p><?php echo JText::_('K2_TAGGED_UNDER'); ?></p>
<?php foreach ($this->item->tags as $tag): ?>
<a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?>, </a>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if($params->get('itemAuthorBlock') && empty($this->item->created_by_alias)): ?>
<div class="itemAuthBlock">
<?php if($params->get('itemAuthorImage') && !empty($this->item->author->avatar)):?>
<img src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" />
<?php endif; ?>
<h4> <a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a> </h4>
<?php if($params->get('itemAuthorURL') && !empty($this->item->author->profile->url)):?>
<a rel="me" href="<?php echo $this->item->author->profile->url; ?>" target="_blank" rel="nofollow"> <?php echo str_replace('http://','',$this->item->author->profile->url); ?> </a>
<?php endif; ?>
<?php if($params->get('itemAuthorEmail')):?>
<?php echo JHTML::_('Email.cloak', $this->item->author->email); ?>
<?php endif; ?>
<?php echo $this->item->event->K2UserDisplay; ?>
</div>
<?php endif; ?>
</aside>
<?php endif; ?>
<?php if(
$params->get('itemTwitterButton',1) ||
$params->get('itemFacebookButton',1) ||
$params->get('itemGooglePlusOneButton',1) ||
$params->get('itemAttachments')
): ?>
<div class="itemLinks">
After that the whole element will move down, but You need to adjust css of that element to suit your needs.