GavickPro / News-Show-Pro-GK5

Advanced Joomla! content module.
28 stars 37 forks source link

No badged for VM in NSP #329

Closed teitbite closed 8 years ago

teitbite commented 8 years ago

Looks like badges functionality were removed in some of the updates since most of the functions were rewritten. I've added in again by:

editing file /modules/mod_news_pro_gk5/tmpl/com_virtuemart/view.php and changed line 53 which looked like this:

[code] return NSP_GK5_com_virtuemart_View::getImageHTML($only_url, $IMG_SOURCE, $links, $config, $IMG_LINK, $full_size_img); [/code]

into

[code] return NSP_GK5_com_virtuemart_View::getImageHTML($only_url, $IMG_SOURCE, $links, $config, $IMG_LINK, $full_size_img, $item['featured']); [/code]

than at the end of file /modules/mod_news_pro_gk5/tmpl/view.php I replaced the code:

[code] if($config['news_content_image_pos'] == 'center' && !$links) { $img_output .= '

'; }

        return $img_output;

[/code]

with

[code] if($config['news_content_image_pos'] == 'center' && !$links) { $img_output .= '

'; }

        if($is_featured && $config['vm_show_featured_badge']) {
            $badge = '<sup class="nspBadge">'.JText::_('MOD_NEWS_PRO_GK5_NSP_FEATURED').'</sup>';
        } else {
            $badge = '';
        }

        return $img_output . $badge;

[/code]

dziudek commented 8 years ago

I have a little bit modified the fix and also I've fixed an issue with missing VMConfig class in some cases: https://github.com/GavickPro/News-Show-Pro-GK5/commit/5ba917f238d532f8cb1340e00fa5de63cd45b10b