first commit

This commit is contained in:
alazhar
2020-01-02 22:20:31 +07:00
commit 10eb3340ad
5753 changed files with 631345 additions and 0 deletions

View File

@ -0,0 +1,264 @@
<?php
/**
* @version $Id: category.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<!-- Start K2 Category Layout -->
<div id="k2Container" class="itemListView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">
<?php if($this->params->get('show_page_title')): ?>
<!-- Page title -->
<div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>
<?php if($this->params->get('catFeedIcon')): ?>
<!-- RSS feed icon -->
<div class="k2FeedIcon">
<a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>">
<span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span>
</a>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if(isset($this->category) || ( $this->params->get('subCategories') && isset($this->subCategories) && count($this->subCategories) )): ?>
<!-- Blocks for current category and subcategories -->
<div class="itemListCategoriesBlock">
<?php if(isset($this->category) && ( $this->params->get('catImage') || $this->params->get('catTitle') || $this->params->get('catDescription') || $this->category->event->K2CategoryDisplay )): ?>
<!-- Category block -->
<div class="itemListCategory">
<?php if(isset($this->addLink)): ?>
<!-- Item add link -->
<span class="catItemAddLink">
<a class="modal" rel="{handler:'iframe',size:{x:990,y:650}}" href="<?php echo $this->addLink; ?>">
<?php echo JText::_('K2_ADD_A_NEW_ITEM_IN_THIS_CATEGORY'); ?>
</a>
</span>
<?php endif; ?>
<?php if($this->params->get('catImage') && $this->category->image): ?>
<!-- Category image -->
<img alt="<?php echo K2HelperUtilities::cleanHtml($this->category->name); ?>" src="<?php echo $this->category->image; ?>" style="width:<?php echo $this->params->get('catImageWidth'); ?>px; height:auto;" />
<?php endif; ?>
<?php if($this->params->get('catTitle')): ?>
<!-- Category title -->
<h2><?php echo $this->category->name; ?><?php if($this->params->get('catTitleItemCounter')) echo ' ('.$this->pagination->total.')'; ?></h2>
<?php endif; ?>
<?php if($this->params->get('catDescription')): ?>
<!-- Category description -->
<p><?php echo $this->category->description; ?></p>
<?php endif; ?>
<!-- K2 Plugins: K2CategoryDisplay -->
<?php echo $this->category->event->K2CategoryDisplay; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->params->get('subCategories') && isset($this->subCategories) && count($this->subCategories)): ?>
<!-- Subcategories -->
<div class="itemListSubCategories">
<h3><?php echo JText::_('K2_CHILDREN_CATEGORIES'); ?></h3>
<?php foreach($this->subCategories as $key=>$subCategory): ?>
<?php
// Define a CSS class for the last container on each row
if( (($key+1)%($this->params->get('subCatColumns'))==0))
$lastContainer= ' subCategoryContainerLast';
else
$lastContainer='';
?>
<div class="subCategoryContainer<?php echo $lastContainer; ?>"<?php echo (count($this->subCategories)==1) ? '' : ' style="width:'.number_format(100/$this->params->get('subCatColumns'), 1).'%;"'; ?>>
<div class="subCategory">
<?php if($this->params->get('subCatImage') && $subCategory->image): ?>
<!-- Subcategory image -->
<a class="subCategoryImage" href="<?php echo $subCategory->link; ?>">
<img alt="<?php echo K2HelperUtilities::cleanHtml($subCategory->name); ?>" src="<?php echo $subCategory->image; ?>" />
</a>
<?php endif; ?>
<?php if($this->params->get('subCatTitle')): ?>
<!-- Subcategory title -->
<h2>
<a href="<?php echo $subCategory->link; ?>">
<?php echo $subCategory->name; ?><?php if($this->params->get('subCatTitleItemCounter')) echo ' ('.$subCategory->numOfItems.')'; ?>
</a>
</h2>
<?php endif; ?>
<?php if($this->params->get('subCatDescription')): ?>
<!-- Subcategory description -->
<p><?php echo $subCategory->description; ?></p>
<?php endif; ?>
<!-- Subcategory more... -->
<a class="subCategoryMore" href="<?php echo $subCategory->link; ?>">
<?php echo JText::_('K2_VIEW_ITEMS'); ?>
</a>
<div class="clr"></div>
</div>
</div>
<?php if(($key+1)%($this->params->get('subCatColumns'))==0): ?>
<div class="clr"></div>
<?php endif; ?>
<?php endforeach; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if((isset($this->leading) || isset($this->primary) || isset($this->secondary) || isset($this->links)) && (count($this->leading) || count($this->primary) || count($this->secondary) || count($this->links))): ?>
<!-- Item list -->
<div class="itemList">
<?php if(isset($this->leading) && count($this->leading)): ?>
<!-- Leading items -->
<div id="itemListLeading">
<?php foreach($this->leading as $key=>$item): ?>
<?php
// Define a CSS class for the last container on each row
if( (($key+1)%($this->params->get('num_leading_columns'))==0) || count($this->leading)<$this->params->get('num_leading_columns') )
$lastContainer= ' itemContainerLast';
else
$lastContainer='';
?>
<div class="itemContainer<?php echo $lastContainer; ?>"<?php echo (count($this->leading)==1) ? '' : ' style="width:'.number_format(100/$this->params->get('num_leading_columns'), 1).'%;"'; ?>>
<?php
// Load category_item.php by default
$this->item=$item;
echo $this->loadTemplate('item');
?>
</div>
<?php if(($key+1)%($this->params->get('num_leading_columns'))==0): ?>
<div class="clr"></div>
<?php endif; ?>
<?php endforeach; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if(isset($this->primary) && count($this->primary)): ?>
<!-- Primary items -->
<div id="itemListPrimary">
<?php foreach($this->primary as $key=>$item): ?>
<?php
// Define a CSS class for the last container on each row
if( (($key+1)%($this->params->get('num_primary_columns'))==0) || count($this->primary)<$this->params->get('num_primary_columns') )
$lastContainer= ' itemContainerLast';
else
$lastContainer='';
?>
<div class="itemContainer<?php echo $lastContainer; ?>"<?php echo (count($this->primary)==1) ? '' : ' style="width:'.number_format(100/$this->params->get('num_primary_columns'), 1).'%;"'; ?>>
<?php
// Load category_item.php by default
$this->item=$item;
echo $this->loadTemplate('item');
?>
</div>
<?php if(($key+1)%($this->params->get('num_primary_columns'))==0): ?>
<div class="clr"></div>
<?php endif; ?>
<?php endforeach; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if(isset($this->secondary) && count($this->secondary)): ?>
<!-- Secondary items -->
<div id="itemListSecondary">
<?php foreach($this->secondary as $key=>$item): ?>
<?php
// Define a CSS class for the last container on each row
if( (($key+1)%($this->params->get('num_secondary_columns'))==0) || count($this->secondary)<$this->params->get('num_secondary_columns') )
$lastContainer= ' itemContainerLast';
else
$lastContainer='';
?>
<div class="itemContainer<?php echo $lastContainer; ?>"<?php echo (count($this->secondary)==1) ? '' : ' style="width:'.number_format(100/$this->params->get('num_secondary_columns'), 1).'%;"'; ?>>
<?php
// Load category_item.php by default
$this->item=$item;
echo $this->loadTemplate('item');
?>
</div>
<?php if(($key+1)%($this->params->get('num_secondary_columns'))==0): ?>
<div class="clr"></div>
<?php endif; ?>
<?php endforeach; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if(isset($this->links) && count($this->links)): ?>
<!-- Link items -->
<div id="itemListLinks">
<h4><?php echo JText::_('K2_MORE'); ?></h4>
<?php foreach($this->links as $key=>$item): ?>
<?php
// Define a CSS class for the last container on each row
if( (($key+1)%($this->params->get('num_links_columns'))==0) || count($this->links)<$this->params->get('num_links_columns') )
$lastContainer= ' itemContainerLast';
else
$lastContainer='';
?>
<div class="itemContainer<?php echo $lastContainer; ?>"<?php echo (count($this->links)==1) ? '' : ' style="width:'.number_format(100/$this->params->get('num_links_columns'), 1).'%;"'; ?>>
<?php
// Load category_item_links.php by default
$this->item=$item;
echo $this->loadTemplate('item_links');
?>
</div>
<?php if(($key+1)%($this->params->get('num_links_columns'))==0): ?>
<div class="clr"></div>
<?php endif; ?>
<?php endforeach; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
</div>
<!-- Pagination -->
<?php if(count($this->pagination->getPagesLinks())): ?>
<div class="k2Pagination">
<?php if($this->params->get('catPagination')) echo $this->pagination->getPagesLinks(); ?>
<div class="clr"></div>
<?php if($this->params->get('catPaginationResults')) echo $this->pagination->getPagesCounter(); ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- End K2 Category Layout -->

View File

@ -0,0 +1,300 @@
<?php
/**
* @version $Id: category_item.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
// Define default image size (do not change)
K2HelperUtilities::setDefaultImage($this->item, 'itemlist', $this->params);
?>
<!-- Start K2 Item Layout -->
<div class="catItemView group<?php echo ucfirst($this->item->itemGroup); ?><?php echo ($this->item->featured) ? ' catItemIsFeatured' : ''; ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>">
<!-- Plugins: BeforeDisplay -->
<?php echo $this->item->event->BeforeDisplay; ?>
<!-- K2 Plugins: K2BeforeDisplay -->
<?php echo $this->item->event->K2BeforeDisplay; ?>
<div class="catItemHeader">
<?php if($this->item->params->get('catItemDateCreated')): ?>
<!-- Date created -->
<span class="catItemDateCreated">
<?php echo JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php if($this->item->params->get('catItemTitle')): ?>
<!-- Item title -->
<h3 class="catItemTitle">
<?php if(isset($this->item->editLink)): ?>
<!-- Item edit link -->
<span class="catItemEditLink">
<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
<?php echo JText::_('K2_EDIT_ITEM'); ?>
</a>
</span>
<?php endif; ?>
<?php if ($this->item->params->get('catItemTitleLinked')): ?>
<a href="<?php echo $this->item->link; ?>">
<?php echo $this->item->title; ?>
</a>
<?php else: ?>
<?php echo $this->item->title; ?>
<?php endif; ?>
<?php if($this->item->params->get('catItemFeaturedNotice') && $this->item->featured): ?>
<!-- Featured flag -->
<span>
<sup>
<?php echo JText::_('K2_FEATURED'); ?>
</sup>
</span>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if($this->item->params->get('catItemAuthor')): ?>
<!-- Item Author -->
<span class="catItemAuthor">
<?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>
<?php if(isset($this->item->author->link) && $this->item->author->link): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
<?php else: ?>
<?php echo $this->item->author->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>
</div>
<!-- Plugins: AfterDisplayTitle -->
<?php echo $this->item->event->AfterDisplayTitle; ?>
<!-- K2 Plugins: K2AfterDisplayTitle -->
<?php echo $this->item->event->K2AfterDisplayTitle; ?>
<?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="#" 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>
<?php endif; ?>
<div class="catItemBody">
<!-- Plugins: BeforeDisplayContent -->
<?php echo $this->item->event->BeforeDisplayContent; ?>
<!-- K2 Plugins: K2BeforeDisplayContent -->
<?php echo $this->item->event->K2BeforeDisplayContent; ?>
<?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
<!-- Item Image -->
<div class="catItemImageBlock">
<span class="catItemImage">
<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
<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>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemIntroText')): ?>
<!-- Item introtext -->
<div class="catItemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php if($this->item->params->get('catItemExtraFields') && count($this->item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="catItemExtraFields">
<h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4>
<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="catItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="catItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
<span class="catItemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<!-- Plugins: AfterDisplayContent -->
<?php echo $this->item->event->AfterDisplayContent; ?>
<!-- K2 Plugins: K2AfterDisplayContent -->
<?php echo $this->item->event->K2AfterDisplayContent; ?>
<div class="clr"></div>
</div>
<?php if(
$this->item->params->get('catItemHits') ||
$this->item->params->get('catItemCategory') ||
$this->item->params->get('catItemTags') ||
$this->item->params->get('catItemAttachments')
): ?>
<div class="catItemLinks">
<?php if($this->item->params->get('catItemHits')): ?>
<!-- Item Hits -->
<div class="catItemHitsBlock">
<span class="catItemHits">
<?php echo JText::_('K2_READ'); ?> <b><?php echo $this->item->hits; ?></b> <?php echo JText::_('K2_TIMES'); ?>
</span>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemCategory')): ?>
<!-- Item category name -->
<div class="catItemCategory">
<span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
<a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemTags') && count($this->item->tags)): ?>
<!-- Item tags -->
<div class="catItemTagsBlock">
<span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span>
<ul class="catItemTags">
<?php foreach ($this->item->tags as $tag): ?>
<li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemAttachments') && count($this->item->attachments)): ?>
<!-- Item attachments -->
<div class="catItemAttachmentsBlock">
<span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span>
<ul class="catItemAttachments">
<?php foreach ($this->item->attachments as $attachment): ?>
<li>
<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>">
<?php echo $attachment->title ; ?>
</a>
<?php if($this->item->params->get('catItemAttachmentsCounter')): ?>
<span>(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php if($this->item->params->get('catItemVideo') && !empty($this->item->video)): ?>
<!-- Item video -->
<div class="catItemVideoBlock">
<h3><?php echo JText::_('K2_RELATED_VIDEO'); ?></h3>
<?php if($this->item->videoType=='embedded'): ?>
<div class="catItemVideoEmbedded">
<?php echo $this->item->video; ?>
</div>
<?php else: ?>
<span class="catItemVideo"><?php echo $this->item->video; ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('catItemImageGallery') && !empty($this->item->gallery)): ?>
<!-- Item image gallery -->
<div class="catItemImageGallery">
<h4><?php echo JText::_('K2_IMAGE_GALLERY'); ?></h4>
<?php echo $this->item->gallery; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php if($this->item->params->get('catItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
<!-- Anchor link to comments below -->
<div class="catItemCommentsLink">
<?php if(!empty($this->item->event->K2CommentsCounter)): ?>
<!-- K2 Plugins: K2CommentsCounter -->
<?php echo $this->item->event->K2CommentsCounter; ?>
<?php else: ?>
<?php if($this->item->numOfComments > 0): ?>
<a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo $this->item->numOfComments; ?> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
</a>
<?php else: ?>
<a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->item->params->get('catItemReadMore')): ?>
<!-- Item "read more..." link -->
<div class="catItemReadMore">
<a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
<?php echo JText::_('K2_READ_MORE'); ?>
</a>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php if($this->item->params->get('catItemDateModified')): ?>
<!-- Item date modified -->
<?php if($this->item->modified != $this->nullDate && $this->item->modified != $this->item->created ): ?>
<span class="catItemDateModified">
<?php echo JText::_('K2_LAST_MODIFIED_ON'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php endif; ?>
<!-- Plugins: AfterDisplay -->
<?php echo $this->item->event->AfterDisplay; ?>
<!-- K2 Plugins: K2AfterDisplay -->
<?php echo $this->item->event->K2AfterDisplay; ?>
<div class="clr"></div>
</div>
<!-- End K2 Item Layout -->

View File

@ -0,0 +1,46 @@
<?php
/**
* @version $Id: category_item_links.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
// Define default image size (do not change)
K2HelperUtilities::setDefaultImage($this->item, 'itemlist', $this->params);
?>
<!-- Start K2 Item Layout (links) -->
<div class="catItemView group<?php echo ucfirst($this->item->itemGroup); ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>">
<?php if($this->item->params->get('catItemTitle')): ?>
<!-- Item title -->
<h3 class="catItemTitle">
<?php if ($this->item->params->get('catItemTitleLinked')): ?>
<a href="<?php echo $this->item->link; ?>">
<?php echo $this->item->title; ?>
</a>
<?php else: ?>
<?php echo $this->item->title; ?>
<?php endif; ?>
</h3>
<?php if($this->item->params->get('catItemImage') && !empty($this->item->image)): ?>
<!-- Item Image -->
<div class="catItemImageBlock">
<span class="catItemImage">
<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
<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>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- End K2 Item Layout (links) -->

View File

@ -0,0 +1,685 @@
<?php
/**
* @version $Id: item.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<?php if(JRequest::getInt('print')==1): ?>
<!-- Print button at the top of the print page only -->
<a class="itemPrintThisPage" rel="nofollow" href="#" onclick="window.print();return false;">
<span><?php echo JText::_('K2_PRINT_THIS_PAGE'); ?></span>
</a>
<?php endif; ?>
<!-- Start K2 Item Layout -->
<span id="startOfPageId<?php echo JRequest::getInt('id'); ?>"></span>
<div id="k2Container" class="itemView<?php echo ($this->item->featured) ? ' itemIsFeatured' : ''; ?><?php if($this->item->params->get('pageclass_sfx')) echo ' '.$this->item->params->get('pageclass_sfx'); ?>">
<!-- Plugins: BeforeDisplay -->
<?php echo $this->item->event->BeforeDisplay; ?>
<!-- K2 Plugins: K2BeforeDisplay -->
<?php echo $this->item->event->K2BeforeDisplay; ?>
<div class="itemHeader">
<?php if($this->item->params->get('itemDateCreated')): ?>
<!-- Date created -->
<span class="itemDateCreated">
<?php echo JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php if($this->item->params->get('itemTitle')): ?>
<!-- Item title -->
<h2 class="itemTitle">
<?php if(isset($this->item->editLink)): ?>
<!-- Item edit link -->
<span class="itemEditLink">
<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->item->editLink; ?>">
<?php echo JText::_('K2_EDIT_ITEM'); ?>
</a>
</span>
<?php endif; ?>
<?php echo $this->item->title; ?>
<?php if($this->item->params->get('itemFeaturedNotice') && $this->item->featured): ?>
<!-- Featured flag -->
<span>
<sup>
<?php echo JText::_('K2_FEATURED'); ?>
</sup>
</span>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php if($this->item->params->get('itemAuthor')): ?>
<!-- Item Author -->
<span class="itemAuthor">
<?php echo K2HelperUtilities::writtenBy($this->item->author->profile->gender); ?>&nbsp;
<?php if(empty($this->item->created_by_alias)): ?>
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
<?php else: ?>
<?php echo $this->item->author->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>
</div>
<!-- Plugins: AfterDisplayTitle -->
<?php echo $this->item->event->AfterDisplayTitle; ?>
<!-- K2 Plugins: K2AfterDisplayTitle -->
<?php echo $this->item->event->K2AfterDisplayTitle; ?>
<?php if(
$this->item->params->get('itemFontResizer') ||
$this->item->params->get('itemPrintButton') ||
$this->item->params->get('itemEmailButton') ||
$this->item->params->get('itemSocialButton') ||
$this->item->params->get('itemVideoAnchor') ||
$this->item->params->get('itemImageGalleryAnchor') ||
$this->item->params->get('itemCommentsAnchor')
): ?>
<div class="itemToolbar">
<ul>
<?php if($this->item->params->get('itemFontResizer')): ?>
<!-- Font Resizer -->
<li>
<span class="itemTextResizerTitle"><?php echo JText::_('K2_FONT_SIZE'); ?></span>
<a href="#" id="fontDecrease">
<span><?php echo JText::_('K2_DECREASE_FONT_SIZE'); ?></span>
<img src="<?php echo JURI::root(true); ?>/components/com_k2/images/system/blank.gif" alt="<?php echo JText::_('K2_DECREASE_FONT_SIZE'); ?>" />
</a>
<a href="#" id="fontIncrease">
<span><?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?></span>
<img src="<?php echo JURI::root(true); ?>/components/com_k2/images/system/blank.gif" alt="<?php echo JText::_('K2_INCREASE_FONT_SIZE'); ?>" />
</a>
</li>
<?php endif; ?>
<?php if($this->item->params->get('itemPrintButton') && !JRequest::getInt('print')): ?>
<!-- Print Button -->
<li>
<a class="itemPrintLink" 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;">
<span><?php echo JText::_('K2_PRINT'); ?></span>
</a>
</li>
<?php endif; ?>
<?php if($this->item->params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
<!-- Email Button -->
<li>
<a class="itemEmailLink" 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;">
<span><?php echo JText::_('K2_EMAIL'); ?></span>
</a>
</li>
<?php endif; ?>
<?php if($this->item->params->get('itemSocialButton') && !is_null($this->item->params->get('socialButtonCode', NULL))): ?>
<!-- Item Social Button -->
<li>
<?php echo $this->item->params->get('socialButtonCode'); ?>
</li>
<?php endif; ?>
<?php if($this->item->params->get('itemVideoAnchor') && !empty($this->item->video)): ?>
<!-- Anchor link to item video below - if it exists -->
<li>
<a class="itemVideoLink k2Anchor" href="<?php echo $this->item->link; ?>#itemVideoAnchor"><?php echo JText::_('K2_MEDIA'); ?></a>
</li>
<?php endif; ?>
<?php if($this->item->params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?>
<!-- Anchor link to item image gallery below - if it exists -->
<li>
<a class="itemImageGalleryLink k2Anchor" href="<?php echo $this->item->link; ?>#itemImageGalleryAnchor"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a>
</li>
<?php endif; ?>
<?php if($this->item->params->get('itemCommentsAnchor') && $this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
<!-- Anchor link to comments below - if enabled -->
<li>
<?php if(!empty($this->item->event->K2CommentsCounter)): ?>
<!-- K2 Plugins: K2CommentsCounter -->
<?php echo $this->item->event->K2CommentsCounter; ?>
<?php else: ?>
<?php if($this->item->numOfComments > 0): ?>
<a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
</a>
<?php else: ?>
<a class="itemCommentsLink k2Anchor" href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</li>
<?php endif; ?>
</ul>
<div class="clr"></div>
</div>
<?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>
<?php endif; ?>
<div class="itemBody">
<!-- Plugins: BeforeDisplayContent -->
<?php echo $this->item->event->BeforeDisplayContent; ?>
<!-- K2 Plugins: K2BeforeDisplayContent -->
<?php echo $this->item->event->K2BeforeDisplayContent; ?>
<?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; ?>
<?php if(!empty($this->item->fulltext)): ?>
<?php if($this->item->params->get('itemIntroText')): ?>
<!-- Item introtext -->
<div class="itemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemFullText')): ?>
<!-- Item fulltext -->
<div class="itemFullText">
<?php echo $this->item->fulltext; ?>
</div>
<?php endif; ?>
<?php else: ?>
<!-- Item text -->
<div class="itemFullText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
<!-- 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 class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemHits') || ($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0)): ?>
<div class="itemContentFooter">
<?php if($this->item->params->get('itemHits')): ?>
<!-- Item Hits -->
<span class="itemHits">
<?php echo JText::_('K2_READ'); ?> <b><?php echo $this->item->hits; ?></b> <?php echo JText::_('K2_TIMES'); ?>
</span>
<?php endif; ?>
<?php if($this->item->params->get('itemDateModified') && intval($this->item->modified)!=0): ?>
<!-- Item date modified -->
<span class="itemDateModified">
<?php echo JText::_('K2_LAST_MODIFIED_ON'); ?> <?php echo JHTML::_('date', $this->item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<!-- Plugins: AfterDisplayContent -->
<?php echo $this->item->event->AfterDisplayContent; ?>
<!-- K2 Plugins: K2AfterDisplayContent -->
<?php echo $this->item->event->K2AfterDisplayContent; ?>
<div class="clr"></div>
</div>
<?php if($this->item->params->get('itemTwitterButton',1) || $this->item->params->get('itemFacebookButton',1) || $this->item->params->get('itemGooglePlusOneButton',1)): ?>
<!-- Social sharing -->
<div class="itemSocialSharing">
<?php if($this->item->params->get('itemTwitterButton',1)): ?>
<!-- Twitter Button -->
<div class="itemTwitterButton">
<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal"<?php if($this->item->params->get('twitterUsername')): ?> data-via="<?php echo $this->item->params->get('twitterUsername'); ?>"<?php endif; ?>>
<?php echo JText::_('K2_TWEET'); ?>
</a>
<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemFacebookButton',1)): ?>
<!-- Facebook Button -->
<div class="itemFacebookButton">
<div id="fb-root"></div>
<script type="text/javascript">
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-like" data-send="false" data-width="200" data-show-faces="true"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemGooglePlusOneButton',1)): ?>
<!-- Google +1 Button -->
<div class="itemGooglePlusOneButton">
<g:plusone annotation="inline" width="120"></g:plusone>
<script type="text/javascript">
(function() {
window.___gcfg = {lang: 'en'}; // Define button default language here
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemCategory') || $this->item->params->get('itemTags') || $this->item->params->get('itemAttachments')): ?>
<div class="itemLinks">
<?php if($this->item->params->get('itemCategory')): ?>
<!-- Item category -->
<div 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>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemTags') && count($this->item->tags)): ?>
<!-- Item tags -->
<div class="itemTagsBlock">
<span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span>
<ul class="itemTags">
<?php foreach ($this->item->tags as $tag): ?>
<li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemAttachments') && count($this->item->attachments)): ?>
<!-- Item attachments -->
<div class="itemAttachmentsBlock">
<span><?php echo JText::_('K2_DOWNLOAD_ATTACHMENTS'); ?></span>
<ul class="itemAttachments">
<?php foreach ($this->item->attachments as $attachment): ?>
<li>
<a title="<?php echo K2HelperUtilities::cleanHtml($attachment->titleAttribute); ?>" href="<?php echo $attachment->link; ?>"><?php echo $attachment->title; ?></a>
<?php if($this->item->params->get('itemAttachmentsCounter')): ?>
<span>(<?php echo $attachment->hits; ?> <?php echo ($attachment->hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)</span>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemAuthorBlock') && empty($this->item->created_by_alias)): ?>
<!-- Author Block -->
<div class="itemAuthorBlock">
<?php if($this->item->params->get('itemAuthorImage') && !empty($this->item->author->avatar)): ?>
<img class="itemAuthorAvatar" src="<?php echo $this->item->author->avatar; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($this->item->author->name); ?>" />
<?php endif; ?>
<div class="itemAuthorDetails">
<h3 class="itemAuthorName">
<a rel="author" href="<?php echo $this->item->author->link; ?>"><?php echo $this->item->author->name; ?></a>
</h3>
<?php if($this->item->params->get('itemAuthorDescription') && !empty($this->item->author->profile->description)): ?>
<p><?php echo $this->item->author->profile->description; ?></p>
<?php endif; ?>
<?php if($this->item->params->get('itemAuthorURL') && !empty($this->item->author->profile->url)): ?>
<span class="itemAuthorUrl"><?php echo JText::_('K2_WEBSITE'); ?> <a rel="me" href="<?php echo $this->item->author->profile->url; ?>" target="_blank"><?php echo str_replace('http://','',$this->item->author->profile->url); ?></a></span>
<?php endif; ?>
<?php if($this->item->params->get('itemAuthorEmail')): ?>
<span class="itemAuthorEmail"><?php echo JText::_('K2_EMAIL'); ?> <?php echo JHTML::_('Email.cloak', $this->item->author->email); ?></span>
<?php endif; ?>
<div class="clr"></div>
<!-- K2 Plugins: K2UserDisplay -->
<?php echo $this->item->event->K2UserDisplay; ?>
</div>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemAuthorLatest') && empty($this->item->created_by_alias) && isset($this->authorLatestItems)): ?>
<!-- Latest items from author -->
<div class="itemAuthorLatest">
<h3><?php echo JText::_('K2_LATEST_FROM'); ?> <?php echo $this->item->author->name; ?></h3>
<ul>
<?php foreach($this->authorLatestItems as $key=>$item): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
</li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php
/*
Note regarding 'Related Items'!
If you add:
- the CSS rule 'overflow-x:scroll;' in the element div.itemRelated {…} in the k2.css
- the class 'k2Scroller' to the ul element below
- the classes 'k2ScrollerElement' and 'k2EqualHeights' to the li element inside the foreach loop below
- the style attribute 'style="width:<?php echo $item->imageWidth; ?>px;"' to the li element inside the foreach loop below
...then your Related Items will be transformed into a vertical-scrolling block, inside which, all items have the same height (equal column heights). This can be very useful if you want to show your related articles or products with title/author/category/image etc., which would take a significant amount of space in the classic list-style display.
*/
?>
<?php if($this->item->params->get('itemRelated') && isset($this->relatedItems)): ?>
<!-- Related items by tag -->
<div class="itemRelated">
<h3><?php echo JText::_("K2_RELATED_ITEMS_BY_TAG"); ?></h3>
<ul>
<?php foreach($this->relatedItems as $key=>$item): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; ?>">
<?php if($this->item->params->get('itemRelatedTitle', 1)): ?>
<a class="itemRelTitle" href="<?php echo $item->link ?>"><?php echo $item->title; ?></a>
<?php endif; ?>
<?php if($this->item->params->get('itemRelatedCategory')): ?>
<div class="itemRelCat"><?php echo JText::_("K2_IN"); ?> <a href="<?php echo $item->category->link ?>"><?php echo $item->category->name; ?></a></div>
<?php endif; ?>
<?php if($this->item->params->get('itemRelatedAuthor')): ?>
<div class="itemRelAuthor"><?php echo JText::_("K2_BY"); ?> <a rel="author" href="<?php echo $item->author->link; ?>"><?php echo $item->author->name; ?></a></div>
<?php endif; ?>
<?php if($this->item->params->get('itemRelatedImageSize')): ?>
<img style="width:<?php echo $item->imageWidth; ?>px;height:auto;" class="itemRelImg" src="<?php echo $item->image; ?>" alt="<?php K2HelperUtilities::cleanHtml($item->title); ?>" />
<?php endif; ?>
<?php if($this->item->params->get('itemRelatedIntrotext')): ?>
<div class="itemRelIntrotext"><?php echo $item->introtext; ?></div>
<?php endif; ?>
<?php if($this->item->params->get('itemRelatedFulltext')): ?>
<div class="itemRelFulltext"><?php echo $item->fulltext; ?></div>
<?php endif; ?>
<?php if($this->item->params->get('itemRelatedMedia')): ?>
<?php if($item->videoType=='embedded'): ?>
<div class="itemRelMediaEmbedded"><?php echo $item->video; ?></div>
<?php else: ?>
<div class="itemRelMedia"><?php echo $item->video; ?></div>
<?php endif; ?>
<?php endif; ?>
<?php if($this->item->params->get('itemRelatedImageGallery')): ?>
<div class="itemRelImageGallery"><?php echo $item->gallery; ?></div>
<?php endif; ?>
</li>
<?php endforeach; ?>
<li class="clr"></li>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php if($this->item->params->get('itemVideo') && !empty($this->item->video)): ?>
<!-- Item video -->
<a name="itemVideoAnchor" id="itemVideoAnchor"></a>
<div class="itemVideoBlock">
<h3><?php echo JText::_('K2_MEDIA'); ?></h3>
<?php if($this->item->videoType=='embedded'): ?>
<div class="itemVideoEmbedded">
<?php echo $this->item->video; ?>
</div>
<?php else: ?>
<span class="itemVideo"><?php echo $this->item->video; ?></span>
<?php endif; ?>
<?php if($this->item->params->get('itemVideoCaption') && !empty($this->item->video_caption)): ?>
<span class="itemVideoCaption"><?php echo $this->item->video_caption; ?></span>
<?php endif; ?>
<?php if($this->item->params->get('itemVideoCredits') && !empty($this->item->video_credits)): ?>
<span class="itemVideoCredits"><?php echo $this->item->video_credits; ?></span>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemImageGallery') && !empty($this->item->gallery)): ?>
<!-- Item image gallery -->
<a name="itemImageGalleryAnchor" id="itemImageGalleryAnchor"></a>
<div class="itemImageGallery">
<h3><?php echo JText::_('K2_IMAGE_GALLERY'); ?></h3>
<?php echo $this->item->gallery; ?>
</div>
<?php endif; ?>
<?php if($this->item->params->get('itemNavigation') && !JRequest::getCmd('print') && (isset($this->item->nextLink) || isset($this->item->previousLink))): ?>
<!-- Item navigation -->
<div class="itemNavigation">
<span class="itemNavigationTitle"><?php echo JText::_('K2_MORE_IN_THIS_CATEGORY'); ?></span>
<?php if(isset($this->item->previousLink)): ?>
<a class="itemPrevious" href="<?php echo $this->item->previousLink; ?>">
&laquo; <?php echo $this->item->previousTitle; ?>
</a>
<?php endif; ?>
<?php if(isset($this->item->nextLink)): ?>
<a class="itemNext" href="<?php echo $this->item->nextLink; ?>">
<?php echo $this->item->nextTitle; ?> &raquo;
</a>
<?php endif; ?>
</div>
<?php endif; ?>
<!-- Plugins: AfterDisplay -->
<?php echo $this->item->event->AfterDisplay; ?>
<!-- K2 Plugins: K2AfterDisplay -->
<?php echo $this->item->event->K2AfterDisplay; ?>
<?php if($this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1'))): ?>
<!-- K2 Plugins: K2CommentsBlock -->
<?php echo $this->item->event->K2CommentsBlock; ?>
<?php endif; ?>
<?php if($this->item->params->get('itemComments') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2')) && empty($this->item->event->K2CommentsBlock)): ?>
<!-- Item comments -->
<a name="itemCommentsAnchor" id="itemCommentsAnchor"></a>
<div class="itemComments">
<?php if($this->item->params->get('commentsFormPosition')=='above' && $this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?>
<!-- Item comments form -->
<div class="itemCommentsForm">
<?php echo $this->loadTemplate('comments_form'); ?>
</div>
<?php endif; ?>
<?php if($this->item->numOfComments>0 && $this->item->params->get('itemComments') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2'))): ?>
<!-- Item user comments -->
<h3 class="itemCommentsCounter">
<span><?php echo $this->item->numOfComments; ?></span> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
</h3>
<ul class="itemCommentsList">
<?php foreach ($this->item->comments as $key=>$comment): ?>
<li class="<?php echo ($key%2) ? "odd" : "even"; echo (!$this->item->created_by_alias && $comment->userID==$this->item->created_by) ? " authorResponse" : ""; echo($comment->published) ? '':' unpublishedComment'; ?>">
<span class="commentLink">
<a href="<?php echo $this->item->link; ?>#comment<?php echo $comment->id; ?>" name="comment<?php echo $comment->id; ?>" id="comment<?php echo $comment->id; ?>">
<?php echo JText::_('K2_COMMENT_LINK'); ?>
</a>
</span>
<?php if($comment->userImage): ?>
<img src="<?php echo $comment->userImage; ?>" alt="<?php echo JFilterOutput::cleanText($comment->userName); ?>" width="<?php echo $this->item->params->get('commenterImgWidth'); ?>" />
<?php endif; ?>
<span class="commentDate">
<?php echo JHTML::_('date', $comment->commentDate, JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<span class="commentAuthorName">
<?php echo JText::_('K2_POSTED_BY'); ?>
<?php if(!empty($comment->userLink)): ?>
<a href="<?php echo JFilterOutput::cleanText($comment->userLink); ?>" title="<?php echo JFilterOutput::cleanText($comment->userName); ?>" target="_blank" rel="nofollow">
<?php echo $comment->userName; ?>
</a>
<?php else: ?>
<?php echo $comment->userName; ?>
<?php endif; ?>
</span>
<p><?php echo $comment->commentText; ?></p>
<?php if($this->inlineCommentsModeration || ($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest)))): ?>
<span class="commentToolbar">
<?php if($this->inlineCommentsModeration): ?>
<?php if(!$comment->published): ?>
<a class="commentApproveLink" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=publish&commentID='.$comment->id.'&format=raw')?>"><?php echo JText::_('K2_APPROVE')?></a>
<?php endif; ?>
<a class="commentRemoveLink" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=remove&commentID='.$comment->id.'&format=raw')?>"><?php echo JText::_('K2_REMOVE')?></a>
<?php endif; ?>
<?php if($comment->published && ($this->params->get('commentsReporting')=='1' || ($this->params->get('commentsReporting')=='2' && !$this->user->guest))): ?>
<a class="modal" rel="{handler:'iframe',size:{x:560,y:480}}" href="<?php echo JRoute::_('index.php?option=com_k2&view=comments&task=report&commentID='.$comment->id)?>"><?php echo JText::_('K2_REPORT')?></a>
<?php endif; ?>
<?php if($comment->reportUserLink): ?>
<a class="k2ReportUserButton" href="<?php echo $comment->reportUserLink; ?>"><?php echo JText::_('K2_FLAG_AS_SPAMMER'); ?></a>
<?php endif; ?>
</span>
<?php endif; ?>
<div class="clr"></div>
</li>
<?php endforeach; ?>
</ul>
<div class="itemCommentsPagination">
<?php echo $this->pagination->getPagesLinks(); ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('commentsFormPosition')=='below' && $this->item->params->get('itemComments') && !JRequest::getInt('print') && ($this->item->params->get('comments') == '1' || ($this->item->params->get('comments') == '2' && K2HelperPermissions::canAddComment($this->item->catid)))): ?>
<!-- Item comments form -->
<div class="itemCommentsForm">
<?php echo $this->loadTemplate('comments_form'); ?>
</div>
<?php endif; ?>
<?php $user = JFactory::getUser(); if ($this->item->params->get('comments') == '2' && $user->guest): ?>
<div><?php echo JText::_('K2_LOGIN_TO_POST_COMMENTS'); ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if(!JRequest::getCmd('print')): ?>
<div class="itemBackToTop">
<a class="k2Anchor" href="<?php echo $this->item->link; ?>#startOfPageId<?php echo JRequest::getInt('id'); ?>">
<?php echo JText::_('K2_BACK_TO_TOP'); ?>
</a>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<!-- End K2 Item Layout -->

View File

@ -0,0 +1,54 @@
<?php
/**
* @version $Id: item_comments_form.php 1992 2013-07-04 16:36:38Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<h3><?php echo JText::_('K2_LEAVE_A_COMMENT') ?></h3>
<?php if($this->params->get('commentsFormNotes')): ?>
<p class="itemCommentsFormNotes">
<?php if($this->params->get('commentsFormNotesText')): ?>
<?php echo nl2br($this->params->get('commentsFormNotesText')); ?>
<?php else: ?>
<?php echo JText::_('K2_COMMENT_FORM_NOTES') ?>
<?php endif; ?>
</p>
<?php endif; ?>
<form action="<?php echo JURI::root(true); ?>/index.php" method="post" id="comment-form" class="form-validate">
<label class="formComment" for="commentText"><?php echo JText::_('K2_MESSAGE'); ?> *</label>
<textarea rows="20" cols="10" class="inputbox" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?>') this.value='';" name="commentText" id="commentText"><?php echo JText::_('K2_ENTER_YOUR_MESSAGE_HERE'); ?></textarea>
<label class="formName" for="userName"><?php echo JText::_('K2_NAME'); ?> *</label>
<input class="inputbox" type="text" name="userName" id="userName" value="<?php echo JText::_('K2_ENTER_YOUR_NAME'); ?>" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_NAME'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_NAME'); ?>') this.value='';" />
<label class="formEmail" for="commentEmail"><?php echo JText::_('K2_EMAIL'); ?> *</label>
<input class="inputbox" type="text" name="commentEmail" id="commentEmail" value="<?php echo JText::_('K2_ENTER_YOUR_EMAIL_ADDRESS'); ?>" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_EMAIL_ADDRESS'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_EMAIL_ADDRESS'); ?>') this.value='';" />
<label class="formUrl" for="commentURL"><?php echo JText::_('K2_WEBSITE_URL'); ?></label>
<input class="inputbox" type="text" name="commentURL" id="commentURL" value="<?php echo JText::_('K2_ENTER_YOUR_SITE_URL'); ?>" onblur="if(this.value=='') this.value='<?php echo JText::_('K2_ENTER_YOUR_SITE_URL'); ?>';" onfocus="if(this.value=='<?php echo JText::_('K2_ENTER_YOUR_SITE_URL'); ?>') this.value='';" />
<?php if($this->params->get('recaptcha') && ($this->user->guest || $this->params->get('recaptchaForRegistered', 1))): ?>
<label class="formRecaptcha"><?php echo JText::_('K2_ENTER_THE_TWO_WORDS_YOU_SEE_BELOW'); ?></label>
<div id="recaptcha"></div>
<?php endif; ?>
<input type="submit" class="button" id="submitCommentButton" value="<?php echo JText::_('K2_SUBMIT_COMMENT'); ?>" />
<span id="formLog"></span>
<input type="hidden" name="option" value="com_k2" />
<input type="hidden" name="view" value="item" />
<input type="hidden" name="task" value="comment" />
<input type="hidden" name="itemID" value="<?php echo JRequest::getInt('id'); ?>" />
<?php echo JHTML::_('form.token'); ?>
</form>

View File

@ -0,0 +1,951 @@
<?php
/**
* @version $Id: itemform.php 1982 2013-05-30 12:55:18Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
$document = JFactory::getDocument();
$document->addScriptDeclaration("
Joomla.submitbutton = function(pressbutton){
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
if (\$K2.trim(\$K2('#title').val()) == '') {
alert( '".JText::_('K2_ITEM_MUST_HAVE_A_TITLE', true)."' );
}
else if (\$K2.trim(\$K2('#catid').val()) == '0') {
alert( '".JText::_('K2_PLEASE_SELECT_A_CATEGORY', true)."' );
}
else {
syncExtraFieldsEditor();
var validation = validateExtraFields();
if(validation === true) {
\$K2('#selectedTags option').attr('selected', 'selected');
submitform( pressbutton );
}
}
}
");
?>
<form action="<?php echo JURI::root(true); ?>/index.php" enctype="multipart/form-data" method="post" name="adminForm" id="adminForm">
<?php if($this->mainframe->isSite()): ?>
<div id="k2FrontendContainer">
<div id="k2Frontend">
<table class="k2FrontendToolbar" cellpadding="2" cellspacing="4">
<tr>
<td id="toolbar-save" class="button">
<a class="toolbar" href="#" onclick="Joomla.submitbutton('save'); return false;"> <span title="<?php echo JText::_('K2_SAVE'); ?>" class="icon-32-save icon-save"></span> <?php echo JText::_('K2_SAVE'); ?> </a>
</td>
<td id="toolbar-cancel" class="button">
<a class="toolbar" href="#"> <span title="<?php echo JText::_('K2_CANCEL'); ?>" class="icon-32-cancel icon-cancel"></span> <?php echo JText::_('K2_CLOSE'); ?> </a>
</td>
</tr>
</table>
<div id="k2FrontendEditToolbar">
<h2 class="header icon-48-k2">
<?php echo (JRequest::getInt('cid')) ? JText::_('K2_EDIT_ITEM') : JText::_('K2_ADD_ITEM'); ?>
</h2>
</div>
<div class="clr"></div>
<hr class="sep" />
<?php if(!$this->permissions->get('publish')): ?>
<div id="k2FrontendPermissionsNotice">
<p><?php echo JText::_('K2_FRONTEND_PERMISSIONS_NOTICE'); ?></p>
</div>
<?php endif; ?>
<?php endif; ?>
<div id="k2ToggleSidebarContainer"> <a href="#" id="k2ToggleSidebar"><?php echo JText::_('K2_TOGGLE_SIDEBAR'); ?></a> </div>
<table cellspacing="0" cellpadding="0" border="0" class="adminFormK2Container table">
<tbody>
<tr>
<td>
<table class="adminFormK2">
<tr>
<td class="adminK2LeftCol">
<label for="title"><?php echo JText::_('K2_TITLE'); ?></label>
</td>
<td class="adminK2RightCol">
<input class="text_area k2TitleBox" type="text" name="title" id="title" maxlength="250" value="<?php echo $this->row->title; ?>" />
</td>
</tr>
<tr>
<td class="adminK2LeftCol">
<label for="alias"><?php echo JText::_('K2_TITLE_ALIAS'); ?></label>
</td>
<td class="adminK2RightCol">
<input class="text_area k2TitleAliasBox" type="text" name="alias" id="alias" maxlength="250" value="<?php echo $this->row->alias; ?>" />
</td>
</tr>
<tr>
<td class="adminK2LeftCol">
<label><?php echo JText::_('K2_CATEGORY'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists['categories']; ?>
</td>
</tr>
<tr>
<td class="adminK2LeftCol">
<label><?php echo JText::_('K2_TAGS'); ?></label>
</td>
<td class="adminK2RightCol">
<?php if($this->params->get('taggingSystem')): ?>
<!-- Free tagging -->
<ul class="tags">
<?php if(isset($this->row->tags) && count($this->row->tags)): ?>
<?php foreach($this->row->tags as $tag): ?>
<li class="tagAdded">
<?php echo $tag->name; ?>
<span title="<?php echo JText::_('K2_CLICK_TO_REMOVE_TAG'); ?>" class="tagRemove">x</span>
<input type="hidden" name="tags[]" value="<?php echo $tag->name; ?>" />
</li>
<?php endforeach; ?>
<?php endif; ?>
<li class="tagAdd">
<input type="text" id="search-field" />
</li>
<li class="clr"></li>
</ul>
<span class="k2Note"> <?php echo JText::_('K2_WRITE_A_TAG_AND_PRESS_RETURN_OR_COMMA_TO_ADD_IT'); ?> </span>
<?php else: ?>
<!-- Selection based tagging -->
<?php if( !$this->params->get('lockTags') || $this->user->gid>23): ?>
<div style="float:left;">
<input type="text" name="tag" id="tag" />
<input type="button" id="newTagButton" value="<?php echo JText::_('K2_ADD'); ?>" />
</div>
<div id="tagsLog"></div>
<div class="clr"></div>
<span class="k2Note"> <?php echo JText::_('K2_WRITE_A_TAG_AND_PRESS_ADD_TO_INSERT_IT_TO_THE_AVAILABLE_TAGS_LISTNEW_TAGS_ARE_APPENDED_AT_THE_BOTTOM_OF_THE_AVAILABLE_TAGS_LIST_LEFT'); ?> </span>
<?php endif; ?>
<table cellspacing="0" cellpadding="0" border="0" id="tagLists">
<tr>
<td id="tagListsLeft">
<span><?php echo JText::_('K2_AVAILABLE_TAGS'); ?></span> <?php echo $this->lists['tags']; ?>
</td>
<td id="tagListsButtons">
<input type="button" id="addTagButton" value="<?php echo JText::_('K2_ADD'); ?> &raquo;" />
<br />
<br />
<input type="button" id="removeTagButton" value="&laquo; <?php echo JText::_('K2_REMOVE'); ?>" />
</td>
<td id="tagListsRight">
<span><?php echo JText::_('K2_SELECTED_TAGS'); ?></span> <?php echo $this->lists['selectedTags']; ?>
</td>
</tr>
</table>
<?php endif; ?>
</td>
</tr>
<?php if($this->mainframe->isAdmin() || ($this->mainframe->isSite() && $this->permissions->get('publish'))): ?>
<tr>
<td class="adminK2LeftCol">
<label for="featured"><?php echo JText::_('K2_IS_IT_FEATURED'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists['featured']; ?>
</td>
</tr>
<tr>
<td class="adminK2LeftCol">
<label><?php echo JText::_('K2_PUBLISHED'); ?></label>
</td>
<td class="adminK2RightCol">
<?php echo $this->lists['published']; ?>
</td>
</tr>
<?php endif; ?>
</table>
<ul id="k2ExtraFieldsValidationResults"></ul>
<!-- Tabs start here -->
<div class="simpleTabs" id="k2Tabs">
<ul class="simpleTabsNavigation">
<li id="tabContent"><a href="#k2Tab1"><?php echo JText::_('K2_CONTENT'); ?></a></li>
<?php if ($this->params->get('showImageTab')): ?>
<li id="tabImage"><a href="#k2Tab2"><?php echo JText::_('K2_IMAGE'); ?></a></li>
<?php endif; ?>
<?php if ($this->params->get('showImageGalleryTab')): ?>
<li id="tabImageGallery"><a href="#k2Tab3"><?php echo JText::_('K2_IMAGE_GALLERY'); ?></a></li>
<?php endif; ?>
<?php if ($this->params->get('showVideoTab')): ?>
<li id="tabVideo"><a href="#k2Tab4"><?php echo JText::_('K2_MEDIA'); ?></a></li>
<?php endif; ?>
<?php if ($this->params->get('showExtraFieldsTab')): ?>
<li id="tabExtraFields"><a href="#k2Tab5"><?php echo JText::_('K2_EXTRA_FIELDS'); ?></a></li>
<?php endif; ?>
<?php if ($this->params->get('showAttachmentsTab')): ?>
<li id="tabAttachments"><a href="#k2Tab6"><?php echo JText::_('K2_ATTACHMENTS'); ?></a></li>
<?php endif; ?>
<?php if(count(array_filter($this->K2PluginsItemOther)) && $this->params->get('showK2Plugins')): ?>
<li id="tabPlugins"><a href="#k2Tab7"><?php echo JText::_('K2_PLUGINS'); ?></a></li>
<?php endif; ?>
</ul>
<!-- Tab content -->
<div class="simpleTabsContent" id="k2Tab1">
<?php if($this->params->get('mergeEditors')): ?>
<div class="k2ItemFormEditor"> <?php echo $this->text; ?>
<div class="dummyHeight"></div>
<div class="clr"></div>
</div>
<?php else: ?>
<div class="k2ItemFormEditor"> <span class="k2ItemFormEditorTitle"> <?php echo JText::_('K2_INTROTEXT_TEASER_CONTENTEXCERPT'); ?> </span> <?php echo $this->introtext; ?>
<div class="dummyHeight"></div>
<div class="clr"></div>
</div>
<div class="k2ItemFormEditor"> <span class="k2ItemFormEditorTitle"> <?php echo JText::_('K2_FULLTEXT_MAIN_CONTENT'); ?> </span> <?php echo $this->fulltext; ?>
<div class="dummyHeight"></div>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if (count($this->K2PluginsItemContent)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemContent as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php if ($this->params->get('showImageTab')): ?>
<!-- Tab image -->
<div class="simpleTabsContent" id="k2Tab2">
<table class="admintable">
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ITEM_IMAGE'); ?>
</td>
<td>
<input type="file" name="image" class="fileUpload" />
<i>(<?php echo JText::_('K2_MAX_UPLOAD_SIZE'); ?>: <?php echo ini_get('upload_max_filesize'); ?>)</i>
<br />
<br />
<input type="text" name="existingImage" id="existingImageValue" class="text_area" readonly />
<input type="button" value="<?php echo JText::_('K2_BROWSE_SERVER'); ?>" id="k2ImageBrowseServer" />
<br />
<br />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ITEM_IMAGE_CAPTION'); ?>
</td>
<td>
<input type="text" name="image_caption" size="30" class="text_area" value="<?php echo $this->row->image_caption; ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ITEM_IMAGE_CREDITS'); ?>
</td>
<td>
<input type="text" name="image_credits" size="30" class="text_area" value="<?php echo $this->row->image_credits; ?>" />
</td>
</tr>
<?php if (!empty($this->row->image)): ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ITEM_IMAGE_PREVIEW'); ?>
</td>
<td>
<a class="modal" rel="{handler: 'image'}" href="<?php echo $this->row->image; ?>" title="<?php echo JText::_('K2_CLICK_ON_IMAGE_TO_PREVIEW_IN_ORIGINAL_SIZE'); ?>">
<img alt="<?php echo $this->row->title; ?>" src="<?php echo $this->row->thumb; ?>" class="k2AdminImage" />
</a>
<input type="checkbox" name="del_image" id="del_image" />
<label for="del_image"><?php echo JText::_('K2_CHECK_THIS_BOX_TO_DELETE_CURRENT_IMAGE_OR_JUST_UPLOAD_A_NEW_IMAGE_TO_REPLACE_THE_EXISTING_ONE'); ?></label>
</td>
</tr>
<?php endif; ?>
</table>
<?php if (count($this->K2PluginsItemImage)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemImage as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('showImageGalleryTab')): ?>
<!-- Tab image gallery -->
<div class="simpleTabsContent" id="k2Tab3">
<?php if ($this->lists['checkSIG']): ?>
<table class="admintable table" id="item_gallery_content">
<tr>
<td align="right" valign="top" class="key">
<?php echo JText::_('K2_COM_BE_ITEM_ITEM_IMAGE_GALLERY'); ?>
</td>
<td valign="top">
<?php if($this->sigPro): ?>
<a class="modal" rel="{handler: 'iframe', size: {x: 940, y: 560}}" href="index.php?option=com_sigpro&view=galleries&task=create&newFolder=<?php echo $this->sigProFolder; ?>&type=k2&tmpl=component&template=system"><?php echo JText::_('K2_COM_BE_ITEM_SIGPRO_UPLOAD'); ?></a> <i>(<?php echo JText::_('K2_COM_BE_ITEM_SIGPRO_UPLOAD_NOTE'); ?>)</i>
<input name="sigProFolder" type="hidden" value="<?php echo $this->sigProFolder; ?>" />
<br />
<br />
<?php echo JText::_('K2_OR'); ?>
<?php endif; ?>
<?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_WITH_IMAGES'); ?> <input type="file" name="gallery" class="fileUpload" /> <span class="hasTip k2GalleryNotice" title="<?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_HELP_HEADER'); ?>::<?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_HELP_TEXT'); ?>"><?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_HELP'); ?></span> <i>(<?php echo JText::_('K2_MAX_UPLOAD_SIZE'); ?>: <?php echo ini_get('upload_max_filesize'); ?>)</i>
<br />
<br />
<?php echo JText::_('K2_OR_ENTER_A_FLICKR_SET_URL'); ?><?php echo JText::_('K2_OR_ENTER_A_FLICKR_SET_URL'); ?>
<input type="text" name="flickrGallery" size="50" value="<?php echo ($this->row->galleryType == 'flickr') ? $this->row->galleryValue : ''; ?>" /> <span class="hasTip k2GalleryNotice" title="<?php echo JText::_('K2_VALID_FLICK_API_KEY_HELP_HEADER'); ?>::<?php echo JText::_('K2_VALID_FLICK_API_KEY_HELP_TEXT'); ?>"><?php echo JText::_('K2_UPLOAD_A_ZIP_FILE_HELP'); ?></span>
<?php if (!empty($this->row->gallery)): ?>
<!-- Preview -->
<div id="itemGallery">
<?php echo $this->row->gallery; ?>
<br />
<input type="checkbox" name="del_gallery" id="del_gallery" />
<label for="del_gallery"><?php echo JText::_('K2_CHECK_THIS_BOX_TO_DELETE_CURRENT_IMAGE_GALLERY_OR_JUST_UPLOAD_A_NEW_IMAGE_GALLERY_TO_REPLACE_THE_EXISTING_ONE'); ?></label>
</div>
<?php endif; ?>
</td>
</tr>
</table>
<?php else: ?>
<?php if (K2_JVERSION == '15'): ?>
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message fade">
<ul>
<li><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_SIMPLE_IMAGE_GALLERY_PRO_PLUGIN_IF_YOU_WANT_TO_USE_THE_IMAGE_GALLERY_FEATURES_OF_K2'); ?></li>
</ul>
</dd>
</dl>
<?php elseif(K2_JVERSION == '25'): ?>
<div id="system-message-container">
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message">
<ul>
<li><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_SIMPLE_IMAGE_GALLERY_PRO_PLUGIN_IF_YOU_WANT_TO_USE_THE_IMAGE_GALLERY_FEATURES_OF_K2'); ?></li>
</ul>
</dd>
</dl>
</div>
<?php else: ?>
<div class="alert">
<h4 class="alert-heading"><?php echo JText::_('K2_NOTICE'); ?></h4>
<div><p><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_SIMPLE_IMAGE_GALLERY_PRO_PLUGIN_IF_YOU_WANT_TO_USE_THE_IMAGE_GALLERY_FEATURES_OF_K2'); ?></p></div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (count($this->K2PluginsItemGallery)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemGallery as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('showVideoTab')): ?>
<!-- Tab video -->
<div class="simpleTabsContent" id="k2Tab4">
<?php if ($this->lists['checkAllVideos']): ?>
<table class="admintable" id="item_video_content">
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_SOURCE'); ?>
</td>
<td>
<div id="k2VideoTabs" class="simpleTabs">
<ul class="simpleTabsNavigation">
<li><a href="#k2VideoTab1"><?php echo JText::_('K2_UPLOAD'); ?></a></li>
<li><a href="#k2VideoTab2"><?php echo JText::_('K2_BROWSE_SERVERUSE_REMOTE_MEDIA'); ?></a></li>
<li><a href="#k2VideoTab3"><?php echo JText::_('K2_MEDIA_USE_ONLINE_VIDEO_SERVICE'); ?></a></li>
<li><a href="#k2VideoTab4"><?php echo JText::_('K2_EMBED'); ?></a></li>
</ul>
<div id="k2VideoTab1" class="simpleTabsContent">
<div class="panel" id="Upload_video">
<input type="file" name="video" class="fileUpload" />
<i>(<?php echo JText::_('K2_MAX_UPLOAD_SIZE'); ?>: <?php echo ini_get('upload_max_filesize'); ?>)</i> </div>
</div>
<div id="k2VideoTab2" class="simpleTabsContent">
<div class="panel" id="Remote_video"> <a id="k2MediaBrowseServer" href="index.php?option=com_k2&view=media&type=video&tmpl=component&fieldID=remoteVideo"><?php echo JText::_('K2_BROWSE_VIDEOS_ON_SERVER')?></a> <?php echo JText::_('K2_OR'); ?> <?php echo JText::_('K2_PASTE_REMOTE_VIDEO_URL'); ?>
<br />
<br />
<input type="text" size="50" name="remoteVideo" id="remoteVideo" value="<?php echo $this->lists['remoteVideo'] ?>" />
</div>
</div>
<div id="k2VideoTab3" class="simpleTabsContent">
<div class="panel" id="Video_from_provider"> <?php echo JText::_('K2_SELECT_VIDEO_PROVIDER'); ?> <?php echo $this->lists['providers']; ?> <br/><br/> <?php echo JText::_('K2_AND_ENTER_VIDEO_ID'); ?>
<input type="text" size="50" name="videoID" value="<?php echo $this->lists['providerVideo'] ?>" />
<br />
<br />
<a class="modal" rel="{handler: 'iframe', size: {x: 990, y: 600}}" href="http://www.joomlaworks.net/allvideos-documentation"><?php echo JText::_('K2_READ_THE_ALLVIDEOS_DOCUMENTATION_FOR_MORE'); ?></a> </div>
</div>
<div id="k2VideoTab4" class="simpleTabsContent">
<div class="panel" id="embedVideo">
<?php echo JText::_('K2_PASTE_HTML_EMBED_CODE_BELOW'); ?>
<br />
<textarea name="embedVideo" rows="5" cols="50" class="textarea"><?php echo $this->lists['embedVideo']; ?></textarea>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_CAPTION'); ?>
</td>
<td>
<input type="text" name="video_caption" size="50" class="text_area" value="<?php echo $this->row->video_caption; ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_CREDITS'); ?>
</td>
<td>
<input type="text" name="video_credits" size="50" class="text_area" value="<?php echo $this->row->video_credits; ?>" />
</td>
</tr>
<?php if($this->row->video): ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_PREVIEW'); ?>
</td>
<td>
<?php echo $this->row->video; ?>
<br />
<input type="checkbox" name="del_video" id="del_video" />
<label for="del_video"><?php echo JText::_('K2_CHECK_THIS_BOX_TO_DELETE_CURRENT_VIDEO_OR_USE_THE_FORM_ABOVE_TO_REPLACE_THE_EXISTING_ONE'); ?></label>
</td>
</tr>
<?php endif; ?>
</table>
<?php else: ?>
<?php if (K2_JVERSION == '15'): ?>
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message fade">
<ul>
<li><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_ALLVIDEOS_PLUGIN_IF_YOU_WANT_TO_USE_THE_FULL_VIDEO_FEATURES_OF_K2'); ?></li>
</ul>
</dd>
</dl>
<?php elseif(K2_JVERSION == '25'): ?>
<div id="system-message-container">
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message">
<ul>
<li><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_ALLVIDEOS_PLUGIN_IF_YOU_WANT_TO_USE_THE_FULL_VIDEO_FEATURES_OF_K2'); ?></li>
</ul>
</dd>
</dl>
</div>
<?php else: ?>
<div class="alert">
<h4 class="alert-heading"><?php echo JText::_('K2_NOTICE'); ?></h4>
<div><p><?php echo JText::_('K2_NOTICE_PLEASE_INSTALL_JOOMLAWORKS_ALLVIDEOS_PLUGIN_IF_YOU_WANT_TO_USE_THE_FULL_VIDEO_FEATURES_OF_K2'); ?></p></div>
</div>
<?php endif; ?>
<table class="admintable" id="item_video_content">
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_SOURCE'); ?>
</td>
<td>
<div id="k2VideoTabs" class="simpleTabs">
<ul class="simpleTabsNavigation">
<li><a href="#k2VideoTab4"><?php echo JText::_('K2_EMBED'); ?></a></li>
</ul>
<div class="simpleTabsContent" id="k2VideoTab4">
<div class="panel" id="embedVideo">
<?php echo JText::_('K2_PASTE_HTML_EMBED_CODE_BELOW'); ?>
<br />
<textarea name="embedVideo" rows="5" cols="50" class="textarea"><?php echo $this->lists['embedVideo']; ?></textarea>
</div>
</div>
</div>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_CAPTION'); ?>
</td>
<td>
<input type="text" name="video_caption" size="50" class="text_area" value="<?php echo $this->row->video_caption; ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_CREDITS'); ?>
</td>
<td>
<input type="text" name="video_credits" size="50" class="text_area" value="<?php echo $this->row->video_credits; ?>" />
</td>
</tr>
<?php if($this->row->video): ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_MEDIA_PREVIEW'); ?>
</td>
<td>
<?php echo $this->row->video; ?>
<br />
<input type="checkbox" name="del_video" id="del_video" />
<label for="del_video"><?php echo JText::_('K2_USE_THE_FORM_ABOVE_TO_REPLACE_THE_EXISTING_VIDEO_OR_CHECK_THIS_BOX_TO_DELETE_CURRENT_VIDEO'); ?></label>
</td>
</tr>
<?php endif; ?>
</table>
<?php endif; ?>
<?php if (count($this->K2PluginsItemVideo)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemVideo as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('showExtraFieldsTab')): ?>
<!-- Tab extra fields -->
<div class="simpleTabsContent" id="k2Tab5">
<div id="extraFieldsContainer">
<?php if (count($this->extraFields)): ?>
<table class="admintable" id="extraFields">
<?php foreach($this->extraFields as $extraField): ?>
<?php if($extraField->type == 'header'): ?>
<tr>
<td colspan="2" ><h4 class="k2ExtraFieldHeader"><?php echo $extraField->name; ?></h4></td>
</tr>
<?php else: ?>
<tr>
<td align="right" class="key">
<label for="K2ExtraField_<?php echo $extraField->id; ?>"><?php echo $extraField->name; ?></label>
</td>
<td>
<?php echo $extraField->element; ?>
</td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</table>
<?php else: ?>
<?php if (K2_JVERSION == '15'): ?>
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message fade">
<ul>
<li><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></li>
</ul>
</dd>
</dl>
<?php elseif (K2_JVERSION == '25'): ?>
<div id="system-message-container">
<dl id="system-message">
<dt class="notice"><?php echo JText::_('K2_NOTICE'); ?></dt>
<dd class="notice message">
<ul>
<li><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></li>
</ul>
</dd>
</dl>
</div>
<?php else: ?>
<div class="alert">
<h4 class="alert-heading"><?php echo JText::_('K2_NOTICE'); ?></h4>
<div>
<p><?php echo JText::_('K2_PLEASE_SELECT_A_CATEGORY_FIRST_TO_RETRIEVE_ITS_RELATED_EXTRA_FIELDS'); ?></p>
</div>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<?php if (count($this->K2PluginsItemExtraFields)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemExtraFields as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('showAttachmentsTab')): ?>
<!-- Tab attachements -->
<div class="simpleTabsContent" id="k2Tab6">
<div class="itemAttachments">
<?php if (count($this->row->attachments)): ?>
<table class="adminlist">
<tr>
<th>
<?php echo JText::_('K2_FILENAME'); ?>
</th>
<th>
<?php echo JText::_('K2_TITLE'); ?>
</th>
<th>
<?php echo JText::_('K2_TITLE_ATTRIBUTE'); ?>
</th>
<th>
<?php echo JText::_('K2_DOWNLOADS'); ?>
</th>
<th>
<?php echo JText::_('K2_OPERATIONS'); ?>
</th>
</tr>
<?php foreach($this->row->attachments as $attachment): ?>
<tr>
<td class="attachment_entry">
<?php echo $attachment->filename; ?>
</td>
<td>
<?php echo $attachment->title; ?>
</td>
<td>
<?php echo $attachment->titleAttribute; ?>
</td>
<td>
<?php echo $attachment->hits; ?>
</td>
<td>
<a href="<?php echo $attachment->link; ?>"><?php echo JText::_('K2_DOWNLOAD'); ?></a> <a class="deleteAttachmentButton" href="<?php echo JURI::base(true); ?>/index.php?option=com_k2&amp;view=item&amp;task=deleteAttachment&amp;id=<?php echo $attachment->id?>&amp;cid=<?php echo $this->row->id; ?>"><?php echo JText::_('K2_DELETE'); ?></a>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php endif; ?>
</div>
<div id="addAttachment">
<input type="button" id="addAttachmentButton" value="<?php echo JText::_('K2_ADD_ATTACHMENT_FIELD'); ?>" />
<i>(<?php echo JText::_('K2_MAX_UPLOAD_SIZE'); ?>: <?php echo ini_get('upload_max_filesize'); ?>)</i> </div>
<div id="itemAttachments"></div>
<?php if (count($this->K2PluginsItemAttachments)): ?>
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemAttachments as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if(count(array_filter($this->K2PluginsItemOther)) && $this->params->get('showK2Plugins')): ?>
<!-- Tab other plugins -->
<div class="simpleTabsContent" id="k2Tab7">
<div class="itemPlugins">
<?php foreach($this->K2PluginsItemOther as $K2Plugin): ?>
<?php if(!is_null($K2Plugin)): ?>
<fieldset>
<legend><?php echo $K2Plugin->name; ?></legend>
<?php echo $K2Plugin->fields; ?>
</fieldset>
<?php endif; ?>
<?php endforeach; ?>
</div>
</div>
<?php endif; ?>
</div>
<!-- Tabs end here -->
<input type="hidden" name="isSite" value="<?php echo (int)$this->mainframe->isSite(); ?>" />
<?php if($this->mainframe->isSite()): ?>
<input type="hidden" name="lang" value="<?php echo JRequest::getCmd('lang'); ?>" />
<?php endif; ?>
<input type="hidden" name="id" value="<?php echo $this->row->id; ?>" />
<input type="hidden" name="option" value="com_k2" />
<input type="hidden" name="view" value="item" />
<input type="hidden" name="task" value="<?php echo JRequest::getVar('task'); ?>" />
<input type="hidden" name="Itemid" value="<?php echo JRequest::getInt('Itemid'); ?>" />
<?php echo JHTML::_('form.token'); ?>
</td>
<td id="adminFormK2Sidebar"<?php if($this->mainframe->isSite() && !$this->params->get('sideBarDisplayFrontend')): ?> style="display:none;"<?php endif; ?> class="xmlParamsFields">
<?php if($this->row->id): ?>
<table class="sidebarDetails">
<tr>
<td>
<strong><?php echo JText::_('K2_ITEM_ID'); ?></strong>
</td>
<td>
<?php echo $this->row->id; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_PUBLISHED'); ?></strong>
</td>
<td>
<?php echo ($this->row->published > 0) ? JText::_('K2_YES') : JText::_('K2_NO'); ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_FEATURED'); ?></strong>
</td>
<td>
<?php echo ($this->row->featured > 0) ? JText::_('K2_YES'): JText::_('K2_NO'); ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_CREATED_DATE'); ?></strong>
</td>
<td>
<?php echo $this->lists['created']; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_CREATED_BY'); ?></strong>
</td>
<td>
<?php echo $this->row->author; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_MODIFIED_DATE'); ?></strong>
</td>
<td>
<?php echo $this->lists['modified']; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_MODIFIED_BY'); ?></strong>
</td>
<td>
<?php echo $this->row->moderator; ?>
</td>
</tr>
<tr>
<td>
<strong><?php echo JText::_('K2_HITS'); ?></strong>
</td>
<td>
<?php echo $this->row->hits; ?>
<?php if($this->row->hits): ?>
<input id="resetHitsButton" type="button" value="<?php echo JText::_('K2_RESET'); ?>" class="button" name="resetHits" />
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
<?php if($this->row->id): ?>
<tr>
<td>
<strong><?php echo JText::_('K2_RATING'); ?></strong>
</td>
<td>
<?php echo $this->row->ratingCount; ?> <?php echo JText::_('K2_VOTES'); ?>
<?php if($this->row->ratingCount): ?>
<br />
(<?php echo JText::_('K2_AVERAGE_RATING'); ?>: <?php echo number_format(($this->row->ratingSum/$this->row->ratingCount),2); ?>/5.00)
<?php endif; ?>
<input id="resetRatingButton" type="button" value="<?php echo JText::_('K2_RESET'); ?>" class="button" name="resetRating" />
</td>
</tr>
</table>
<?php endif; ?>
<div id="k2Accordion">
<h3><a href="#"><?php echo JText::_('K2_AUTHOR_PUBLISHING_STATUS'); ?></a></h3>
<div>
<table class="admintable">
<?php if(isset($this->lists['language'])): ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_LANGUAGE'); ?>
</td>
<td>
<?php echo $this->lists['language']; ?>
</td>
</tr>
<?php endif; ?>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_AUTHOR'); ?>
</td>
<td id="k2AuthorOptions">
<span id="k2Author"><?php echo $this->row->author; ?></span>
<?php if($this->mainframe->isAdmin() || ($this->mainframe->isSite() && $this->permissions->get('editAll'))): ?>
<a class="modal" rel="{handler:'iframe', size: {x: 800, y: 460}}" href="index.php?option=com_k2&amp;view=users&amp;task=element&amp;tmpl=component"><?php echo JText::_('K2_CHANGE'); ?></a>
<input type="hidden" name="created_by" value="<?php echo $this->row->created_by; ?>" />
<?php endif; ?>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_AUTHOR_ALIAS'); ?>
</td>
<td>
<input class="text_area" type="text" name="created_by_alias" maxlength="250" value="<?php echo $this->row->created_by_alias; ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ACCESS_LEVEL'); ?>
</td>
<td>
<?php echo $this->lists['access']; ?>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_CREATION_DATE'); ?>
</td>
<td class="k2ItemFormDateField">
<?php echo $this->lists['createdCalendar']; ?>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_START_PUBLISHING'); ?>
</td>
<td class="k2ItemFormDateField">
<?php echo $this->lists['publish_up']; ?>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_FINISH_PUBLISHING'); ?>
</td>
<td class="k2ItemFormDateField">
<?php echo $this->lists['publish_down']; ?>
</td>
</tr>
</table>
</div>
<h3><a href="#"><?php echo JText::_('K2_METADATA_INFORMATION'); ?></a></h3>
<div>
<table class="admintable">
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_DESCRIPTION'); ?>
</td>
<td>
<textarea name="metadesc" rows="5" cols="20"><?php echo $this->row->metadesc; ?></textarea>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_KEYWORDS'); ?>
</td>
<td>
<textarea name="metakey" rows="5" cols="20"><?php echo $this->row->metakey; ?></textarea>
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_ROBOTS'); ?>
</td>
<td>
<input type="text" name="meta[robots]" value="<?php echo $this->lists['metadata']->get('robots'); ?>" />
</td>
</tr>
<tr>
<td align="right" class="key">
<?php echo JText::_('K2_AUTHOR'); ?>
</td>
<td>
<input type="text" name="meta[author]" value="<?php echo $this->lists['metadata']->get('author'); ?>" />
</td>
</tr>
</table>
</div>
<?php if($this->mainframe->isAdmin()): ?>
<h3><a href="#"><?php echo JText::_('K2_ITEM_VIEW_OPTIONS_IN_CATEGORY_LISTINGS'); ?></a></h3>
<div>
<?php if(version_compare( JVERSION, '1.6.0', 'ge' )): ?>
<fieldset class="panelform">
<ul class="adminformlist">
<?php foreach($this->form->getFieldset('item-view-options-listings') as $field): ?>
<li>
<?php if($field->type=='header'): ?>
<div class="paramValueHeader"><?php echo $field->input; ?></div>
<?php elseif($field->type=='Spacer'): ?>
<div class="paramValueSpacer">&nbsp;</div>
<div class="clr"></div>
<?php else: ?>
<div class="paramLabel"><?php echo $field->label; ?></div>
<div class="paramValue"><?php echo $field->input; ?></div>
<div class="clr"></div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</fieldset>
<?php else: ?>
<?php echo $this->form->render('params', 'item-view-options-listings'); ?>
<?php endif; ?>
</div>
<h3><a href="#"><?php echo JText::_('K2_ITEM_VIEW_OPTIONS'); ?></a></h3>
<div>
<?php if(version_compare( JVERSION, '1.6.0', 'ge' )): ?>
<fieldset class="panelform">
<ul class="adminformlist">
<?php foreach($this->form->getFieldset('item-view-options') as $field): ?>
<li>
<?php if($field->type=='header'): ?>
<div class="paramValueHeader"><?php echo $field->input; ?></div>
<?php elseif($field->type=='Spacer'): ?>
<div class="paramValueSpacer">&nbsp;</div>
<div class="clr"></div>
<?php else: ?>
<div class="paramLabel"><?php echo $field->label; ?></div>
<div class="paramValue"><?php echo $field->input; ?></div>
<div class="clr"></div>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</fieldset>
<?php else: ?>
<?php echo $this->form->render('params', 'item-view-options'); ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($this->aceAclFlag): ?>
<h3><a href="#"><?php echo JText::_('AceACL') . ' ' . JText::_('COM_ACEACL_COMMON_PERMISSIONS'); ?></a></h3>
<div><?php AceaclApi::getWidget('com_k2.item.'.$this->row->id, true); ?></div>
<?php endif; ?>
</div>
</td>
</tr>
</tbody>
</table>
<div class="clr"></div>
<?php if($this->mainframe->isSite()): ?>
</div>
</div>
<?php endif; ?>
</form>

View File

@ -0,0 +1,160 @@
<?php
/**
* @version $Id: latest.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<!-- Start K2 Latest Layout -->
<div id="k2Container" class="latestView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">
<?php if($this->params->get('show_page_title')): ?>
<!-- Page title -->
<div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>
<?php foreach($this->blocks as $key=>$block): ?>
<div class="latestItemsContainer" style="width:<?php echo number_format(100/$this->params->get('latestItemsCols'), 1); ?>%;">
<?php if($this->source=='categories'): $category=$block; ?>
<?php if($this->params->get('categoryFeed') || $this->params->get('categoryImage') || $this->params->get('categoryTitle') || $this->params->get('categoryDescription')): ?>
<!-- Start K2 Category block -->
<div class="latestItemsCategory">
<?php if($this->params->get('categoryFeed')): ?>
<!-- RSS feed icon -->
<div class="k2FeedIcon">
<a href="<?php echo $category->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>">
<span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span>
</a>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if ($this->params->get('categoryImage') && !empty($category->image)): ?>
<div class="latestItemsCategoryImage">
<img src="<?php echo $category->image; ?>" alt="<?php echo K2HelperUtilities::cleanHtml($category->name); ?>" style="width:<?php echo $this->params->get('catImageWidth'); ?>px;height:auto;" />
</div>
<?php endif; ?>
<?php if ($this->params->get('categoryTitle')): ?>
<h2><a href="<?php echo $category->link; ?>"><?php echo $category->name; ?></a></h2>
<?php endif; ?>
<?php if ($this->params->get('categoryDescription') && isset($category->description)): ?>
<p><?php echo $category->description; ?></p>
<?php endif; ?>
<div class="clr"></div>
<!-- K2 Plugins: K2CategoryDisplay -->
<?php echo $category->event->K2CategoryDisplay; ?>
<div class="clr"></div>
</div>
<!-- End K2 Category block -->
<?php endif; ?>
<?php else: $user=$block; ?>
<?php if ($this->params->get('userFeed') || $this->params->get('userImage') || $this->params->get('userName') || $this->params->get('userDescription') || $this->params->get('userURL') || $this->params->get('userEmail')): ?>
<!-- Start K2 User block -->
<div class="latestItemsUser">
<?php if($this->params->get('userFeed')): ?>
<!-- RSS feed icon -->
<div class="k2FeedIcon">
<a href="<?php echo $user->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>">
<span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span>
</a>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if ($this->params->get('userImage') && !empty($user->avatar)): ?>
<img src="<?php echo $user->avatar; ?>" alt="<?php echo $user->name; ?>" style="width:<?php echo $this->params->get('userImageWidth'); ?>px;height:auto;" />
<?php endif; ?>
<?php if ($this->params->get('userName')): ?>
<h2><a rel="author" href="<?php echo $user->link; ?>"><?php echo $user->name; ?></a></h2>
<?php endif; ?>
<?php if ($this->params->get('userDescription') && isset($user->profile->description)): ?>
<p class="latestItemsUserDescription"><?php echo $user->profile->description; ?></p>
<?php endif; ?>
<?php if ($this->params->get('userURL') || $this->params->get('userEmail')): ?>
<p class="latestItemsUserAdditionalInfo">
<?php if ($this->params->get('userURL') && isset($user->profile->url)): ?>
<span class="latestItemsUserURL">
<?php echo JText::_('K2_WEBSITE_URL'); ?>: <a rel="me" href="<?php echo $user->profile->url; ?>" target="_blank"><?php echo $user->profile->url; ?></a>
</span>
<?php endif; ?>
<?php if ($this->params->get('userEmail')): ?>
<span class="latestItemsUserEmail">
<?php echo JText::_('K2_EMAIL'); ?>: <?php echo JHTML::_('Email.cloak', $user->email); ?>
</span>
<?php endif; ?>
</p>
<?php endif; ?>
<div class="clr"></div>
<?php echo $user->event->K2UserDisplay; ?>
<div class="clr"></div>
</div>
<!-- End K2 User block -->
<?php endif; ?>
<?php endif; ?>
<!-- Start Items list -->
<div class="latestItemList">
<?php if($this->params->get('latestItemsDisplayEffect')=="first"): ?>
<?php foreach ($block->items as $itemCounter=>$item): K2HelperUtilities::setDefaultImage($item, 'latest', $this->params); ?>
<?php if($itemCounter==0): ?>
<?php $this->item=$item; echo $this->loadTemplate('item'); ?>
<?php else: ?>
<h2 class="latestItemTitleList">
<?php if ($item->params->get('latestItemTitleLinked')): ?>
<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?>
</a>
<?php else: ?>
<?php echo $item->title; ?>
<?php endif; ?>
</h2>
<?php endif; ?>
<?php endforeach; ?>
<?php else: ?>
<?php foreach ($block->items as $item): K2HelperUtilities::setDefaultImage($item, 'latest', $this->params); ?>
<?php $this->item=$item; echo $this->loadTemplate('item'); ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
<!-- End Item list -->
</div>
<?php if(($key+1)%($this->params->get('latestItemsCols'))==0): ?>
<div class="clr"></div>
<?php endif; ?>
<?php endforeach; ?>
<div class="clr"></div>
</div>
<!-- End K2 Latest Layout -->

View File

@ -0,0 +1,167 @@
<?php
/**
* @version $Id: latest_item.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<!-- Start K2 Item Layout -->
<div class="latestItemView">
<!-- Plugins: BeforeDisplay -->
<?php echo $this->item->event->BeforeDisplay; ?>
<!-- K2 Plugins: K2BeforeDisplay -->
<?php echo $this->item->event->K2BeforeDisplay; ?>
<div class="latestItemHeader">
<?php if($this->item->params->get('latestItemTitle')): ?>
<!-- Item title -->
<h2 class="latestItemTitle">
<?php if ($this->item->params->get('latestItemTitleLinked')): ?>
<a href="<?php echo $this->item->link; ?>">
<?php echo $this->item->title; ?>
</a>
<?php else: ?>
<?php echo $this->item->title; ?>
<?php endif; ?>
</h2>
<?php endif; ?>
</div>
<?php if($this->item->params->get('latestItemDateCreated')): ?>
<!-- Date created -->
<span class="latestItemDateCreated">
<?php echo JHTML::_('date', $this->item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<!-- Plugins: AfterDisplayTitle -->
<?php echo $this->item->event->AfterDisplayTitle; ?>
<!-- K2 Plugins: K2AfterDisplayTitle -->
<?php echo $this->item->event->K2AfterDisplayTitle; ?>
<div class="latestItemBody">
<!-- Plugins: BeforeDisplayContent -->
<?php echo $this->item->event->BeforeDisplayContent; ?>
<!-- K2 Plugins: K2BeforeDisplayContent -->
<?php echo $this->item->event->K2BeforeDisplayContent; ?>
<?php if($this->item->params->get('latestItemImage') && !empty($this->item->image)): ?>
<!-- Item Image -->
<div class="latestItemImageBlock">
<span class="latestItemImage">
<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
<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>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->item->params->get('latestItemIntroText')): ?>
<!-- Item introtext -->
<div class="latestItemIntroText">
<?php echo $this->item->introtext; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
<!-- Plugins: AfterDisplayContent -->
<?php echo $this->item->event->AfterDisplayContent; ?>
<!-- K2 Plugins: K2AfterDisplayContent -->
<?php echo $this->item->event->K2AfterDisplayContent; ?>
<div class="clr"></div>
</div>
<?php if($this->item->params->get('latestItemCategory') || $this->item->params->get('latestItemTags')): ?>
<div class="latestItemLinks">
<?php if($this->item->params->get('latestItemCategory')): ?>
<!-- Item category name -->
<div class="latestItemCategory">
<span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
<a href="<?php echo $this->item->category->link; ?>"><?php echo $this->item->category->name; ?></a>
</div>
<?php endif; ?>
<?php if($this->item->params->get('latestItemTags') && count($this->item->tags)): ?>
<!-- Item tags -->
<div class="latestItemTagsBlock">
<span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span>
<ul class="latestItemTags">
<?php foreach ($this->item->tags as $tag): ?>
<li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php if($this->params->get('latestItemVideo') && !empty($this->item->video)): ?>
<!-- Item video -->
<div class="latestItemVideoBlock">
<h3><?php echo JText::_('K2_RELATED_VIDEO'); ?></h3>
<span class="latestItemVideo<?php if($this->item->videoType=='embedded'): ?> embedded<?php endif; ?>"><?php echo $this->item->video; ?></span>
</div>
<?php endif; ?>
<?php if($this->item->params->get('latestItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
<!-- Anchor link to comments below -->
<div class="latestItemCommentsLink">
<?php if(!empty($this->item->event->K2CommentsCounter)): ?>
<!-- K2 Plugins: K2CommentsCounter -->
<?php echo $this->item->event->K2CommentsCounter; ?>
<?php else: ?>
<?php if($this->item->numOfComments > 0): ?>
<a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo $this->item->numOfComments; ?> <?php echo ($this->item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
</a>
<?php else: ?>
<a href="<?php echo $this->item->link; ?>#itemCommentsAnchor">
<?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->item->params->get('latestItemReadMore')): ?>
<!-- Item "read more..." link -->
<div class="latestItemReadMore">
<a class="k2ReadMore" href="<?php echo $this->item->link; ?>">
<?php echo JText::_('K2_READ_MORE'); ?>
</a>
</div>
<?php endif; ?>
<div class="clr"></div>
<!-- Plugins: AfterDisplay -->
<?php echo $this->item->event->AfterDisplay; ?>
<!-- K2 Plugins: K2AfterDisplay -->
<?php echo $this->item->event->K2AfterDisplay; ?>
<div class="clr"></div>
</div>
<!-- End K2 Item Layout -->

View File

@ -0,0 +1,147 @@
<?php
/**
* @version $Id: tag.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
?>
<!-- Start K2 Tag Layout -->
<div id="k2Container" class="tagView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">
<?php if($this->params->get('show_page_title')): ?>
<!-- Page title -->
<div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>
<?php if($this->params->get('tagFeedIcon',1)): ?>
<!-- RSS feed icon -->
<div class="k2FeedIcon">
<a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>">
<span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span>
</a>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if(count($this->items)): ?>
<div class="tagItemList">
<?php foreach($this->items as $item): ?>
<!-- Start K2 Item Layout -->
<div class="tagItemView">
<div class="tagItemHeader">
<?php if($item->params->get('tagItemDateCreated',1)): ?>
<!-- Date created -->
<span class="tagItemDateCreated">
<?php echo JHTML::_('date', $item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php if($item->params->get('tagItemTitle',1)): ?>
<!-- Item title -->
<h2 class="tagItemTitle">
<?php if ($item->params->get('tagItemTitleLinked',1)): ?>
<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?>
</a>
<?php else: ?>
<?php echo $item->title; ?>
<?php endif; ?>
</h2>
<?php endif; ?>
</div>
<div class="tagItemBody">
<?php if($item->params->get('tagItemImage',1) && !empty($item->imageGeneric)): ?>
<!-- Item Image -->
<div class="tagItemImageBlock">
<span class="tagItemImage">
<a href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>">
<img src="<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $item->params->get('itemImageGeneric'); ?>px; height:auto;" />
</a>
</span>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($item->params->get('tagItemIntroText',1)): ?>
<!-- Item introtext -->
<div class="tagItemIntroText">
<?php echo $item->introtext; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<div class="clr"></div>
<?php if($item->params->get('tagItemExtraFields',0) && count($item->extra_fields)): ?>
<!-- Item extra fields -->
<div class="tagItemExtraFields">
<h4><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h4>
<ul>
<?php foreach ($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="tagItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
<?php else: ?>
<span class="tagItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
<span class="tagItemExtraFieldsValue"><?php echo $extraField->value; ?></span>
<?php endif; ?>
</li>
<?php endif; ?>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($item->params->get('tagItemCategory')): ?>
<!-- Item category name -->
<div class="tagItemCategory">
<span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
<a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a>
</div>
<?php endif; ?>
<?php if ($item->params->get('tagItemReadMore')): ?>
<!-- Item "read more..." link -->
<div class="tagItemReadMore">
<a class="k2ReadMore" href="<?php echo $item->link; ?>">
<?php echo JText::_('K2_READ_MORE'); ?>
</a>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<!-- End K2 Item Layout -->
<?php endforeach; ?>
</div>
<!-- Pagination -->
<?php if($this->pagination->getPagesLinks()): ?>
<div class="k2Pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
<div class="clr"></div>
<?php echo $this->pagination->getPagesCounter(); ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- End K2 Tag Layout -->

View File

@ -0,0 +1,272 @@
<?php
/**
* @version $Id: user.php 1812 2013-01-14 18:45:06Z lefteris.kavadas $
* @package K2
* @author JoomlaWorks http://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2013 JoomlaWorks Ltd. All rights reserved.
* @license GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined('_JEXEC') or die;
// Get user stuff (do not change)
$user = JFactory::getUser();
?>
<!-- Start K2 User Layout -->
<div id="k2Container" class="userView<?php if($this->params->get('pageclass_sfx')) echo ' '.$this->params->get('pageclass_sfx'); ?>">
<?php if($this->params->get('show_page_title') && $this->params->get('page_title')!=$this->user->name): ?>
<!-- Page title -->
<div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>">
<?php echo $this->escape($this->params->get('page_title')); ?>
</div>
<?php endif; ?>
<?php if($this->params->get('userFeedIcon',1)): ?>
<!-- RSS feed icon -->
<div class="k2FeedIcon">
<a href="<?php echo $this->feed; ?>" title="<?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?>">
<span><?php echo JText::_('K2_SUBSCRIBE_TO_THIS_RSS_FEED'); ?></span>
</a>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if ($this->params->get('userImage') || $this->params->get('userName') || $this->params->get('userDescription') || $this->params->get('userURL') || $this->params->get('userEmail')): ?>
<div class="userBlock">
<?php if(isset($this->addLink) && JRequest::getInt('id')==$user->id): ?>
<!-- Item add link -->
<span class="userItemAddLink">
<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $this->addLink; ?>">
<?php echo JText::_('K2_POST_A_NEW_ITEM'); ?>
</a>
</span>
<?php endif; ?>
<?php if ($this->params->get('userImage') && !empty($this->user->avatar)): ?>
<img src="<?php echo $this->user->avatar; ?>" alt="<?php echo $this->user->name; ?>" style="width:<?php echo $this->params->get('userImageWidth'); ?>px; height:auto;" />
<?php endif; ?>
<?php if ($this->params->get('userName')): ?>
<h2><?php echo $this->user->name; ?></h2>
<?php endif; ?>
<?php if ($this->params->get('userDescription') && trim($this->user->profile->description)): ?>
<div class="userDescription"><?php echo $this->user->profile->description; ?></div>
<?php endif; ?>
<?php if (($this->params->get('userURL') && isset($this->user->profile->url) && $this->user->profile->url) || $this->params->get('userEmail')): ?>
<div class="userAdditionalInfo">
<?php if ($this->params->get('userURL') && isset($this->user->profile->url) && $this->user->profile->url): ?>
<span class="userURL">
<?php echo JText::_('K2_WEBSITE_URL'); ?>: <a href="<?php echo $this->user->profile->url; ?>" target="_blank" rel="me"><?php echo $this->user->profile->url; ?></a>
</span>
<?php endif; ?>
<?php if ($this->params->get('userEmail')): ?>
<span class="userEmail">
<?php echo JText::_('K2_EMAIL'); ?>: <?php echo JHTML::_('Email.cloak', $this->user->email); ?>
</span>
<?php endif; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php echo $this->user->event->K2UserDisplay; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if(count($this->items)): ?>
<!-- Item list -->
<div class="userItemList">
<?php foreach ($this->items as $item): ?>
<!-- Start K2 Item Layout -->
<div class="userItemView<?php if(!$item->published || ($item->publish_up != $this->nullDate && $item->publish_up > $this->now) || ($item->publish_down != $this->nullDate && $item->publish_down < $this->now)) echo ' userItemViewUnpublished'; ?><?php echo ($item->featured) ? ' userItemIsFeatured' : ''; ?>">
<!-- Plugins: BeforeDisplay -->
<?php echo $item->event->BeforeDisplay; ?>
<!-- K2 Plugins: K2BeforeDisplay -->
<?php echo $item->event->K2BeforeDisplay; ?>
<div class="userItemHeader">
<?php if($this->params->get('userItemDateCreated')): ?>
<!-- Date created -->
<span class="userItemDateCreated">
<?php echo JHTML::_('date', $item->created , JText::_('K2_DATE_FORMAT_LC2')); ?>
</span>
<?php endif; ?>
<?php if($this->params->get('userItemTitle')): ?>
<!-- Item title -->
<h3 class="userItemTitle">
<?php if(isset($item->editLink)): ?>
<!-- Item edit link -->
<span class="userItemEditLink">
<a class="modal" rel="{handler:'iframe',size:{x:990,y:550}}" href="<?php echo $item->editLink; ?>">
<?php echo JText::_('K2_EDIT_ITEM'); ?>
</a>
</span>
<?php endif; ?>
<?php if ($this->params->get('userItemTitleLinked') && $item->published): ?>
<a href="<?php echo $item->link; ?>">
<?php echo $item->title; ?>
</a>
<?php else: ?>
<?php echo $item->title; ?>
<?php endif; ?>
<?php if(!$item->published || ($item->publish_up != $this->nullDate && $item->publish_up > $this->now) || ($item->publish_down != $this->nullDate && $item->publish_down < $this->now)): ?>
<span>
<sup>
<?php echo JText::_('K2_UNPUBLISHED'); ?>
</sup>
</span>
<?php endif; ?>
</h3>
<?php endif; ?>
</div>
<!-- Plugins: AfterDisplayTitle -->
<?php echo $item->event->AfterDisplayTitle; ?>
<!-- K2 Plugins: K2AfterDisplayTitle -->
<?php echo $item->event->K2AfterDisplayTitle; ?>
<div class="userItemBody">
<!-- Plugins: BeforeDisplayContent -->
<?php echo $item->event->BeforeDisplayContent; ?>
<!-- K2 Plugins: K2BeforeDisplayContent -->
<?php echo $item->event->K2BeforeDisplayContent; ?>
<?php if($this->params->get('userItemImage') && !empty($item->imageGeneric)): ?>
<!-- Item Image -->
<div class="userItemImageBlock">
<span class="userItemImage">
<a href="<?php echo $item->link; ?>" title="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>">
<img src="<?php echo $item->imageGeneric; ?>" alt="<?php if(!empty($item->image_caption)) echo K2HelperUtilities::cleanHtml($item->image_caption); else echo K2HelperUtilities::cleanHtml($item->title); ?>" style="width:<?php echo $this->params->get('itemImageGeneric'); ?>px; height:auto;" />
</a>
</span>
<div class="clr"></div>
</div>
<?php endif; ?>
<?php if($this->params->get('userItemIntroText')): ?>
<!-- Item introtext -->
<div class="userItemIntroText">
<?php echo $item->introtext; ?>
</div>
<?php endif; ?>
<div class="clr"></div>
<!-- Plugins: AfterDisplayContent -->
<?php echo $item->event->AfterDisplayContent; ?>
<!-- K2 Plugins: K2AfterDisplayContent -->
<?php echo $item->event->K2AfterDisplayContent; ?>
<div class="clr"></div>
</div>
<?php if($this->params->get('userItemCategory') || $this->params->get('userItemTags')): ?>
<div class="userItemLinks">
<?php if($this->params->get('userItemCategory')): ?>
<!-- Item category name -->
<div class="userItemCategory">
<span><?php echo JText::_('K2_PUBLISHED_IN'); ?></span>
<a href="<?php echo $item->category->link; ?>"><?php echo $item->category->name; ?></a>
</div>
<?php endif; ?>
<?php if($this->params->get('userItemTags') && isset($item->tags)): ?>
<!-- Item tags -->
<div class="userItemTagsBlock">
<span><?php echo JText::_('K2_TAGGED_UNDER'); ?></span>
<ul class="userItemTags">
<?php foreach ($item->tags as $tag): ?>
<li><a href="<?php echo $tag->link; ?>"><?php echo $tag->name; ?></a></li>
<?php endforeach; ?>
</ul>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr"></div>
</div>
<?php endif; ?>
<div class="clr"></div>
<?php if($this->params->get('userItemCommentsAnchor') && ( ($this->params->get('comments') == '2' && !$this->user->guest) || ($this->params->get('comments') == '1')) ): ?>
<!-- Anchor link to comments below -->
<div class="userItemCommentsLink">
<?php if(!empty($item->event->K2CommentsCounter)): ?>
<!-- K2 Plugins: K2CommentsCounter -->
<?php echo $item->event->K2CommentsCounter; ?>
<?php else: ?>
<?php if($item->numOfComments > 0): ?>
<a href="<?php echo $item->link; ?>#itemCommentsAnchor">
<?php echo $item->numOfComments; ?> <?php echo ($item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
</a>
<?php else: ?>
<a href="<?php echo $item->link; ?>#itemCommentsAnchor">
<?php echo JText::_('K2_BE_THE_FIRST_TO_COMMENT'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($this->params->get('userItemReadMore')): ?>
<!-- Item "read more..." link -->
<div class="userItemReadMore">
<a class="k2ReadMore" href="<?php echo $item->link; ?>">
<?php echo JText::_('K2_READ_MORE'); ?>
</a>
</div>
<?php endif; ?>
<div class="clr"></div>
<!-- Plugins: AfterDisplay -->
<?php echo $item->event->AfterDisplay; ?>
<!-- K2 Plugins: K2AfterDisplay -->
<?php echo $item->event->K2AfterDisplay; ?>
<div class="clr"></div>
</div>
<!-- End K2 Item Layout -->
<?php endforeach; ?>
</div>
<!-- Pagination -->
<?php if(count($this->pagination->getPagesLinks())): ?>
<div class="k2Pagination">
<?php echo $this->pagination->getPagesLinks(); ?>
<div class="clr"></div>
<?php echo $this->pagination->getPagesCounter(); ?>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
<!-- End K2 User Layout -->