static function image($config, $item, $only_url = false, $pm = false, $links = false) { if (!($config['news_content_image_pos'] != 'disabled' || $pm || $links)) { return ''; } $item['title'] = str_replace('"', """, $item['title']); $IMG_SOURCE = ''; $IMG_LINK = $item['url']; // $uri = JURI::getInstance(); // get image from Joomla! Images and Links settings $IMG_SOURCE = $item['image']; // $full_size_img = $IMG_SOURCE; // if ($config['create_thumbs'] == 1 && $IMG_SOURCE != '') { // try to override standard image if (strpos($IMG_SOURCE, 'http://') == FALSE) { $img_file = NSP_GK5_Thumbs::createThumbnail($IMG_SOURCE, $config, false, false, '', $links); if (is_array($img_file)) { $uri = JURI::getInstance(); $IMG_SOURCE = $uri->root() . 'modules/mod_news_pro_gk5/cache/' . $img_file[1]; } elseif ($config['create_thumbs'] == 1) { jimport('joomla.filesystem.file'); if (is_file(JPATH_ROOT . DS . 'modules' . DS . 'mod_news_pro_gk5' . DS . 'cache' . DS . 'default' . DS . 'default' . $config['module_id'] . '.png')) { $IMG_SOURCE = $uri->root() . 'modules/mod_news_pro_gk5/cache/default/default' . $config['module_id'] . '.png'; } } else { $IMG_SOURCE = ''; } } } elseif ($config['create_thumbs'] == 1) { jimport('joomla.filesystem.file'); if (is_file(JPATH_ROOT . DS . 'modules' . DS . 'mod_news_pro_gk5' . DS . 'cache' . DS . 'default' . DS . 'default' . $config['module_id'] . '.png')) { $IMG_SOURCE = $uri->root() . 'modules/mod_news_pro_gk5/cache/default/default' . $config['module_id'] . '.png'; } } return NSP_GK5_xml_file_View::getImageHTML($only_url, $IMG_SOURCE, $links, $config, $IMG_LINK, $full_size_img); }