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_text_limit', '…'); $title = str_replace('"', """, $title); $link = NSP_GK5_com_hikashop_View::itemLink($item, $config); 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_hikashop_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 ''; } }