- Posts: 1
COMMUNITY FORUM
Enable K2 plugins or components in item.php
- ByBus
- Topic Author
- Offline
- New Member
Less
More
7 years 1 day ago #165505
by ByBus
Enable K2 plugins or components in item.php was created by ByBus
Hi, I've made a custom item.php. But I think what I made few mistakes in it. Components (such as chronoforms 6) and plugins (I use jl social comments pro) now not working. There are no references to these components in the source code of the page. K2 plugins enabled in backend.
But everything works fine with standart template.
Please help
This is my item.php
But everything works fine with standart template.
Please help
This is my item.php
<?php
/**
* @version 2.7.x
* @package K2
* @author JoomlaWorks https://www.joomlaworks.net
* @copyright Copyright (c) 2006 - 2016 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->addScript('/js/skitter/dist/jquery.easing.1.3.js');
$document->addScript('/js/skitter/dist/jquery.skitter.js');
$document->addScript('/js/Fancy/jquery.fancybox.js');
$document->addScript('/js/Fancy/jquery.matchHeight.js');
$document->addScriptDeclaration('
jQuery(document).ready(function() {
jQuery("[data-fancybox=\"plangal\"]").fancybox({loop : true});
jQuery("[data-fancybox=\"fasgal\"]").fancybox({loop : true});
jQuery("[data-fancybox=\"razgal\"]").fancybox({loop : true});
jQuery("[data-fancybox=\"skitgal\"]").fancybox({loop : true});
});
');
$document->addScriptDeclaration('
jQuery(document).ready(function() {
//Вкладки
jQuery(".tab_item").not(":first").hide();
jQuery(".wrapper .tab").click(function() {
jQuery(".wrapper .tab").removeClass("activetab").eq(jQuery(this).index()).addClass("activetab");
jQuery(".tab_item").hide().eq(jQuery(this).index()).fadeIn()
}).eq(0).addClass("activetab");
//Одинаковая высота планировок и их выравнивание по вертикали
planirHeightMid();
//Картинки по середине (в планировках, фасадах и разрезах)
function planMiddle(elem) {
elem.each(function() {
var pla = jQuery(this).innerHeight();
var plai = jQuery("a > img", this);
var plaim = plai.outerHeight() + 28 + 20;
if (pla > plaim) {
plai.css("margin-top", (pla - plai.height() - 28) / 2 + "px");
}
});
};
function planirHeightMid() {
jQuery(".planir").matchHeight();
planMiddle(jQuery(".planir"));
};
jQuery("#fasad").one("click", function() {
jQuery(".fasad").matchHeight();
planMiddle(jQuery(".fasad"));
});
jQuery("#razrez").one("click", function() {
jQuery(".razrez").matchHeight();
planMiddle(jQuery(".razrez"));
});
//Хак для открытия skitterGall в fancybox
jQuery( ".lupa" ).click(function() {
var curSlide = jQuery(".image_main").attr("src");
jQuery(".fncm").each(function(){
if(jQuery(this).attr("href") == curSlide){
jQuery(this).trigger( "click" );
}
});
});
});
');
$document->addStyleSheet('/js/skitter/dist/skitter.css');
$document->addStyleSheet('/css/itemstyle.css');
$document->addStyleSheet('/js/Fancy/jquery.fancybox.css');
$document->addStyleSheet('http://fontawesome.io/assets/font-awesome/css/font-awesome.css');
?>
<!-- Start K2 Item Layout -->
<span id="startOfPageId<?php echo JRequest::getInt('id'); ?>"></span>
<link href="https://fonts.googleapis.com/css?family=Cuprum" rel="stylesheet">
<div id="k2Container" class="containerproject">
<!-- Plugins: BeforeDisplay -->
<?php echo $this->item->event->BeforeDisplay; ?>
<!-- K2 Plugins: K2BeforeDisplay -->
<?php echo $this->item->event->K2BeforeDisplay; ?>
<!-- Plugins: AfterDisplayTitle -->
<?php echo $this->item->event->AfterDisplayTitle; ?>
<!-- K2 Plugins: K2AfterDisplayTitle -->
<?php echo $this->item->event->K2AfterDisplayTitle; ?>
<?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
<?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
<?php if($extraField->value != ''): ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif;
$skittersettings = $this->item->extraFields->skittersettings->value;
$document->addScriptDeclaration($skittersettings);
$slicksettings = $this->item->extraFields->slicksettings->value;
$document->addScriptDeclaration($slicksettings);
?>
<div class="item-top-block">
<div class="articul-block">
<div class="articul">
<?php if($this->item->extraFields->articul->value) {echo $this->item->extraFields->articul->value;} ?>
</div>
<?php if ($this->item->extraFields->dostoinstva->value){ ?>
<div class="dostoinstva">
<?php echo $this->item->extraFields->dostoinstva->value; ?>
</div>
<?php } ?>
</div>
<div class="slider-item-block">
<div class="lupa">
<i class="fa fa-search-plus" aria-hidden="true">‌</i>
</div>
<?php if($this->item->params->get('itemImage') && !empty($this->item->image)): ?>
<div class="skitter skitter-large with-dots">
<ul>
<li>
<a class="fncm" data-fancybox="skitgal" href="<?php echo $this->item->image; ?>">
<img src="<?php echo $this->item->image; ?>" class="cut" />
</a>
<div class="label_text">
<p>
<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>
</p>
</div>
</li>
<?php if ($this->item->extraFields->slideone->value){ ?>
<li>
<a class="fncm" data-fancybox="skitgal" href="<?php echo clrimg($this->item->extraFields->slideone->value); ?>">
<img src="<?php echo clrimg($this->item->extraFields->slideone->value); ?>" class="swapBlocks"/>
</a>
<div class="label_text">
<p>
<?php echo $this->item->extraFields->slideonetxt->value; ?>
</p>
</div>
</li>
<?php } ?>
<?php if ($this->item->extraFields->slidetwo->value){ ?>
<li>
<a class="fncm" data-fancybox="skitgal" href="<?php echo clrimg($this->item->extraFields->slidetwo->value); ?>">
<img src="<?php echo clrimg($this->item->extraFields->slidetwo->value); ?>" class="swapBlocks"/>
</a>
<div class="label_text">
<p>
<?php echo $this->item->extraFields->slidetwotxt->value; ?>
</p>
</div>
</li>
<?php } ?>
<?php if ($this->item->extraFields->slidethree->value){ ?>
<li>
<a class="fncm" data-fancybox="skitgal" href="<?php echo clrimg($this->item->extraFields->slidethree->value); ?>">
<img src="<?php echo clrimg($this->item->extraFields->slidethree->value); ?>" class="swapBlocks"/>
</a>
<div class="label_text">
<p>
<?php echo $this->item->extraFields->slidethreetxt->value; ?>
</p>
</div>
</li>
<?php } ?>
<?php if ($this->item->extraFields->slidefour->value){ ?>
<li>
<a class="fncm" data-fancybox="skitgal" href="<?php echo clrimg($this->item->extraFields->slidefour->value); ?>">
<img src="<?php echo clrimg($this->item->extraFields->slidefour->value); ?>" class="swapBlocks"/>
</a>
<div class="label_text">
<p>
<?php echo $this->item->extraFields->slidefourtxt->value; ?>
</p>
</div>
</li>
<?php } ?>
<?php if ($this->item->extraFields->slidefive->value){ ?>
<li>
<a class="fncm" data-fancybox="skitgal" href="<?php echo clrimg($this->item->extraFields->slidefive->value); ?>">
<img src="<?php echo clrimg($this->item->extraFields->slidefive->value); ?>" class="swapBlocks"/>
</a>
<div class="label_text">
<p>
<?php echo $this->item->extraFields->slidefivetxt->value; ?>
</p>
</div>
</li>
<?php } ?>
<?php if ($this->item->extraFields->slidesix->value){ ?>
<li>
<a class="fncm" data-fancybox="skitgal" href="<?php echo clrimg($this->item->extraFields->slidesix->value); ?>">
<img src="<?php echo clrimg($this->item->extraFields->slidesix->value); ?>" class="swapBlocks"/>
</a>
<div class="label_text">
<p>
<?php echo $this->item->extraFields->slidesixtxt->value; ?>
</p>
</div>
</li>
<?php } ?>
</ul>
</div>
<?php endif; ?>
</div>
<div class="maininfo-list">
<ul>
<li class="maininfo">
<div class="infopic-block">
<div class="krisha-pic info-pic"></div>
</div>
<div class="infopic-txt">КРОВЛЯ</div>
<div class="maininfo-txt"><?php if ($this->item->extraFields->krovlya->value){echo $this->item->extraFields->krovlya->value;} ?></div>
<div class="clrboth"></div>
</li>
<li class="maininfo">
<div class="infopic-block">
<div class="perekritie-pic info-pic"></div>
</div>
<div class="infopic-txt">ПЕРЕКРЫТИЕ</div>
<div class="maininfo-txt"><?php if ($this->item->extraFields->perekritie->value){echo $this->item->extraFields->perekritie->value;} ?></div>
<div class="clrboth"></div>
</li>
<li class="maininfo">
<div class="infopic-block">
<div class="steni-pic info-pic"></div>
</div>
<div class="infopic-txt">СТЕНЫ</div>
<div class="maininfo-txt"><?php if ($this->item->extraFields->steni->value){echo $this->item->extraFields->steni->value;} ?></div>
<div class="clrboth"></div>
</li>
<li class="maininfo">
<div class="infopic-block">
<div class="fundament-pic info-pic"></div>
</div>
<div class="infopic-txt">ФУНДАМЕНТ</div>
<div class="maininfo-txt"><?php if ($this->item->extraFields->fundament->value){echo $this->item->extraFields->fundament->value;} ?></div>
<div class="clrboth"></div>
</li>
</ul>
<div class="znaki-wrapper">
<div class="znacki-item ">
<?php if ($this->item->extraFields->spalen->value){ ?>
<div class="infopic-block marg-corr">
<div class="garazhicon spalen-pic"></div>
<div class="kol-vo"><?php echo sklonenie($this->item->extraFields->spalen->value,'spalen'); ?></div>
</div>
<?php } ?>
<?php if ($this->item->extraFields->sanuzlov->value){ ?>
<div class="infopic-block marg-corr">
<div class="garazhicon sanuzel-pic"></div>
<div class="kol-vo"><?php echo sklonenie($this->item->extraFields->sanuzlov->value,'sanuzlov'); ?></div>
</div>
<?php } ?>
<?php if ($this->item->extraFields->etazhei->value){ ?>
<div class="infopic-block marg-corr">
<div class="garazhicon etazh-pic"></div>
<div class="kol-vo"><?php echo sklonenie($this->item->extraFields->etazhei->value,'etazhei'); ?></div>
</div>
<?php } ?>
<?php if ($this->item->extraFields->garazhei->value){ ?>
<div class="infopic-block marg-corr">
<div class="garazhicon garazh-pic"></div>
<div class="kol-vo"><?php echo sklonenie($this->item->extraFields->garazhei->value,'garazhei'); ?></div>
</div>
<?php } ?>
<?php if ($this->item->extraFields->saun->value){ ?>
<div class="infopic-block marg-corr">
<div class="garazhicon sauna-pic"></div>
<div class="kol-vo"><?php echo sklonenie($this->item->extraFields->saun->value,'saun'); ?></div>
</div>
<?php } ?>
<div class="clrboth"></div>
</div>
</div>
<?php if ($this->item->extraFields->ploshad->value){ ?>
<div class="ploshad zakaz-block ploshcor">
Площадь:
<div class="ploshad-znach">
<?php echo $this->item->extraFields->ploshad->value; ?> м<sup>2</sup>
</div>
</div>
<?php } ?>
<?php if ($this->item->extraFields->tsena->value){ ?>
<div class="ploshad zakaz-block">
Цена:
<div class="ploshad-znach">
<?php echo $this->item->extraFields->tsena->value; ?> руб.
</div>
</div>
<?php } ?>
<div class="podrobnee-prj">
<a class="uk-button uk-align-right cupit" href="#">КУПИТЬ</a>
</div>
</div>
</div>
<?php if ($this->item->extraFields->dopslides->value){
$arrofimg = dopimg($this->item->extraFields->dopslides->value); ?>
<div id="item-k2-slides-position" class="blockstyle" style="padding: 10px; padding-bottom: 7px;">
<div class="slider-bl-prj">
<?php foreach ($arrofimg as $key=>$imgpath) { ?>
<div>
<a data-fancybox="skitgal" href="<?php echo $imgpath; ?>">
<img src="<?php echo $imgpath; ?>" />
</a>
</div>
<?php } ?>
</div>
</div>
<?php } ?>
<div class="blockstyle" style="padding:0; background: transparent;">
<div class="wrapper">
<div class="tabs">
<span id="planir" class="tab"><span class="plan-ico razrez-ico"> </span>Планировки</span>
<span id="fasad" class="tab"><i class="fa fa-home" aria-hidden="true"></i>Фасады</span>
<span id="razrez" class="tab"><span class="razrez-ico">А-А</span>Разрезы</span>
<span class="tab"><i class="fa fa-info" aria-hidden="true"></i>Описание</span>
<span class="tab"><i class="fa fa-list-ol" aria-hidden="true"></i>Состав проекта</span>
</div>
<div class="tab_content">
<!--ПЛАНИРОВКИ НАЧАЛО-->
<div class="tab_item">
<div class="tab-contenr-wrapper">
<?php if ($this->item->extraFields->planone->value){
$planone = $this->item->extraFields->planone->value; ?>
<div class="planirovka planir">
<div class="planir-opis"><?php echo $this->item->extraFields->planonename->value; ?></div>
<a data-fancybox="plangal" href="<?php echo clrimg($planone); ?>"><img src="<?php echo clrimg($planone); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->plantwo->value){
$plantwo = $this->item->extraFields->plantwo->value; ?>
<div class="planirovka planir">
<div class="planir-opis"><?php echo $this->item->extraFields->plantwoname->value; ?></div>
<a data-fancybox="plangal" href="<?php echo clrimg($plantwo); ?>"><img src="<?php echo clrimg($plantwo); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->planthree->value){
$planthree = $this->item->extraFields->planthree->value; ?>
<div class="planirovka planir">
<div class="planir-opis"><?php echo $this->item->extraFields->planthreename->value; ?></div>
<a data-fancybox="plangal" href="<?php echo clrimg($planthree); ?>"><img src="<?php echo clrimg($planthree); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->planfour->value){
$planfour = $this->item->extraFields->planfour->value; ?>
<div class="planirovka planir">
<div class="planir-opis"><?php echo $this->item->extraFields->planfourname->value; ?></div>
<a data-fancybox="plangal" href="<?php echo clrimg($planfour); ?>"><img src="<?php echo clrimg($planfour); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
</div>
<div class="clrboth"></div>
</div>
<!--ПЛАНИРОВКИ КОНЕЦ
ФАСАДЫ НАЧАЛО-->
<div class="tab_item">
<div class="tab-contenr-wrapper">
<?php if ($this->item->extraFields->fasadone->value){
$fasadone = $this->item->extraFields->fasadone->value; ?>
<div class="planirovka fasad">
<div class="planir-opis"><?php echo $this->item->extraFields->fasadonename->value; ?></div>
<a data-fancybox="fasgal" href="<?php echo clrimg($fasadone); ?>"><img src="<?php echo clrimg($fasadone); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->fasadtwo->value){
$fasadtwo = $this->item->extraFields->fasadtwo->value; ?>
<div class="planirovka fasad">
<div class="planir-opis"><?php echo $this->item->extraFields->fasadtwoname->value; ?></div>
<a data-fancybox="fasgal" href="<?php echo clrimg($fasadtwo); ?>"><img src="<?php echo clrimg($fasadtwo); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->fasadthree->value){
$fasadthree = $this->item->extraFields->fasadthree->value; ?>
<div class="planirovka fasad">
<div class="planir-opis"><?php echo $this->item->extraFields->fasadthreename->value; ?></div>
<a data-fancybox="fasgal" href="<?php echo clrimg($fasadthree); ?>"><img src="<?php echo clrimg($fasadthree); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->fasadfour->value){
$fasadfour = $this->item->extraFields->fasadfour->value; ?>
<div class="planirovka fasad">
<div class="planir-opis"><?php echo $this->item->extraFields->fasadfourname->value; ?></div>
<a data-fancybox="fasgal" href="<?php echo clrimg($fasadfour); ?>"><img src="<?php echo clrimg($fasadfour); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
</div>
<div class="clrboth"></div>
</div>
<!--ФАСАДЫ КОНЕЦ
РАЗРЕЗЫ НАЧАЛО-->
<div class="tab_item">
<div class="tab-contenr-wrapper">
<?php if ($this->item->extraFields->razrezone->value){
$razrezone = $this->item->extraFields->razrezone->value; ?>
<div class="planirovka razrez">
<div class="planir-opis"><?php echo $this->item->extraFields->razrezonename->value; ?></div>
<a data-fancybox="razgal" href="<?php echo clrimg($razrezone); ?>"><img src="<?php echo clrimg($razrezone); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->razreztwo->value){
$razreztwo = $this->item->extraFields->razreztwo->value; ?>
<div class="planirovka razrez">
<div class="planir-opis"><?php echo $this->item->extraFields->razreztwoname->value; ?></div>
<a data-fancybox="razgal" href="<?php echo clrimg($razreztwo); ?>"><img src="<?php echo clrimg($razreztwo); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->razrezthree->value){
$razrezthree = $this->item->extraFields->razrezthree->value; ?>
<div class="planirovka razrez">
<div class="planir-opis"><?php echo $this->item->extraFields->razrezthreename->value; ?></div>
<a data-fancybox="razgal" href="<?php echo clrimg($razrezthree); ?>"><img src="<?php echo clrimg($razrezthree); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
<?php if ($this->item->extraFields->razrezfour->value){
$razrezfour = $this->item->extraFields->razrezfour->value; ?>
<div class="planirovka razrez">
<div class="planir-opis"><?php echo $this->item->extraFields->razrezfourname->value; ?></div>
<a data-fancybox="razgal" href="<?php echo clrimg($razrezfour); ?>"><img src="<?php echo clrimg($razrezfour); ?>" alt="" width="100%"></a>
</div>
<?php } ?>
</div>
<div class="clrboth"></div>
</div>
<!--РАЗРЕЗЫ КОНЕЦ
ОПИСАНИЕ НАЧАЛО-->
<div class="tab_item">
<?php if(!empty($this->item->fulltext)): ?>
<?php if($this->item->params->get('itemIntroText')): ?>
<!-- Item introtext -->
<?php echo $this->item->introtext; ?>
<?php endif; ?>
<?php if($this->item->params->get('itemFullText')): ?>
<!-- Item fulltext -->
<?php echo $this->item->fulltext; ?>
<?php endif; ?>
<?php else: ?>
<!-- Item text -->
<?php echo $this->item->introtext; ?>
<?php endif; ?>
</div>
<!--ОПИСАНИЕ КОНЕЦ
СОСТАВ НАЧАЛО-->
<div class="tab_item">
<?php if ($this->item->extraFields->sostav->value){echo $this->item->extraFields->sostav->value;} ?>
</div>
<!--СОСТАВ КОНЕЦ-->
</div>
</div>
<div class="commentary"></div>
<div id="comment-prj" class="blockstyle">
<?php echo $this->item->event->K2AfterDisplayTitle; ?>
<?php echo $this->item->event->AfterDisplayContent; ?>
<?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 data-k2-modal="iframe" 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>
<!-- Comments Pagination -->
<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 class="itemCommentsLoginFirst"><?php echo JText::_('K2_LOGIN_TO_POST_COMMENTS'); ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php
function clrimg($img)
{
preg_match('%<img.*?src=["\'](.*?)["\'].*?/>%i', $img , $result);
return $result[1];
}
function sklonenie($chislo, $tip)
{
$arri = array (2, 0, 1, 1, 1, 2);
if ($tip == 'spalen'){
$arr = array ('спальня', 'спальни','спален');
} elseif ($tip == 'sanuzlov'){
$arr = array ('санузел', 'санузла','санузлов');
} elseif ($tip == 'etazhei'){
$arr = array ('этаж', 'этажа','этажей');
} elseif ($tip == 'garazhei'){
$arr = array ('гараж', 'гаража','гаражей');
} elseif ($tip == 'saun'){
$arr = array ('сауна', 'сауны','саун');
}
$i=($chislo%100>4 && $chislo%100<20)? 2 : $arri[min($chislo%10, 5)];
return $chislo.$arr[$i];
}
function dopimg($dopimage){
$doparr = preg_split("/\\r\\n|\\r|\\n/", $dopimage);
$doparr = array_filter($doparr);
return $doparr;
}
?>
</div>
</div>
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
7 years 18 hours ago #165516
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Enable K2 plugins or components in item.php
Hello,
Make sure that all the instances of:
<?php echo $this->item->event->EVENT_TRIGGER_NAME ?> are present in your overrides.
Make sure that all the instances of:
<?php echo $this->item->event->EVENT_TRIGGER_NAME ?> are present in your overrides.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.