Thanks for testing. And next funny thing - I forgot to uninstall APOS plugin, so it still created welcome post for you in forum, but forum is not installed... Just a reminder to look at it.
At first, I used directly core news image shortcode, but then... legacy shortcodes file was created, but the template still uses them. What is correct? News_image or newsimage?
So I create custom theme shortcode and used it in news templates...
/* {THEME_NEWS_IMAGE} */ function sc_theme_news_image( $parm = array() ) // add override of news_image shortcode { $sc = e107::getScBatch('news'); $data = $sc->getScVar('news_item'); $news_images = explode(',', $data['news_thumbnail']); $thumbnail = $news_images[0]; $thumbnail_src = e107::getParser()->replaceConstants($thumbnail , 'abs'); $class = 'theme-news-image'; $news_category = '<div class="hs-text"><div class="label"><span>'.$data['category_name'].'</span></div></div>'; if($parm['class']) {$class = $parm['class']; } $text = '<div class="'.$class.' set-bg" data-setbg="'.$thumbnail_src.'">'.$news_category.'</div>'; return $text; }
Used in:
Metis (news image) | |
Appstrap (news date) |
GLORIOUS YEARS
SATISFACTION RATE
e107 THEMES
e107 PLUGINS