Ejemplo n.º 1
0
 private static function _getCurrentItemURL($article)
 {
     require_once JPATH_SITE . '/components/com_k2/helpers/route.php';
     $url = K2HelperRoute::getItemRoute($article->id . ":" . urlencode($article->alias), $article->catid);
     $url = SCArticleContent::_getCompleteURL($url);
     return $url;
 }
Ejemplo n.º 2
0
 private function getComments($article, $infix = 'article')
 {
     $width = $this->configModel->getSetting('social_' . $infix . '_comment_width');
     $numposts = $this->configModel->getSetting('social_' . $infix . '_comment_max_num');
     $colorscheme = $this->configModel->getSetting('social_' . $infix . '_comment_color_scheme');
     $orderBy = $this->configModel->getSetting('social_' . $infix . '_comment_order_by');
     $href = SCArticleContent::getCurrentURL($article, $this->isJoomla);
     if (!$numposts || $numposts == '0') {
         $commentText = '{JFBCCommentsCount href=' . $href . $this->renderKeyString . '}';
     } else {
         $commentText = '{JFBCComments href=' . $href . ' width=' . $width . ' num_posts=' . $numposts . ' colorscheme=' . $colorscheme . ' order_by=' . $orderBy . $this->renderKeyString . '}';
     }
     $html = '';
     $intro_text = $this->configModel->getSetting('social_' . $infix . '_comment_intro_text');
     if (!empty($intro_text)) {
         $html .= '<div class="scsocialcomments-intro-text">' . $intro_text . '</div>';
     }
     $html .= '<div style="z-index: 98;" class="scsocialcomments">' . $commentText . '</div>';
     return $html;
 }