function get_link($num) { if ($this->mode == 'com_content') { // load necessary com_content View class if (!class_exists('NSP_GK5_com_content_View')) { require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_content/view'); } return NSP_GK5_com_content_View::itemLink($this->parent->content[$num], $this->parent->config); } else { if ($this->mode == 'com_k2') { // load necessary k2 View class if (!class_exists('NSP_GK5_com_k2_View')) { require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_k2/view'); } return NSP_GK5_com_k2_View::itemLink($this->parent->content[$num], $this->parent->config); } else { return false; } } }
function get_link($num) { if ($this->mode == 'com_content') { // load necessary com_content View class if (!class_exists('NSP_GK5_com_content_View')) { require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_content/view'); } return NSP_GK5_com_content_View::itemLink($this->parent->content[$num], $this->parent->config); } else { if ($this->mode == 'com_k2') { // load necessary k2 View class if (!class_exists('NSP_GK5_com_k2_View')) { require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_k2/view'); } return NSP_GK5_com_k2_View::itemLink($this->parent->content[$num], $this->parent->config); } else { if ($this->mode == 'com_easyblog') { return urldecode(JRoute::_('index.php?option=com_easyblog&view=entry&id=' . $this->parent->content[$num]['id'])); } else { return false; } } } }
function get_link($num) { if ($this->mode == 'com_content') { // load necessary com_content View class if (!class_exists('NSP_GK5_com_content_View')) { require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_content/view'); } return NSP_GK5_com_content_View::itemLink($this->parent->content[$num], $this->parent->config); } else { if ($this->mode == 'com_k2') { // load necessary k2 View class if (!class_exists('NSP_GK5_com_k2_View')) { require_once JModuleHelper::getLayoutPath('mod_news_pro_gk5', 'com_k2/view'); } return NSP_GK5_com_k2_View::itemLink($this->parent->content[$num], $this->parent->config); } else { if ($this->mode == 'com_easyblog') { return urldecode(JRoute::_('index.php?option=com_easyblog&view=entry&id=' . $this->parent->content[$num]['id'])); } else { if ($this->mode == 'com_virtuemart') { $itemid = $this->parent->config['vm_itemid']; $link = 'index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $this->parent->content[$num]['id'] . '&virtuemart_category_id=' . $this->parent->content[$num]['cid'] . '&Itemid=' . $itemid; // return $link; } else { return false; } } } } }
static function lists($config, $item, $num) { $odd = $num % 2; if($config['news_short_pages'] > 0) { $text = ''; $title = ''; $image = ''; if($config['list_text_limit'] > 0) { $text = NSP_GK5_Utils::cutText(strip_tags(preg_replace("/\{.+?\}/", "", $item['text'])), $config, 'list_text_limit', '…'); $text = preg_replace("/\{.+?\}/", "", $text); if(JString::strlen($text) > 0) { $text = '<p>'.$text.'</p>'; } } if($config['list_title_limit'] > 0) { $title = htmlspecialchars($item['title']); $title = NSP_GK5_Utils::cutText($title, $config, 'list_title_limit', '…'); $title = str_replace('"', """, $title); $link = NSP_GK5_com_content_View::itemLink($item); if(JString::strlen($title) > 0) { $title = '<h4><a href="'.$link.'" title="'.htmlspecialchars($item['title']).'">'.$title.'</a></h4>'; } } if($config['links_image'] == 1) { $image = NSP_GK5_com_content_View::image($config, $item, false, false, true); } // creating rest news list return '<li class="'.(($odd == 1) ? 'odd' : 'even').'">' . $image . (($image != '') ? '<div>' . $title . $text . '</div>' : ($title . $text)) . '</li>'; } else { return ''; } }