Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • cod1 Friend
    #898006

    Hi,

    I’m trying to customize JA Wall template and I can’t figure out how to show video instead of image for K2 item in category listings. I modified category_item_links.php and item.php files at lines 62 and 252, respectively (see attached). It only works in item view. My second preoccupation is that the Social Feed Youtube doesn’t seem to work. Is it possible to update it. The thread to get solution for this issue is not working (http://www.joomlart.com/forums/topic/social-feed-youtube-facebook-with-k2/).

    category_item_links.php

    item, 'itemlist', $this->params);
    
    $app = JFactory::getApplication();
    $tmpl = $app->getTemplate(true);
    $hothits = (int) $tmpl->params->get ('hothits', 1000);
    
    // get extra class from extra field of item
    $xclass = WallHelper::getExClass($this->item);
    
    // build intro images
    if($tmpl->params->get ('atlookat2_autoimg', 1)){
        WallHelper::buildK2Image($this->item);
    }
    
    // build intro content
    // get some first paragraph in introtext, trip tags (keep a, strong, br, b...)
    $introtext = WallHelper::extractFirstParagraph($this->item->introtext);
    // add p tag
    $introtext = ''.$introtext.'';
    
    $iclass = array('item', JApplication::stringURLSafe($this->item->categoryname));
    if(!empty($xclass)){ $iclass[] = $xclass; }
    if(empty($this->item->image)){ $iclass[] = 'no-image'; }
    if($this->item->hits >= $hothits){ $iclass[] = 'item-hot'; }
    
    ?>
    
            item->event->BeforeDisplay; ?>
    
            item->event->K2BeforeDisplay; ?>
    
            item->params->get('catItemImage') && !empty($this->item->image)): ?>
    
                     
    
                item->params->get('catItemVideo') && !empty($this->item->video)): ?>
    
                    item->videoType=='embedded'): ?>
    
                        item->video; ?>
    
                    item->video; ?>
    
                    item->editLink)): ?>
    
                    item->params->get('catItemTitle')): ?>
    
                        item->params->get('catItemTitleLinked')): ?>
    
                            item->title; ?>
    
                            item->title; ?>
    
                    item->params->get('catItemFeaturedNotice') && $this->item->featured): ?>
    
                        item->params->get('catItemCategory')): ?>
    
                        : 
                        item->category->name; ?>
    
                        item->params->get('catItemDateCreated')): ?>
    
                            : 
                            item->created , JText::_('K2_ATLOOKAT_DATE_FORMAT_LC2')); ?>
    
                        item->params->get('catItemAuthor')): ?>
    
                            item->author->profile->gender); ?>:  item->author->name; ?>
    
                        item->params->get('catItemRating')): ?>
    
                                    1
                                    2
                                    3
                                    4
                                    5
    
                                item->numOfvotes; ?>
    
                item->event->AfterDisplayTitle; ?>
    
                item->event->K2AfterDisplayTitle; ?>
    
                item->params->get('catItemIntroText')): ?>
    
                    item->event->BeforeDisplayContent; ?>
    
                    item->event->K2BeforeDisplayContent; ?>
    
                    item->params->get('catItemIntroText')): ?>
    
                    item->params->get('catItemExtraFields') && count($this->item->extra_fields)): ?>
    
                            item->extra_fields as $key=>$extraField): ?>
                            value =='grid-double' || $extraField->value =='grid-triple') continue; ?>
                            value != ''): ?>
                             typetype); ?> groupgroup; ?>">
                                type == 'header'): ?>
                                name; ?>
    
                                name; ?>
                                value; ?>
    
                    item->event->AfterDisplayContent; ?>
    
                    item->event->K2AfterDisplayContent; ?>
    
                item->params->get('catItemTags') ||
                  $this->item->params->get('catItemAttachments')
                ): ?>
    
                    item->params->get('catItemTags') && count($this->item->tags)): ?>
    
                        : 
    
                            item->tags as $tag): ?>
                            name; ?>
    
                    item->params->get('catItemAttachments') && count($this->item->attachments)): ?>
    
                        item->attachments as $attachment): ?>
    
                                title ; ?>
    
                            item->params->get('catItemAttachmentsCounter')): ?>
                            (hits; ?> hits==1) ? JText::_('K2_DOWNLOAD') : JText::_('K2_DOWNLOADS'); ?>)
    
                item->params->get('catItemImageGallery') && !empty($this->item->gallery)): ?>
    
                    item->gallery; ?>
    
                item->params->get('catItemHits') ||
                    $this->item->params->get('catItemCommentsAnchor') ||
                    $this->item->params->get('catItemReadMore')
                    ): ?>
    
                    item->params->get('catItemHits')):?>
    
                        : item->hits; ?>
    
                    item->params->get('catItemCommentsAnchor') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
    
                        item->event->K2CommentsCounter)): ?>
    
                            item->event->K2CommentsCounter; ?>
    
                            item->numOfComments > 0): ?>
    
                                item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>: item->numOfComments; ?>
    
                                :  0
    
                    item->params->get('catItemReadMore')): ?>
    
                    item->params->get('catItemDateModified')): ?>
    
                    item->modified != $this->nullDate && $this->item->modified != $this->item->created ): ?>
    
                         item->modified, JText::_('K2_DATE_FORMAT_LC2')); ?>
    
        item->event->AfterDisplay; ?>
    
        item->event->K2AfterDisplay; ?>
    

    item.php

    
        item->event->BeforeDisplay; ?>
    
        item->event->K2BeforeDisplay; ?>
    
          item->params->get('itemTitle')): ?>
    
                item->editLink) && $tmpl != 'component'): ?>
    
            item->title; ?>
    
            item->params->get('itemFeaturedNotice') && $this->item->featured): ?>
    
            item->params->get('itemAuthor')): ?>
    
                item->author->profile->gender); ?>: 
                item->created_by_alias)): ?>
                item->author->name; ?>
    
                item->author->name; ?>
    
            item->params->get('itemCategory')): ?>
    
                : 
                item->category->name; ?>
    
            item->params->get('itemDateCreated')): ?>
    
                : 
                item->created , JText::_('DATE_FORMAT_LC3')); ?>
    
                item->params->get('itemHits')): ?>
    
                    :  item->hits; ?> 
    
      item->event->AfterDisplayTitle; ?>
    
      item->event->K2AfterDisplayTitle; ?>
    
        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') ||
            $this->item->params->get('itemRating')
        ): ?>
    
        item->params->get('itemRating')): ?>
    
                        1
                        2
                        3
                        4
                        5
    
                    item->numOfvotes; ?>
    
                item->params->get('itemFontResizer')): ?>
    
                item->params->get('itemPrintButton') && !JRequest::getInt('print')): ?>
    
                item->params->get('itemEmailButton') && !JRequest::getInt('print')): ?>
    
                item->params->get('itemSocialButton') && !is_null($this->item->params->get('socialButtonCode', NULL))): ?>
    
                    item->params->get('socialButtonCode'); ?>
    
                item->params->get('itemVideoAnchor') && !empty($this->item->video)): ?>
    
                item->params->get('itemImageGalleryAnchor') && !empty($this->item->gallery)): ?>
    
                item->params->get('itemCommentsAnchor') && $this->item->params->get('itemComments') && ( ($this->item->params->get('comments') == '2' && !$this->user->guest) || ($this->item->params->get('comments') == '1')) ): ?>
    
                    item->event->K2CommentsCounter)): ?>
    
                        item->event->K2CommentsCounter; ?>
    
                        item->numOfComments > 0): ?>
    
                            item->numOfComments; ?> item->numOfComments>1) ? JText::_('K2_COMMENTS') : JText::_('K2_COMMENT'); ?>
    
          item->event->BeforeDisplayContent; ?>
    
          item->event->K2BeforeDisplayContent; ?>
    
          item->params->get('itemImage') && !empty($this->item->image)): ?>
    
              item->params->get('itemImageMainCaption') && !empty($this->item->image_caption)): ?>
    
              item->image_caption; ?>
    
              item->params->get('itemImageMainCredits') && !empty($this->item->image_credits)): ?>
    
              item->image_credits; ?>
    
      item->params->get('itemVideo') && !empty($this->item->video)): ?>
    
            item->videoType=='embedded'): ?>
    
                item->video; ?>
    
            item->video; ?>
    
          item->params->get('itemVideoCaption') && !empty($this->item->video_caption)): ?>
          item->video_caption; ?>
    
          item->params->get('itemVideoCredits') && !empty($this->item->video_credits)): ?>
          item->video_credits; ?>
    
          item->fulltext)): ?>
          item->params->get('itemIntroText')): ?>
    
            item->introtext; ?>
    
          item->params->get('itemFullText')): ?>
    
            item->fulltext; ?>
    
                </script>
                <!-- atl-resp -->
                <ins class="adsbygoogle"
                     style="display:block"
                     data-ad-client="ca-pub-1140107280797047"
                     data-ad-slot="9713748013"
                     data-ad-format="auto"></ins>
                &lt;script&gt;
                (adsbygoogle = window.adsbygoogle || []).push({});
                &lt;/script&gt;
                </div>
                <div class="clr"></div>
              <!-- End AdSense -->
    
          </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 =='grid-double' || $extraField->value =='grid-triple') continue; ?>
                <?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="genericItemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
                        <?php else: ?>
                        <span class="genericItemExtraFieldsLabel"><?php echo $extraField->name; ?></span>
                        <span class="genericItemExtraFieldsValue"><?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('itemDateModified') && intval($this->item->modified)!=0)): ?>
            <div class="itemContentFooter">
    
                <?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 
                $datahref = str_replace('tmpl=component', '', $this->item->absoluteURL);
                $datahref = str_replace(array('&&', '?&'), array('&', '?'), $datahref);
                $datahref = rtrim($datahref, ' ?&');
                $datahref = urlencode($datahref);
            ?>
            <?php if($this->item->params->get('itemTwitterButton',1)): ?>
            <!-- Twitter Button -->
            <div class="itemTwitterButton">
                <a href="https://twitter.com/share" data-url="<?php echo $datahref ?>" 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">&lt;/script&gt;
            </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'));
                &lt;/script&gt;
                <div class="fb-like" data-href="<?php echo $datahref ?>" data-send="false" data-width="270" data-show-faces="true"></div>
            </div>
            <?php endif; ?>
    
            <?php if($this->item->params->get('itemGooglePlusOneButton',1)): ?>
            <!-- Google +1 Button -->
            <div class="itemGooglePlusOneButton"> 
                <g:plusone data-href="<?php echo $datahref ?>" 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);
                  })();
                &lt;/script&gt;
            </div>
            <?php endif; ?>
    
            <div class="clr"></div>
        </div>
        <?php endif; ?>
    
      <?php if( $this->item->params->get('itemTags') || $this->item->params->get('itemAttachments')): ?>
      <div class="itemLinks">
    
          <?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 class="tag tags" 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><span><?php echo JText::_('K2_LATEST_FROM'); ?> <?php echo $this->item->author->name; ?></span></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('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'; ?>">
    
                <div class="commentInfo">
    
                    <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>
    
                        <span class="commentDate">
                        <?php echo JHTML::_('date', $comment->commentDate, JText::_('K2_DATE_FORMAT_LC')); ?>
                    </span>
    
                        <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>
    
                    </div>
    
                    <?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; ?>
    
                <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; ?>
    
    </div>
    <!-- End K2 Item Layout -->
    

    1. Files.zip
    Ninja Lead Moderator
    #898228

    Hi,

    I compared both files of you provided on the thread and see you changed something on that, I duplicated it at my end but I could not get what are you trying to do? If possible, you can give me the URL of your site, screenshot and description on that. It would help to understand of your site. I will find the solution for you.

    About the second of you mentioned above, that’s a problem already updated our product, you only upgrade and run with the latest version of JA Social Feed plugin. Let me know if you have any further assistance.

    Regards

    cod1 Friend
    #898507

    Hi,

    Many thanks for the prompt reply. Here is the URL of my site: http://atlookat.com/index.php/quick-links/bric-a-brac
    I attached the screenshot along with the description of what I’m trying to achieve.

    About my second preoccupation, I’m running the latest version (1.2.5) and I can get the xml files of the Youtube accounts I selected, but still can’t load the content.

    Thanks


    1. K2-item-in-category-listings
    Ninja Lead Moderator
    #899273

    I already forwarded this problem to development team, they will check it directly on your site.

    Luna Garden Moderator
    #899379

    Hi,

    In the topic you follow, that was the time video code embed was inserted directly to the K2 Item content. Now the workflow is changed, video code embed is inserted to tab Media.
    In order to show Video in Category list, just go to: backend >> Category >> Choose category you want to config >> in Tab Item view options in category listings (on the right) set to show Media.
    Then add these lines to your CSS file:

    .youtube-player {
        height: auto !important;
        width: 100% !important;
    }

    cod1 Friend
    #899534
    This reply has been marked as private.
    Luna Garden Moderator
    #899785

    Yes, the key in first image.

Viewing 7 posts - 1 through 7 (of 7 total)

This topic contains 6 replies, has 3 voices, and was last updated by  Luna Garden 8 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum